From: Eric S. Raymond Date: Sun, 7 Oct 2012 01:00:18 +0000 (-0400) Subject: Sending to nick URLs is now supported. X-Git-Tag: 1.8~3 X-Git-Url: http://git.tremily.us/?p=irker.git;a=commitdiff_plain;h=b6c5ca7566ba44994d2dc446750988450970e8a7 Sending to nick URLs is now supported. --- diff --git a/NEWS b/NEWS index dbb599f..266c036 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ irker history +1.8 @ + It's now possible to send to nick URLs. + 1.7 @ 2012-10-05 This is a stable release. Optional metadata filtering with a user-specified command. diff --git a/irkerd b/irkerd index 9aeb4ea..0dd5835 100755 --- a/irkerd +++ b/irkerd @@ -104,6 +104,8 @@ except ImportError: # DEAF and CHANLIMIT and (obsolete) MAXCHANNELS features. CHANLIMIT # is as described in the Internet RFC draft # draft-brocklesby-irc-isupport-03 at . +# The ",isnick" feature is as described in +# . class Connection: def __init__(self, irkerd, servername, port): @@ -292,7 +294,10 @@ class Target(): # got kicked, and irkerd crashed because the server returned # "#channel" in the notification that our kick handler saw. self.channel = parsed.path.lstrip('/').lower() - if self.channel and self.channel[0] not in "#&+": + isnick = self.channel.endswith(",isnick") + if isnick: + self.channel = self.channel[:-7] + if self.channel and not isnick and self.channel[0] not in "#&+": self.channel = "#" + self.channel self.port = int(ircport) def valid(self): diff --git a/irkerd.xml b/irkerd.xml index ec418a0..0e5b296 100644 --- a/irkerd.xml +++ b/irkerd.xml @@ -43,9 +43,11 @@ Examples: {"to":"irc://chat.hypothetical.net:6668/git-ciabot", "privmsg":"Hello, world!"} -If the channel part of the URL does not have one of the prefix characters -#, &, or +, a # -will be prepended to it before shipping. +If the channel part of the URL does not have one of the prefix +characters #, &, or ++, a # will be prepended to it before +shipping - unlessthe channel part has the suffix +",isnick" (which is unconditionally removed). The host part of the URL may have a port-number suffix separated by a colon, as shown in the third example; otherwise