Make Topic.add and Topic.change agree on how strict they are with users adding

and changing topic items (i.e., they now both fallback on simply the nick
whenever a registered username is unavailable)
This commit is contained in:
Daniel DiPaolo 2004-02-18 22:36:58 +00:00
parent 0b48743065
commit bfea2fcc3f

View File

@ -245,8 +245,9 @@ class Topic(callbacks.Privmsg):
try: try:
senderName = ircdb.users.getUser(msg.prefix).name senderName = ircdb.users.getUser(msg.prefix).name
except KeyError: except KeyError:
irc.errorNoUser() senderName = msg.nick
return # irc.errorNoUser()
# return
if name and name != senderName and \ if name and name != senderName and \
not ircdb.checkCapabilities(msg.prefix, ('op', 'admin')): not ircdb.checkCapabilities(msg.prefix, ('op', 'admin')):
irc.error('You can only modify your own topics.') irc.error('You can only modify your own topics.')