create the array of arguments in all the methods that need them

This commit is contained in:
Brian S. Stephan 2010-09-08 19:24:26 -05:00
parent 6541e6a193
commit f3e9568fe3

View File

@ -79,6 +79,8 @@ class IrcAdmin(Module):
return self.sub_change_nick(connection, event, nick, userhost, replypath, what, admin_unlocked) 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): def sub_join_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')
channel = whats[1] channel = whats[1]
if irclib.is_channel(channel): if irclib.is_channel(channel):
connection.join(channel) connection.join(channel)
@ -86,6 +88,8 @@ class IrcAdmin(Module):
return self.reply(connection, replypath, replystr) return self.reply(connection, replypath, replystr)
def sub_part_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked): def sub_part_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')
channel = whats[1] channel = whats[1]
if irclib.is_channel(channel): if irclib.is_channel(channel):
connection.part(channel, ' '.join(whats[2:])) connection.part(channel, ' '.join(whats[2:]))
@ -93,6 +97,8 @@ class IrcAdmin(Module):
return self.reply(connection, replypath, replystr) return self.reply(connection, replypath, replystr)
def sub_quit_irc(self, connection, event, nick, userhost, replypath, what, admin_unlocked): def sub_quit_irc(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')
if replypath is not None: if replypath is not None:
connection.privmsg(replypath, 'quitting') connection.privmsg(replypath, 'quitting')
connection.quit(' '.join(whats[1:])) connection.quit(' '.join(whats[1:]))
@ -100,6 +106,8 @@ class IrcAdmin(Module):
sys.exit() sys.exit()
def sub_autojoin_manipulate(self, connection, event, nick, userhost, replypath, what, admin_unlocked): def sub_autojoin_manipulate(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')
if whats[1] == 'add': if whats[1] == 'add':
try: try:
# get existing list # get existing list
@ -130,6 +138,8 @@ class IrcAdmin(Module):
return self.reply(connection, replypath, replystr) return self.reply(connection, replypath, replystr)
def sub_change_nick(self, connection, event, nick, userhost, replypath, what, admin_unlocked): def sub_change_nick(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
whats = what.split(' ')
newnick = whats[1] newnick = whats[1]
connection.nick(newnick) connection.nick(newnick)
self.config.set('dr.botzo', 'nick', newnick) self.config.set('dr.botzo', 'nick', newnick)