the patch has been pushed to hg anyone using ii, is welcome to test it also, as rransom mentioned on irc, the ':#channel' form is RFC compliant.
thanks for the correction. On 21 June 2012 23:02, Ivan Kanakarakis <ivan.ka...@gmail.com> wrote: > when a random user joins a channel in > which you are already connected, the > server sends a message: > > :someuser JOIN #meow > > some servers (ie oftc) send non-RFC compliant messages like: > > :someuser JOIN :#woof > > this isn't restricted to JOIN messages. > ii handles this in the 'tokenize(..)' function > > however on the case of JOIN ii returns, for the compliant case: > > user(~user@host) has joined (null) > > and redirects that to /ircbasedir/network/out > while on the non-compliant case: > > user(~user@host) has joined (#channel) > > and redirects that to /ircbasedir/network/#channel/out > as it should be. > > this patch fixes this issue, so that join messages are > sent to the correct "out" file, including the channel name > instead of "null". > > the issue is on line 355 > > argv[TOK_CHAN] = argv[TOK_TEXT]; > > if argv[TOK_TEXT] is NULL (which is checked in a conditional > before) then argv[TOK_CHAN] becomes NULL which results > on line 365 the conditional to branch to the wrong 'print_out(..)' > function. > > on the non-compliant case, argv[TOK_TEXT] is not NULL, > but argv[TOK_CHAN] is NULL. > on the compliant case, argv[TOK_TEXT] is NULL, > but arg[TOK_CHAN] is not NULL. > > the attached patch, just checks if argv[TOK_TEXT] is NULL > and if it's not it gives that value to arg[TOK_CHAN], else > arg[TOK_CHAN] is used. > > > one sidenote: > I'm not sure why one needs to check for strchr(argv[TOK_TEXT], ' '); > on the case of a JOIN message. afaict the only text after the JOIN > command should be the channel. > > PS: the diff was generated by 'git diff', but it should work just like 'hg > diff' > $ patch -p1 < joinfix.diff # should just work > > > -- > *Ivan c00kiemon5ter V Kanakarakis* >:3 > > -- *Ivan c00kiemon5ter V Kanakarakis* >:3