- return "permissions (re)set <permission> [in <channel>] for <user>: sets or resets the permissions for botuser <user> in channel <channel> (use ? to change the permissions for private addressing)"\r
- when /^user show/\r
- return "user show <what> : shows info about the user; <what> can be any of autologin, login-by-mask, netmasks"\r
- when /^user (en|dis)able/\r
- return "user enable|disable <what> : turns on or off <what> (autologin, login-by-mask)"\r
- when /^user set/\r
- return "user set password <blah> : sets the user password to <blah>; passwords can only contain upper and lowercase letters and numbers, and must be at least 4 characters long"\r
- when /^user (add|rm)/\r
- return "user add|rm netmask <mask> : adds/removes netmask <mask> from the list of netmasks known to the botuser you're linked to"\r
- when /^user reset/\r
- return "user reset <what> : resets <what> to the default values. <what> can be +netmasks+ (the list will be emptied), +autologin+ or +login-by-mask+ (will be reset to the default value) or +password+ (a new one will be generated and you'll be told in private)"\r
- when /^user tell/\r
- return "user tell <who> the password for <botuser> : contacts <who> in private to tell him/her the password for <botuser>"\r
- when /^user create/\r
- return "user create <name> <password> : create botuser named <name> with password <password>. The password can be omitted, in which case a random one will be generated. The <name> should only contain alphanumeric characters and the underscore (_)"\r
- when /^user list/\r
- return "user list : lists all the botusers"\r
- when /^user destroy/\r
- return "user destroy <botuser> <password> : destroys <botuser>; this function #{Bold}must#{Bold} be called in two steps. On the first call, no password must be specified: <botuser> is then queued for destruction. On the second call, you must specify the correct password for <botuser>, and it will be destroyed. If you want to cancel the destruction, issue the command +user cancel destroy <botuser>+"\r
- when /^user/\r
- return "user show, enable|disable, add|rm netmask, set, reset, tell, create, list, destroy"\r
+ case topic\r
+ when "syntax"\r
+ return "a permission is specified as module::path::to::cmd; when you want to enable it, prefix it with +; when you want to disable it, prefix it with -; when using the +reset+ command, do not use any prefix"\r
+ else\r
+ return "permissions (re)set <permission> [in <channel>] for <user>: sets or resets the permissions for botuser <user> in channel <channel> (use ? to change the permissions for private addressing)"\r
+ end\r
+ when "user"\r
+ case topic\r
+ when "show"\r
+ return "user show <what> : shows info about the user; <what> can be any of autologin, login-by-mask, netmasks"\r
+ when /^(en|dis)able/\r
+ return "user enable|disable <what> : turns on or off <what> (autologin, login-by-mask)"\r
+ when "set"\r
+ return "user set password <blah> : sets the user password to <blah>; passwords can only contain upper and lowercase letters and numbers, and must be at least 4 characters long"\r
+ when "add", "rm"\r
+ return "user add|rm netmask <mask> : adds/removes netmask <mask> from the list of netmasks known to the botuser you're linked to"\r
+ when "reset"\r
+ return "user reset <what> : resets <what> to the default values. <what> can be +netmasks+ (the list will be emptied), +autologin+ or +login-by-mask+ (will be reset to the default value) or +password+ (a new one will be generated and you'll be told in private)"\r
+ when "tell"\r
+ return "user tell <who> the password for <botuser> : contacts <who> in private to tell him/her the password for <botuser>"\r
+ when "create"\r
+ return "user create <name> <password> : create botuser named <name> with password <password>. The password can be omitted, in which case a random one will be generated. The <name> should only contain alphanumeric characters and the underscore (_)"\r
+ when "list"\r
+ return "user list : lists all the botusers"\r
+ when "destroy"\r
+ return "user destroy <botuser> <password> : destroys <botuser>; this function #{Bold}must#{Bold} be called in two steps. On the first call, no password must be specified: <botuser> is then queued for destruction. On the second call, you must specify the correct password for <botuser>, and it will be destroyed. If you want to cancel the destruction, issue the command +user cancel destroy <botuser>+"\r
+ else\r
+ return "user show, enable|disable, add|rm netmask, set, reset, tell, create, list, destroy"\r
+ end\r