Better RFC compliance.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 31 Aug 2012 15:42:25 +0000 (11:42 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 31 Aug 2012 15:42:25 +0000 (11:42 -0400)
irker

diff --git a/irker b/irker
index 0f5d7c98b0234c58033c689c2276cf18873c7a99..aa83190264b63e06709244d7522e977210e72f39 100755 (executable)
--- a/irker
+++ b/irker
@@ -66,6 +66,11 @@ version = "1.0"
 # this was considered acceptable because IRC (notoriously) has the same
 # problem - there is little point in delivery to a relay that is down or
 # unreliable.
+#
+# This code is strictly compliant to RFC1459, except for the interpretation
+# and use of the DEAF and CHANLIMIT features.  CHANLIMIT is described jn the
+# Internet  RFC draft draft-brocklesby-irc-isupport-03 at
+# <http://www.mirc.com/isupport.html>.
 
 class Connection:
     def __init__(self, irkerd, servername, port):
@@ -160,9 +165,11 @@ class Connection:
             elif self.status == "ready":
                 (channel, message) = self.queue.get()
                 if channel not in self.channels_joined:
-                    self.connection.join("#" + channel)
                     self.channels_joined.append(channel)
-                self.connection.privmsg("#" + channel, message)
+                    if channel[0] not in "#&+":
+                        channel = "#" + channel
+                    self.connection.join(channel)
+                self.connection.privmsg(channel, message)
                 self.last_xmit = time.time()
                 self.irker.debug(1, "XMIT_TTL bump (%s transmission) at %s" % (self.servername, time.asctime()))
                 self.queue.task_done()