[IRCServices Coding] possible bug in SJOIN when using CSSetChanneltime

Jon Christopherson jon at jons.org
Tue Apr 27 07:46:23 PDT 2004


Hello,

	I have noticed that with bahamut, and hybrid as well that services
doesn't restore mlock'ed modes upon a initial join when using the
CSSetChanneltime option.

	When services sends the SJOIN to set the channel TS, it recreates
the channel and removed any modes set by ChanServ when restoring modes. This
can be seen below:

[08:29] * Now talking in #emerald
[08:29] * irc.test.net sets mode: +nt
[08:29] * ChanServ sets mode: +s
[08:29] * services.test.net sets mode: -o ThaPrince
[08:29] -irc.test.net:#emerald- *** Notice -- TS for #emerald changed from
1083076622 to 1083076256
[08:29] * services.test.net sets mode: -nts
[08:29] * ChanServ changes topic to 'm00.'
[08:29] * ChanServ sets mode: +o ThaPrince

	As you can see I am now left with a channel with no modes at all, as
the SJOIN didn't specify any modes:

send_cmd(ServerName, "SJOIN %ld %s + :%s%s",
                     (long)c->creation_time, c->name,
                     (modes & CUMODE_o ? "@" : ""), u->nick);


	I believe either adding the mlocked modes to the SJOIN or have the
check for mlocked modes done again(or moved to after the SJOIN) when using
this feature.

	Regards,

	Jon Christopherson