mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Made sure ChannelPluginTestCase only reworks the message if its command is PRIVMSG.
This commit is contained in:
parent
6476e63f20
commit
0ac86a778d
@ -268,12 +268,15 @@ class ChannelPluginTestCase(PluginTestCase):
|
|||||||
drivers.run()
|
drivers.run()
|
||||||
response = self.irc.takeMsg()
|
response = self.irc.takeMsg()
|
||||||
if response is not None:
|
if response is not None:
|
||||||
|
if response.command == 'PRIVMSG':
|
||||||
args = list(response.args)
|
args = list(response.args)
|
||||||
# Strip off nick: at beginning of response.
|
# Strip off nick: at beginning of response.
|
||||||
if args[1].startswith(self.nick) or \
|
if args[1].startswith(self.nick) or \
|
||||||
args[1].startswith(ircutils.nickFromHostmask(self.prefix)):
|
args[1].startswith(ircutils.nickFromHostmask(self.prefix)):
|
||||||
args[1] = args[1].split(None, 1)[1]
|
args[1] = args[1].split(None, 1)[1]
|
||||||
ret = ircmsgs.privmsg(*args)
|
ret = ircmsgs.privmsg(*args)
|
||||||
|
else:
|
||||||
|
ret = response
|
||||||
else:
|
else:
|
||||||
ret = None
|
ret = None
|
||||||
if self.myVerbose:
|
if self.myVerbose:
|
||||||
|
Loading…
Reference in New Issue
Block a user