mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Code cleanup.
This commit is contained in:
parent
dadc37149f
commit
b04f6166a3
@ -188,8 +188,7 @@ class Note(callbacks.Privmsg):
|
|||||||
id = id.lstrip('#')
|
id = id.lstrip('#')
|
||||||
return int(id)
|
return int(id)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error('That\'s not a valid note id.')
|
irc.error('That\'s not a valid note id.', Raise=True)
|
||||||
return None
|
|
||||||
|
|
||||||
def send(self, irc, msg, args):
|
def send(self, irc, msg, args):
|
||||||
"""<recipient>,[<recipient>,[...]] <text>
|
"""<recipient>,[<recipient>,[...]] <text>
|
||||||
@ -242,8 +241,6 @@ class Note(callbacks.Privmsg):
|
|||||||
if not args:
|
if not args:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
id = self._validId(irc, args[0])
|
id = self._validId(irc, args[0])
|
||||||
if not id:
|
|
||||||
return
|
|
||||||
args.append('(in reply to #%s)' % id)
|
args.append('(in reply to #%s)' % id)
|
||||||
note = self.db.get(id)
|
note = self.db.get(id)
|
||||||
to = self.db.get(id).frm
|
to = self.db.get(id).frm
|
||||||
@ -269,8 +266,6 @@ class Note(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
id = privmsgs.getArgs(args)
|
id = privmsgs.getArgs(args)
|
||||||
id = self._validId(irc, id)
|
id = self._validId(irc, id)
|
||||||
if id is None:
|
|
||||||
return
|
|
||||||
note = self.db.get(id)
|
note = self.db.get(id)
|
||||||
if note.frm == userid:
|
if note.frm == userid:
|
||||||
if not note.read:
|
if not note.read:
|
||||||
@ -304,8 +299,6 @@ class Note(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
id = privmsgs.getArgs(args)
|
id = privmsgs.getArgs(args)
|
||||||
id = self._validId(irc, id)
|
id = self._validId(irc, id)
|
||||||
if id is None:
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
note = self.db.get(id)
|
note = self.db.get(id)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Loading…
Reference in New Issue
Block a user