mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Username was broken.
This commit is contained in:
parent
407952f5a0
commit
f1cbd065f3
13
src/User.py
13
src/User.py
@ -288,14 +288,23 @@ class User(callbacks.Privmsg):
|
||||
setpassword = wrap(setpassword, [getopts({'hashed':''}), 'otherUser',
|
||||
'something', 'something'])
|
||||
|
||||
def username(self, irc, msg, args, user):
|
||||
def username(self, irc, msg, args, hostmask):
|
||||
"""<hostmask|nick>
|
||||
|
||||
Returns the username of the user specified by <hostmask> or <nick> if
|
||||
the user is registered.
|
||||
"""
|
||||
if ircutils.isNick(nickOrHostmask):
|
||||
try:
|
||||
hostmask = irc.state.nickToHostmask(hostmask)
|
||||
except KeyError:
|
||||
irc.error('I haven\'t seen %s.' % nick, Raise=True)
|
||||
try:
|
||||
user = ircdb.users.getUser(hostmask)
|
||||
irc.reply(user.name)
|
||||
username = wrap(username, ['otherUser'])
|
||||
except KeyError:
|
||||
irc.error('I don\'t know who that is.')
|
||||
username = wrap(username, [first('nick', 'hostmask')])
|
||||
|
||||
def hostmasks(self, irc, msg, args, name):
|
||||
"""[<name>]
|
||||
|
Loading…
Reference in New Issue
Block a user