if (word(2 $loadinfo()) != [pf]) { load -pf $word(1 $loadinfo()); return; }; # Copyright (c) 2004 BlackJac@EFNet # # Version: 1.1.2004.05.10.1 # # This extends epic's internal /dump command. It will remove aliases, # Karll arrays, hooks and variables; reset key bindings; leave channels; # close dccs; stop timers and destroy windows. package dump; alias dump (choice, void) { switch ($choice) { (aliases) { if (!dump.quiet) { xecho -b -c Removing all aliases; fe ($aliasctl(alias pmatch *)) dd { ^alias -$dd; }; } else { fe ($remw(dump $aliasctl(alias pmatch *))) dd { ^alias -$dd; }; }; }; (all) { xecho -b -c Cleaning up all aliases, arrays, binds, channels, dccs, hooks, timers, variables and windows; @ dump.quiet = 1; fe (aliases arrays binds channels dccs hooks timers variables windows) dd { dump $dd; }; @ dump.quiet = []; ^alias -dump; }; (arrays) { if (!dump.quiet) { xecho -b -c Removing all arrays; }; fe ($getarrays(*)) dd { @ delarray($dd); }; }; (binds) { if (!dump.quiet) { xecho -b -c Resetting all key bindings; }; bind -defaults; }; (channels) { if (!dump.quiet) { xecho -b -c Leaving all channels; }; join 0; }; (dccs) { if (!dump.quiet) { xecho -b -c Closing all DCC connections; }; ^dcc closeall; }; (hooks) (ons) { if (!dump.quiet) { xecho -b -c Removing all hooks; }; //^dump on; }; (timers) { if (!dump.quiet) { xecho -b -c Stopping all timers; }; timer -del all; }; (variables) { if (!dump.quiet) { xecho -b -c Unassigning all variables; }; fe ($remw(dump.quiet $aliasctl(assign pmatch *))) dd { ^assign -$dd; }; }; (windows) { if (!dump.quiet) { xecho -b -c Destroying all windows; }; fe ($winrefs()) dd { if (dd != word(0 $numsort($winrefs()))) { window refnum_or_swap $dd kill; }; }; ^window level none name - number 1; }; (*) { xecho -b -c DUMP option must be one of: aliases|all|arrays|binds|channels|dccs|hooks|timers|variables|windows; }; }; };