From: Eric S. Raymond Date: Mon, 1 Oct 2012 05:58:00 +0000 (-0400) Subject: Canonicalize the channel name early. Avoids a very weird bug. X-Git-Tag: 1.3~5 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=333a36ec8f7df3bd71ad18f5be497d1212b0c337;p=irker.git Canonicalize the channel name early. Avoids a very weird bug. --- diff --git a/irkerd b/irkerd index d0bc8ff..598017b 100755 --- a/irkerd +++ b/irkerd @@ -204,8 +204,6 @@ class Connection: (channel, message) = self.queue.get() if channel not in self.channels_joined: self.channels_joined.append(channel) - if channel[0] not in "#&+": - channel = "#" + channel self.connection.join(channel) for segment in message.split("\n"): self.connection.privmsg(channel, segment) @@ -239,6 +237,8 @@ class Target(): ircport = 6667 self.servername = irchost self.channel = parsed.path.lstrip('/') + if self.channel[0] not in "#&+": + self.channel = "#" + self.channel self.port = int(ircport) def valid(self): "Both components must be present for a valid target."