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