# Licensed for distribution under the GPL version 2, check COPYING for details
import utils
-if(utils.checkTwisted()):
- from twisted.xish.domish import Element
- from twisted.words.protocols.jabber import jid
-else:
- from tlib.domish import Element
- from tlib.jabber import jid
from twisted.internet import reactor, task
from debug import LogEvent, INFO, WARN, ERROR
import jabw
ID = el.getAttribute("id")
ulang = utils.getLang(el)
- if config.admins.count(jid.JID(to).userhost()) == 0:
+ if config.admins.count(utils.jid(to).userhost()) == 0:
self.pytrans.discovery.sendIqError(to=to, fro=config.jid, ID=ID, xmlns=disco.COMMANDS, etype="cancel", condition="not-authorized")
return
def incomingIq(self, el):
itype = el.getAttribute("type")
fro = el.getAttribute("from")
- froj = jid.JID(fro)
+ froj = utils.jid(fro)
to = el.getAttribute("to")
ID = el.getAttribute("id")
def incomingIq(self, el):
itype = el.getAttribute("type")
fro = el.getAttribute("from")
- froj = jid.JID(fro)
+ froj = utils.jid(fro)
to = el.getAttribute("to")
ID = el.getAttribute("id")
if(itype != "get" and itype != "error"):
def incomingIq(self, el):
itype = el.getAttribute("type")
fro = el.getAttribute("from")
- froj = jid.JID(fro)
+ froj = utils.jid(fro)
to = el.getAttribute("to")
ID = el.getAttribute("id")