- made conflictsuffix configurable

Fri, 13 Jun 2014 00:49:09 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Fri, 13 Jun 2014 00:49:09 +0300
changeset 8
dd467db4b18e
parent 7
438dc247ceb9
child 9
0604f6b9f781

- 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)
 
 	# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

mercurial