# HG changeset patch # User Santeri Piippo # Date 1402609749 -10800 # Node ID dd467db4b18e25bde7d69db6f1a53970ad8bdbe7 # Parent 438dc247ceb9d667cd88d85d56ff0ad4d864a224 - made conflictsuffix configurable diff -r 438dc247ceb9 -r dd467db4b18e cobalt.py --- a/cobalt.py Fri Jun 13 00:25:52 2014 +0300 +++ b/cobalt.py Fri Jun 13 00:49:09 2014 +0300 @@ -145,6 +145,10 @@ self.umode = cfg['umode'] if 'umode' in cfg else '' self.cfg = cfg self.mynick = '' + + if not 'conflictsuffix' in self.cfg: + self.cfg['conflictsuffix'] = '`' + self.desired_name = self.cfg['nickname'] if 'nickname' in self.cfg else g_config['nickname'] g_clients.append (self) asyncore.dispatcher.__init__ (self) @@ -218,7 +222,7 @@ self.write ("NICK %s" % self.mynick) elif words[1] == "433": #:irc.localhost 433 * cobalt :Nickname is already in use. - self.mynick = '%s_' % self.mynick + self.mynick = '%s%s' % (self.mynick, self.cfg['conflictsuffix']) self.write ("NICK %s" % self.mynick) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #