mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 10:34:19 +01:00
Fix a typo and remove extraneous whitespace
This commit is contained in:
parent
70efdfbea1
commit
9d4b715004
@ -79,7 +79,7 @@ conf.registerUserValue(conf.users.plugins.Note, 'notifyWithNotice',
|
|||||||
|
|
||||||
class Ignores(registry.SpaceSeparatedListOfStrings):
|
class Ignores(registry.SpaceSeparatedListOfStrings):
|
||||||
List = ircutils.IrcSet
|
List = ircutils.IrcSet
|
||||||
|
|
||||||
conf.registerUserValue(conf.users.plugins.Note, 'ignores', Ignores([], ''))
|
conf.registerUserValue(conf.users.plugins.Note, 'ignores', Ignores([], ''))
|
||||||
|
|
||||||
class NoteDb(plugins.DBHandler):
|
class NoteDb(plugins.DBHandler):
|
||||||
@ -102,7 +102,7 @@ class NoteDb(plugins.DBHandler):
|
|||||||
)""")
|
)""")
|
||||||
db.commit()
|
db.commit()
|
||||||
return db
|
return db
|
||||||
|
|
||||||
class Note(callbacks.Privmsg):
|
class Note(callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
@ -158,11 +158,11 @@ class Note(callbacks.Privmsg):
|
|||||||
return ircdb.users.getUserId(name)
|
return ircdb.users.getUserId(name)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
hostmask = irc.state.nickToHosmtask(name)
|
hostmask = irc.state.nickToHostmask(name)
|
||||||
return ircdb.users.getUserId(hostmask)
|
return ircdb.users.getUserId(hostmask)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def send(self, irc, msg, args):
|
def send(self, irc, msg, args):
|
||||||
"""<recipient>,[<recipient>,[...]] <text>
|
"""<recipient>,[<recipient>,[...]] <text>
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ class Note(callbacks.Privmsg):
|
|||||||
badnames.append(name)
|
badnames.append(name)
|
||||||
irc.errorNoUser(name=utils.commaAndify(badnames, And='or'))
|
irc.errorNoUser(name=utils.commaAndify(badnames, And='or'))
|
||||||
return
|
return
|
||||||
|
|
||||||
for name in names:
|
for name in names:
|
||||||
if senderName in self.userValue('ignores', name):
|
if senderName in self.userValue('ignores', name):
|
||||||
badnames.append(name)
|
badnames.append(name)
|
||||||
@ -245,7 +245,7 @@ class Note(callbacks.Privmsg):
|
|||||||
irc.error('That note has been read already.')
|
irc.error('That note has been read already.')
|
||||||
else:
|
else:
|
||||||
irc.error('That note wasn\'t sent by you.')
|
irc.error('That note wasn\'t sent by you.')
|
||||||
|
|
||||||
|
|
||||||
def note(self, irc, msg, args):
|
def note(self, irc, msg, args):
|
||||||
"""<note id>
|
"""<note id>
|
||||||
@ -325,7 +325,7 @@ class Note(callbacks.Privmsg):
|
|||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.errorNoUser()
|
irc.errorNoUser()
|
||||||
|
|
||||||
def list(self, irc, msg, args):
|
def list(self, irc, msg, args):
|
||||||
"""[--{old,sent}] [--{from,to} <user>]
|
"""[--{old,sent}] [--{from,to} <user>]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user