Response class is now part of 'more' module.
This commit prepare the new message flow based on protocol independent messages. This commit changes the module API: you need to import the Response class manually at the begining of our module.
This commit is contained in:
parent
8f620b9756
commit
41da1c0780
37 changed files with 257 additions and 233 deletions
|
|
@ -20,7 +20,8 @@ import re
|
|||
|
||||
from exception import IRCException
|
||||
import hooks
|
||||
from response import Response
|
||||
|
||||
from message import Message
|
||||
|
||||
class MessageHook(hooks.AbstractHook):
|
||||
|
||||
|
|
@ -39,8 +40,8 @@ class MessageHook(hooks.AbstractHook):
|
|||
|
||||
|
||||
def match(self, message, server=None):
|
||||
if isinstance(message, Response):
|
||||
return self.is_matching(None, message.channel, server)
|
||||
if not isinstance(message, Message):
|
||||
return True
|
||||
|
||||
elif message.qual == "cmd":
|
||||
return self.is_matching(message.cmds[0], message.channel, server)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue