clean up some IrcAdmin output, which i was using to test reloading
This commit is contained in:
parent
e0565a9bb1
commit
467c72847a
@ -86,7 +86,7 @@ class IrcAdmin(Module):
|
||||
channel = whats[1]
|
||||
if irclib.is_channel(channel):
|
||||
connection.join(channel)
|
||||
replystr = 'joined ' + channel
|
||||
replystr = 'Joined ' + channel + '.'
|
||||
return self.reply(connection, replypath, replystr)
|
||||
|
||||
def sub_part_channel(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
|
||||
@ -95,14 +95,14 @@ class IrcAdmin(Module):
|
||||
channel = whats[1]
|
||||
if irclib.is_channel(channel):
|
||||
connection.part(channel, ' '.join(whats[2:]))
|
||||
replystr = 'parted ' + channel
|
||||
replystr = 'Parted ' + channel + '.'
|
||||
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.privmsg(replypath, 'Quitting...')
|
||||
connection.quit(' '.join(whats[1:]))
|
||||
self.save_config()
|
||||
sys.exit()
|
||||
@ -118,7 +118,7 @@ class IrcAdmin(Module):
|
||||
channelset = set(self.config.get(self.__class__.__name__, 'autojoin').split(','))
|
||||
channelset.add(channel)
|
||||
self.config.set(self.__class__.__name__, 'autojoin', ','.join(channelset))
|
||||
replystr = 'added ' + channel + ' to autojoin'
|
||||
replystr = 'Added ' + channel + ' to autojoin.'
|
||||
return self.reply(connection, replypath, replystr)
|
||||
except NoOptionError: pass
|
||||
elif whats[1] == 'remove':
|
||||
@ -129,14 +129,14 @@ class IrcAdmin(Module):
|
||||
channelset = set(self.config.get(self.__class__.__name__, 'autojoin').split(','))
|
||||
channelset.discard(channel)
|
||||
self.config.set(self.__class__.__name__, 'autojoin', ','.join(channelset))
|
||||
replystr = 'removed ' + channel + ' from autojoin'
|
||||
replystr = 'Removed ' + channel + ' from autojoin.'
|
||||
return self.reply(connection, replypath, replystr)
|
||||
except NoOptionError: pass
|
||||
|
||||
def sub_save_config(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
|
||||
with open('dr.botzo.cfg', 'w') as cfg:
|
||||
self.config.write(cfg)
|
||||
replystr = 'saved config file'
|
||||
replystr = 'Saved config file.'
|
||||
return self.reply(connection, replypath, replystr)
|
||||
|
||||
def sub_change_nick(self, connection, event, nick, userhost, replypath, what, admin_unlocked):
|
||||
|
Loading…
Reference in New Issue
Block a user