Updated more replies.

This commit is contained in:
Jeremy Fincher 2004-01-08 15:47:38 +00:00
parent 099b8bc14b
commit 2846b4ab2f
7 changed files with 20 additions and 20 deletions

View File

@ -400,7 +400,7 @@ class ChannelDB(plugins.ChannelDBHandler,
hostmask = irc.state.nickToHostmask(name)
name = ircdb.users.getUserId(hostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
else:
table = 'nick_seen'
criterion = 'normalized=%s'
@ -439,7 +439,7 @@ class ChannelDB(plugins.ChannelDBHandler,
hostmask = irc.state.nickToHostmask(name)
id = ircdb.users.getUserId(hostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
else:
id = ircdb.users.getUserId(name)
@ -544,7 +544,7 @@ class ChannelDB(plugins.ChannelDBHandler,
hostmask = irc.state.nickToHostmask(user)
id = ircdb.users.getUserId(hostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
db = self.getDb(channel)
cursor = db.cursor()

View File

@ -170,7 +170,7 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
try:
id = self._getId(userNickHostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
self.db.setHerald(id, channel, herald)
irc.replySuccess()
@ -188,7 +188,7 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
try:
id = self._getId(userNickHostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
self.db.delHerald(id, channel)
irc.replySuccess()

View File

@ -134,7 +134,7 @@ class Note(callbacks.Privmsg):
hostmask = irc.state.nickToHostmask(name)
toId = ircdb.users.getUserId(hostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
try:
fromId = ircdb.users.getUserId(msg.prefix)

View File

@ -248,7 +248,7 @@ class Topic(callbacks.Privmsg, configurable.Mixin):
try:
senderName = ircdb.users.getUser(msg.prefix).name
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
if name and name != senderName and \
not ircdb.checkCapabilities(msg.prefix, ('op', 'admin')):

View File

@ -244,7 +244,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
ircdb.users.setUser(id, user)
irc.replySuccess()
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
else:
s = 'You can\'t add capabilities you don\'t have.'
irc.error(s)
@ -262,7 +262,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
id = ircdb.users.getUserId(name)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
try:
user.removeCapability(capability)

View File

@ -411,7 +411,7 @@ class Channel(callbacks.Privmsg):
ircdb.users.setUser(id, user)
irc.replySuccess()
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
addcapability = privmsgs.checkChannelCapability(addcapability,'op')
def removecapability(self, irc, msg, args, channel):
@ -431,7 +431,7 @@ class Channel(callbacks.Privmsg):
ircdb.users.setUser(id, user)
irc.replySuccess()
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
removecapability = privmsgs.checkChannelCapability(removecapability, 'op')
def setdefaultcapability(self, irc, msg, args, channel):

View File

@ -187,7 +187,7 @@ class User(callbacks.Privmsg):
id = ircdb.users.getUserId(name)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
try:
otherId = ircdb.users.getUserId(hostmask)
@ -218,7 +218,7 @@ class User(callbacks.Privmsg):
id = ircdb.users.getUserId(name)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
if user.checkHostmask(msg.prefix) or user.checkPassword(password):
try:
@ -251,7 +251,7 @@ class User(callbacks.Privmsg):
id = ircdb.users.getUserId(name)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
if user.checkPassword(oldpassword):
user.setPassword(newpassword, hashed=hashed)
@ -271,13 +271,13 @@ class User(callbacks.Privmsg):
try:
hostmask = irc.state.nickToHostmask(hostmask)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
try:
user = ircdb.users.getUser(hostmask)
irc.reply(user.name)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
def hostmasks(self, irc, msg, args):
"""[<name>]
@ -299,7 +299,7 @@ class User(callbacks.Privmsg):
user = ircdb.users.getUser(name)
irc.reply(repr(user.hostmasks))
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
else:
irc.reply(repr(user.hostmasks))
except KeyError:
@ -319,7 +319,7 @@ class User(callbacks.Privmsg):
user = ircdb.users.getUser(name)
irc.reply('[%s]' % ', '.join(user.capabilities))
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
def identify(self, irc, msg, args):
"""<name> <password>
@ -334,7 +334,7 @@ class User(callbacks.Privmsg):
id = ircdb.users.getUserId(name)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
if user.checkPassword(password):
try:
@ -356,7 +356,7 @@ class User(callbacks.Privmsg):
id = ircdb.users.getUserId(msg.prefix)
user = ircdb.users.getUser(id)
except KeyError:
irc.error(conf.replyNoUser)
irc.errorNoUser()
return
user.unsetAuth()
ircdb.users.setUser(id, user)