this.selectWindow(w);
if(!this.firstClient) {
this.firstClient = true;
- w.addLine("", "qwebirc v" + QWEBIRC_VERSION + " -- Copyright (C) 2008 Chris Porter. All rights reserved.");
+ w.addLine("", "qwebirc v" + QWEBIRC_VERSION);
+ w.addLine("", "Copyright (C) 2008 Chris Porter. All rights reserved.");
w.addLine("", "http://webchat.quakenet.org/");
+ w.addLine("", "This is BETA quality software, please report bugs to slug@quakenet.org");
}
return w;
},
class BufferOverflowException(Exception):
pass
+class IDGenerationException(Exception):
+ pass
+
def jsondump(fn):
def decorator(*args, **kwargs):
x = fn(*args, **kwargs)
return [False, "Nickname not supplied"]
nick = nick[0]
-
- id = get_session_id()
-
+
+ for i in xrange(10):
+ id = get_session_id()
+ if not Sessions.get(id):
+ break
+ else:
+ raise IDGenerationException()
+
session = IRCSession(id)
- client = ircclient.createIRC(session, nick=nick, ident=ident, ip=ip, realname=nick)
+ client = ircclient.createIRC(session, nick=nick, ident=ident, ip=ip, realname=config.REALNAME)
session.client = client
Sessions[id] = session