Fix bug #1054660, Optional password argument needs to be defaulted to ''

instead of None
This commit is contained in:
James Vega 2004-10-26 15:43:58 +00:00
parent 3da0af997d
commit 7c8882e30e

View File

@ -149,7 +149,7 @@ class User(callbacks.Privmsg):
ircdb.users.delUser(user.id) ircdb.users.delUser(user.id)
irc.replySuccess() irc.replySuccess()
unregister = wrap(unregister, ['private', 'otherUser', unregister = wrap(unregister, ['private', 'otherUser',
additional('something')]) additional('something', '')])
def changename(self, irc, msg, args, user, newname, password): def changename(self, irc, msg, args, user, newname, password):
"""<name> <new name> [<password>] """<name> <new name> [<password>]
@ -170,7 +170,7 @@ class User(callbacks.Privmsg):
ircdb.users.setUser(user) ircdb.users.setUser(user)
irc.replySuccess() irc.replySuccess()
changename = wrap(changename, ['private', 'otherUser', 'something', changename = wrap(changename, ['private', 'otherUser', 'something',
additional('something')]) additional('something', '')])
def addhostmask(self, irc, msg, args, user, hostmask, password): def addhostmask(self, irc, msg, args, user, hostmask, password):
"""[<name>] [<hostmask>] [<password>] """[<name>] [<hostmask>] [<password>]
@ -195,7 +195,7 @@ class User(callbacks.Privmsg):
Raise=True) Raise=True)
try: try:
otherId = ircdb.users.getUserId(hostmask) otherId = ircdb.users.getUserId(hostmask)
if otherId != id: if otherId != user.id:
irc.error('That hostmask is already registered.', Raise=True) irc.error('That hostmask is already registered.', Raise=True)
except KeyError: except KeyError:
pass pass
@ -220,7 +220,7 @@ class User(callbacks.Privmsg):
irc.replySuccess() irc.replySuccess()
addhostmask = wrap(addhostmask, [first('otherUser', 'user'), addhostmask = wrap(addhostmask, [first('otherUser', 'user'),
optional('something'), optional('something'),
additional('something')]) additional('something', '')])
def removehostmask(self, irc, msg, args, user, hostmask, password): def removehostmask(self, irc, msg, args, user, hostmask, password):
"""<name> <hostmask> [<password>] """<name> <hostmask> [<password>]
@ -250,7 +250,7 @@ class User(callbacks.Privmsg):
ircdb.users.setUser(user) ircdb.users.setUser(user)
irc.replySuccess(s) irc.replySuccess(s)
removehostmask = wrap(removehostmask, ['private', 'otherUser', 'something', removehostmask = wrap(removehostmask, ['private', 'otherUser', 'something',
additional('something')]) additional('something', '')])
def setpassword(self, irc, msg, args, optlist, user, password,newpassword): def setpassword(self, irc, msg, args, optlist, user, password,newpassword):
"""[--hashed] <name> <old password> <new password> """[--hashed] <name> <old password> <new password>