mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Fixed doPrivmsg and added more useful error messages
This commit is contained in:
parent
43fbbb9b70
commit
f8c85b07bc
@ -144,6 +144,7 @@ class Notes(callbacks.Privmsg):
|
|||||||
name = ircdb.users.getUserName(msg.prefix)
|
name = ircdb.users.getUserName(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
callbacks.Privmsg.doPrivmsg(self, irc, msg)
|
callbacks.Privmsg.doPrivmsg(self, irc, msg)
|
||||||
|
return
|
||||||
cursor = self.db.cursor()
|
cursor = self.db.cursor()
|
||||||
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
cursor.execute("""SELECT COUNT(*) FROM notes, users
|
||||||
WHERE users.name=%s AND
|
WHERE users.name=%s AND
|
||||||
@ -205,7 +206,7 @@ class Notes(callbacks.Privmsg):
|
|||||||
sender = ircdb.users.getUserName(msg.prefix)
|
sender = ircdb.users.getUserName(msg.prefix)
|
||||||
senderId = self.getUserId(sender)
|
senderId = self.getUserId(sender)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNotRegistered)
|
||||||
return
|
return
|
||||||
cursor = self.db.cursor()
|
cursor = self.db.cursor()
|
||||||
cursor.execute("""SELECT notes.note, notes.to_id, notes.from_id,
|
cursor.execute("""SELECT notes.note, notes.to_id, notes.from_id,
|
||||||
@ -240,7 +241,7 @@ class Notes(callbacks.Privmsg):
|
|||||||
try:
|
try:
|
||||||
sender = ircdb.users.getUserName(msg.prefix)
|
sender = ircdb.users.getUserName(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNotRegistered)
|
||||||
return
|
return
|
||||||
cursor = self.db.cursor()
|
cursor = self.db.cursor()
|
||||||
cursor.execute("""SELECT notes.id, notes.from_id,
|
cursor.execute("""SELECT notes.id, notes.from_id,
|
||||||
@ -272,7 +273,7 @@ class Notes(callbacks.Privmsg):
|
|||||||
try:
|
try:
|
||||||
sender = ircdb.users.getUserName(msg.prefix)
|
sender = ircdb.users.getUserName(msg.prefix)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNoUser)
|
irc.error(msg, conf.replyNotRegistered)
|
||||||
return
|
return
|
||||||
cursor = self.db.cursor()
|
cursor = self.db.cursor()
|
||||||
cursor.execute("""SELECT notes.id FROM users, notes
|
cursor.execute("""SELECT notes.id FROM users, notes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user