From 333a36ec8f7df3bd71ad18f5be497d1212b0c337 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 1 Oct 2012 01:58:00 -0400 Subject: [PATCH] Canonicalize the channel name early. Avoids a very weird bug. --- irkerd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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." -- 2.26.2