From f3e9568fe3d4d9b80db6339378939c12e2fbbdc4 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Wed, 8 Sep 2010 19:24:26 -0500 Subject: [PATCH] create the array of arguments in all the methods that need them --- modules/IrcAdmin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/IrcAdmin.py b/modules/IrcAdmin.py index 0610d67..8502e4c 100644 --- a/modules/IrcAdmin.py +++ b/modules/IrcAdmin.py @@ -79,6 +79,8 @@ class IrcAdmin(Module): return self.sub_change_nick(connection, event, nick, userhost, replypath, what, admin_unlocked) def sub_join_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked): + whats = what.split(' ') + channel = whats[1] if irclib.is_channel(channel): connection.join(channel) @@ -86,6 +88,8 @@ class IrcAdmin(Module): return self.reply(connection, replypath, replystr) def sub_part_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked): + whats = what.split(' ') + channel = whats[1] if irclib.is_channel(channel): connection.part(channel, ' '.join(whats[2:])) @@ -93,6 +97,8 @@ class IrcAdmin(Module): return self.reply(connection, replypath, replystr) def sub_quit_irc(self, connection, event, nick, userhost, replypath, what, admin_unlocked): + whats = what.split(' ') + if replypath is not None: connection.privmsg(replypath, 'quitting') connection.quit(' '.join(whats[1:])) @@ -100,6 +106,8 @@ class IrcAdmin(Module): sys.exit() def sub_autojoin_manipulate(self, connection, event, nick, userhost, replypath, what, admin_unlocked): + whats = what.split(' ') + if whats[1] == 'add': try: # get existing list @@ -130,6 +138,8 @@ class IrcAdmin(Module): return self.reply(connection, replypath, replystr) def sub_change_nick(self, connection, event, nick, userhost, replypath, what, admin_unlocked): + whats = what.split(' ') + newnick = whats[1] connection.nick(newnick) self.config.set('dr.botzo', 'nick', newnick)