irc: fix random nick generation with hex string in case irc_nick is not set
authorEagle[TM] <eagletm@mpex.net>
Fri, 6 Dec 2013 11:30:25 +0000 (12:30 +0100)
committerEagle[TM] <eagletm@mpex.net>
Fri, 6 Dec 2013 11:30:25 +0000 (12:30 +0100)
backends/irc/__init__.py

index cc3f363..80e4a1d 100644 (file)
@@ -39,7 +39,7 @@ class IrcThread(threading.Thread):
         if self.report_host:
             self.host = self.report_host
         if not self.nick:
-            self.nick = Hash(self.report_host)[:10]
+            self.nick = Hash(self.host)[:5].encode("hex")
         self.prepend = 'E_'
         if config.get('server', 'coin') == 'litecoin':
             self.prepend = 'EL_'