def password(self, irc, msg, args, nick, password): """<nick> [<password>] Sets the NickServ password for <nick> to <password>. If <password> is not given, removes <nick> from the configured nicks. """ if not password: try: self.registryValue('nicks').remove(nick) irc.replySuccess() except KeyError: irc.error('That nick was not configured with a password.') return else: self.registryValue('nicks').add(nick) config.registerNick(nick, password) irc.replySuccess()
def __init__(self, irc): self.__parent = super(Services, self) self.__parent.__init__(irc) for nick in self.registryValue('nicks'): config.registerNick(nick) self.reset()