diff --git a/config/docs.cfg b/config/docs.cfg index 84c9615c..41da05ca 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -336,6 +336,7 @@ docsection [Gameplay] docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.]; docexample [foo = "one" add2alias foo two echo foo] [Output: one two]; docident [addOnQuit] [Execute a command or block of code on quit.]; +docargument [A] [the command or block of code to execute] [] [0]; docident [addListOnQuit] [Deletes a list of aliases (from saved.cfg) on quit.]; docargument [L] [the list of aliases to delete] [] [0]; docexample [addListOnQuit "a b c"] [Deletes aliases a, b, and c from existance and saved.cfg upon quit.]; diff --git a/config/on_quit.cfg b/config/on_quit.cfg index 14067b27..d20e607d 100644 --- a/config/on_quit.cfg +++ b/config/on_quit.cfg @@ -1,5 +1,6 @@ // Adds a list of aliases to be deleted (cleared from saved.cfg) on every quit. // Do not modify. (unless you really know what you're doing) + addListOnQuit = [ alias_list = $arg1; loop al (listlen $alias_list) [ addOnQuit (concat "delalias" (at $alias_list $al)) ] ] on_quit_aliases = [ @@ -21,6 +22,8 @@ on_quit_aliases = [ tmp_mode tmp_numbots tmp_wc + alias_list // Last for a reason ] -addListOnQuit $on_quit_aliases \ No newline at end of file +addListOnQuit $on_quit_aliases +addOnQuit [ delalias addListOnQuit; delalias on_quit_aliases ] \ No newline at end of file diff --git a/docs/reference.xml b/docs/reference.xml index bd4b431c..7269ffc9 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -1381,6 +1381,7 @@ echo foo Execute a command or block of code on quit. +