sys.setdefaultencoding("utf-8")
sys.stdout = codecs.lookup('utf-8')[-1](sys.stdout)
+
# Find the best reactor
selectWarning = "Unable to install any good reactors (kqueue, epoll, poll).\nWe fell back to using select. You may have scalability problems.\nThis reactor will not support more than 1024 connections at a time."
try:
sys.exit(1)
bestreactor.install()
+import twistfix
+twistfix.main()
# Must load config before everything else
from twisted.internet import reactor, task
from twisted.internet.defer import Deferred
-from tlib.xmlw import Element, jid, component
+from twisted.words.xish.domish import Element
+from twisted.words.protocols.jabber import component
+from twisted.words.protocols.jabber.jid import internJID
+
from debug import LogEvent, INFO, WARN, ERROR
import debug
def onMessage(self, el):
fro = el.getAttribute("from")
try:
- froj = jid.intern(fro)
+ froj = internJID(fro)
except Exception, e:
LogEvent(WARN, "", "Failed stringprep.")
return
fro = el.getAttribute("from")
to = el.getAttribute("to")
try:
- froj = jid.intern(fro)
- toj = jid.intern(to)
+ froj = internJID(fro)
+ toj = internJID(to)
except Exception, e:
LogEvent(WARN, "", "Failed stringprep.")
return