[ircd-ratbox] join messages aren't properly formatted

Lee H lee at leeh.co.uk
Tue Dec 29 14:52:31 UTC 2009


On Thu, Dec 24, 2009 at 09:38:47PM -0600, Nick Manley wrote:
> According to RFC 2812, here is what the join message from the server should be:
> 
> :WiZ!jto at tolsun.oulu.fi JOIN #Twilight_zone
> 
> However, on EFNet, using ircd-ratbox 3.0.4, it has the channel name as
> a trailing parameter (preceded by a colon) instead of as a middle
> parameter.  Meaning it looks like this.
> 
> :WiZ!jto at tolsun.oulu.fi JOIN :#Twilight_zone
> 
> Is this a bug in ircd-ratbox or is this an accepted form?  I'm in the
> process of writing my own IRC client and I encountered a bug because
> of this.  mIRC seems to handle it just fine which made me wonder if
> mIRC is also not adhering to the standard as strictly, or if there is
> another standard that I'm unaware of that allows this.  Thank you all
> for your help.

It's not a bug..

First, RFC2810-RFC2813 refer to ircnets ircd only, there are lots of
concepts and features in them that don't apply to other ircds.  RFC1459 is
more generic, but being also a lot older it's rare to find any ircd that
follows it to the letter.


Secondly, RFC1459 is a good case in point of not using the examples as a
definitive list.  Take the example in the JOIN section for a user joining 
a channel:
":WiZ JOIN #Twilight_zone"

A server would never send that to a client nowadays -- because then the 
client wouldn't have the user at host information.  It sends the form from
your RFC2812 example above, :nick!user at host.  

Whilst :n!u at h JOIN isn't an example in RFC1459 it is perfectly valid by the
ABNF at the top of the RFC, so be careful of relying on the examples too
much.


My ABNF has never been particularly good but I seem to remember that the
way RFC1459 defines parameters, in situations where the final parameter
doesn't contain a space, adding a colon to differentiate it between a
middle/trailing parameter is optional as they are equivalent.

ircd does this -- if you send "PRIVMSG #channel hi" the ircd will not care
there is no ':' character in front of 'hi', because in that situation it
isn't actually required.  They would all accept it, and send the message to
the channel.

You're likely to find usage of ':' is varied across all ircds, as it's
one of those things ircd coders expect clients to handle generically..


Ultimately, take the words in RFC1122 (amongst other places):
      1.2.2  Robustness Principle

      At every layer of the protocols, there is a general rule whose
      application can lead to enormous benefits in robustness and
      interoperability [IP:1]:

      "Be liberal in what you accept, and conservative in what you send"


Cheers,

-- 
-                 Lee H // anfl
-        I code, therefore I break things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.ratbox.org/pipermail/ircd-ratbox/attachments/20091229/febe4594/attachment.pgp>


More information about the ircd-ratbox mailing list