HelpMessageHandler filter corrections
darcs-hash:20080520062733-86b55-8c84151b75f97df4df86055f148841753ba18708.gz
This commit is contained in:
@@ -72,8 +72,13 @@ class HelpMessageHandler(Handler):
|
|||||||
"""
|
"""
|
||||||
Test if stanza body match the help regexp.
|
Test if stanza body match the help regexp.
|
||||||
"""
|
"""
|
||||||
return self.help_regexp.search(stanza.get_body()) \
|
body = stanza.get_body()
|
||||||
or self.help_regexp.search(stanza.get_subject())
|
subject = stanza.get_subject()
|
||||||
|
if subject and self.help_regexp.search(subject):
|
||||||
|
return subject
|
||||||
|
if body and self.help_regexp.search(body):
|
||||||
|
return body
|
||||||
|
return None
|
||||||
|
|
||||||
def handle(self, stanza, lang_class, data):
|
def handle(self, stanza, lang_class, data):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user