mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Being able to send a note using the person's current nick instead of needing
to know their ircdb user name is good
This commit is contained in:
parent
67a79c1ce9
commit
852388e8b7
@ -219,7 +219,8 @@ class Note(callbacks.Privmsg):
|
||||
# Make sure the sender isn't being ignored.
|
||||
senderName = ircdb.users.getUser(fromId).name
|
||||
for name in names:
|
||||
if senderName in self.userValue('ignores', name):
|
||||
ignores = self.userValue('ignores', name)
|
||||
if ignores and senderName in ignores:
|
||||
badnames.append(name)
|
||||
if badnames:
|
||||
irc.error('%s %s ignoring notes from you.' % \
|
||||
|
@ -41,6 +41,7 @@ class NoteTestCase(PluginTestCase, PluginDocumentation):
|
||||
# setup a user
|
||||
self.prefix = 'foo!bar@baz'
|
||||
self.assertNotError('register inkedmn bar')
|
||||
self.assertNotError('addhostmask inkedmn test2!bar@baz')
|
||||
|
||||
def testSendnote(self):
|
||||
#print repr(ircdb.users.getUser(self.prefix))
|
||||
@ -51,6 +52,11 @@ class NoteTestCase(PluginTestCase, PluginDocumentation):
|
||||
self.assertError('note send alsdkjfasldk foo')
|
||||
self.assertNotError('note send inkedmn test2')
|
||||
_ = self.getMsg(' ')
|
||||
# verify that sending a note to a user via their nick instead of their
|
||||
# ircdb user name works
|
||||
self.prefix = 'test2!bar@baz'
|
||||
self.assertNotError('note send test2 foo')
|
||||
_ = self.getMsg(' ')
|
||||
|
||||
def testNote(self):
|
||||
self.assertNotError('note send inkedmn test')
|
||||
|
Loading…
Reference in New Issue
Block a user