diff options
| author | jason | 2012-07-21 16:22:13 -0600 |
|---|---|---|
| committer | jason | 2012-07-21 16:22:13 -0600 |
| commit | 6019b7e376698dcb6dfdf3239388467ab4615aab (patch) | |
| tree | 42a407fb51827510a54a1fbd72c1980ea35132e1 | |
| parent | ecf83c6b4576138d34ee3056db997a66476a3f29 (diff) | |
| download | warmachine-6019b7e376698dcb6dfdf3239388467ab4615aab.tar.gz warmachine-6019b7e376698dcb6dfdf3239388467ab4615aab.zip | |
Changed the commands for module management.
| -rw-r--r-- | wmd/actions/modules.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wmd/actions/modules.py b/wmd/actions/modules.py index ed55609..60a1436 100644 --- a/wmd/actions/modules.py +++ b/wmd/actions/modules.py | |||
| @@ -8,7 +8,7 @@ class ReloadModule(Action): | |||
| 8 | 8 | ||
| 9 | if username in settings.ADMINS: | 9 | if username in settings.ADMINS: |
| 10 | args = obj_data.params.split(" ") | 10 | args = obj_data.params.split(" ") |
| 11 | if "PRIVMSG" in obj_data.command and "RELOAD" in args[1].upper(): | 11 | if "PRIVMSG" in obj_data.command and "RELOADMODULE" in args[1].upper(): |
| 12 | module = args[2] | 12 | module = args[2] |
| 13 | if not module in irc.actions: | 13 | if not module in irc.actions: |
| 14 | irc.privmsg(username, "Invalid Module: %s") | 14 | irc.privmsg(username, "Invalid Module: %s") |
| @@ -32,7 +32,7 @@ class LoadModule(Action): | |||
| 32 | 32 | ||
| 33 | if username in settings.ADMINS: | 33 | if username in settings.ADMINS: |
| 34 | args = obj_data.params.split(" ") | 34 | args = obj_data.params.split(" ") |
| 35 | if "PRIVMSG" in obj_data.command and "LOAD" in args[1].upper(): | 35 | if "PRIVMSG" in obj_data.command and "LOADMODULE" in args[1].upper(): |
| 36 | module_path = args[2] | 36 | module_path = args[2] |
| 37 | if module_path in irc.actions: | 37 | if module_path in irc.actions: |
| 38 | irc.privmsg(username, "Module %s already loaded" % (module_path,)) | 38 | irc.privmsg(username, "Module %s already loaded" % (module_path,)) |
| @@ -50,7 +50,7 @@ class ListModules(Action): | |||
| 50 | 50 | ||
| 51 | if username in settings.ADMINS: | 51 | if username in settings.ADMINS: |
| 52 | args = obj_data.params.split(" ") | 52 | args = obj_data.params.split(" ") |
| 53 | if "PRIVMSG" in obj_data.command and "LIST" in args[1].upper(): | 53 | if "PRIVMSG" in obj_data.command and "LISTMODULES" in args[1].upper(): |
| 54 | for module in irc.actions: | 54 | for module in irc.actions: |
| 55 | msg = module | 55 | msg = module |
| 56 | irc.privmsg(username, msg) | 56 | irc.privmsg(username, msg) |