示例#1
0
    def adduser(self):
        if not self.values:
            self.chat("Who are you trying to add?")
            return

        whom = Id(self.lastid)

        if not whom.is_authenticated:
            self.chat("I'm sorry, Dave, I'm afraid I can't do that")
            return

        new_user = Id(self.values[0])
        tmp_pass = str(totp.now())
        new_user.setpassword(tmp_pass, True)

        self.chat('Hi %s, your temporary password is %s. Please set up your user '
        'by identifying yourself to me via private message (.identify %s) and '
        'then changing your password (.passwd <newpass>).' % (new_user.nick,
        tmp_pass, tmp_pass), target=new_user.nick)
示例#2
0
 def _setaccess(self):
     return totp.now()
示例#3
0
 def _setaccess(self):
     return totp.now()