Skip to content
Snippets Groups Projects
Commit 333a36ec authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Canonicalize the channel name early. Avoids a very weird bug.

parent 90638662
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment