Fri, 13 Jun 2014 00:49:09 +0300
- made conflictsuffix configurable
cobalt.py | file | annotate | diff | comparison | revisions |
--- 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) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #