HelpMessageHandler filter corrections
darcs-hash:20080520062733-86b55-8c84151b75f97df4df86055f148841753ba18708.gz
This commit is contained in:
1 parent
3d286c3efe
commit
c9f1f19aec
1 file changed
+7
-2
@@ -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