from twisted.internet import default as bestreactor
print selectWarning
except:
- print "Unable to find a reactor.\nExiting..."
+ print "Unable to find a reactor. Please make sure you have Twisted properly installed.\nExiting..."
sys.exit(1)
bestreactor.install()
elif ptype and (ptype.startswith("subscribe") or ptype.startswith("unsubscribe")):
# They haven't logged in, and are trying to change subscription to a user
+ # No, lets not log them in. Lets send an error :)
+ jabw.sendPresence(self, fro, to, ptype="error")
+
# Lets log them in and then do it
- LogEvent(INFO, "", "Attempting to create a session to do subscription stuff.")
- s = session.makeSession(self, froj.userhost(), ulang)
- if s:
- self.sessions[froj.userhost()] = s
- LogEvent(INFO, "", "New session created.")
- # Tell the session there's a new resource
- s.handleResourcePresence(froj.userhost(), froj.resource, toj.userhost(), toj.resource, 0, None, None, None)
- # Send this subscription
- s.onPresence(el)
+ #LogEvent(INFO, "", "Attempting to create a session to do subscription stuff.")
+ #s = session.makeSession(self, froj.userhost(), ulang)
+ #if s:
+ # self.sessions[froj.userhost()] = s
+ # LogEvent(INFO, "", "New session created.")
+ # # Tell the session there's a new resource
+ # s.handleResourcePresence(froj.userhost(), froj.resource, toj.userhost(), toj.resource, 0, None, None, None)
+ # # Send this subscription
+ # s.onPresence(el)
class App: