create the array of arguments in all the methods that need them
This commit is contained in:
parent
6541e6a193
commit
f3e9568fe3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue