]> code.delx.au - pymsnt/blobdiff - src/main.py
Handle some errors better.
[pymsnt] / src / main.py
index 8dca203aeb2e64a9518a79c633786fe14bcb6208..56f88130e1826e8c3fa28bd75756ea9d8fbe5346 100644 (file)
@@ -7,7 +7,7 @@ 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."
+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:
        from twisted.internet import epollreactor as bestreactor
 except:
@@ -96,6 +96,7 @@ from tlib.xmlw import Element, jid, component
 from debug import LogEvent, INFO, WARN, ERROR
 
 import debug
+import svninfo
 import utils
 import xdb
 import avatar
@@ -114,11 +115,15 @@ import housekeep
 class PyTransport(component.Service):
        def __init__(self):
                LogEvent(INFO)
+               try:
+                       LogEvent(INFO, msg="SVN r" + str(svninfo.getSVNVersion()))
+               except:
+                       pass
 
                # Discovery, as well as some builtin features
                self.discovery = disco.ServerDiscovery(self)
-               self.discovery.addIdentity("gateway", legacy.id, legacy.name, config.jid)
-               self.discovery.addIdentity("conference", "text", legacy.name + " Chatrooms", config.jid)
+               self.discovery.addIdentity("gateway", legacy.id, config.discoName, config.jid)
+               self.discovery.addIdentity("conference", "text", config.discoName + " Chatrooms", config.jid)
                self.discovery.addFeature(disco.XCONFERENCE, None, config.jid) # So that clients know you can create groupchat rooms on the server
                self.discovery.addFeature("jabber:iq:conference", None, config.jid) # We don't actually support this, but Psi has a bug where it looks for this instead of the above
                self.discovery.addIdentity("client", "pc", "MSN Messenger", "USER")