diff options
author | diSabler <dissy@ya.ru> | 2013-09-25 20:38:36 +0400 |
---|---|---|
committer | diSabler <dissy@ya.ru> | 2013-09-25 20:38:36 +0400 |
commit | ce43151c934cda9cf92cc3b54e746882c9a6a314 (patch) | |
tree | 8cdb471acffa964c4281d79ae671380543e4ee75 | |
parent | 8edba8dba1b0884b79f75c43af85473196ec977e (diff) |
fix: ugly presence from miranda in muc-filter
-rw-r--r-- | plugins/mucfilter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mucfilter.py b/plugins/mucfilter.py index a4d2954..a330b22 100644 --- a/plugins/mucfilter.py +++ b/plugins/mucfilter.py @@ -431,7 +431,7 @@ def muc_filter_set(iq,id,room,acclvl,query,towh,al): except: bl_nick = None is_bl = None if bl_jid and re.findall(bl_jid,jid,re.S+re.U+re.I): is_bl = True - if not is_bl and bl_nick and re.findall(bl_nick,nick,re.S+re.U+re.I): is_bl = True + if not nick or (not is_bl and bl_nick and re.findall(bl_nick,nick,re.S+re.U+re.I)): is_bl = True if is_bl: muc_pprint('MUC-Filter blacklist: %s/%s %s' % (gr,nick,jid),'brown') msg,mute = unicode(xmpp.Node('presence', {'from': tojid, 'type': 'error', 'to':jid}, payload = ['replace_it',xmpp.Node('error', {'type': 'auth','code':'403'}, payload=[xmpp.Node('forbidden',{'xmlns':'urn:ietf:params:xml:ns:xmpp-stanzas'},[]),xmpp.Node('text',{'xmlns':'urn:ietf:params:xml:ns:xmpp-stanzas'},[L('Deny by blacklist!',rn)])])])).replace('replace_it',get_tag(msg,'presence')),True |