[IRCServices Coding] Re: Bug or misunderstood ?

|SaMaN| saman at alkol.org
Fri Oct 17 04:53:04 PDT 2003


Also it does not update last_used time on +a flag.

Temporary fix
---------------

edit /modules/chanserv/check.c

find line
-------------------------------------------------------------------------
        local_set_cumodes(c, '+', res & ~modes, user->nick);
-------------------------------------------------------------------------
add below
------------------------------------------------------------------------
        int16 cumode_q = mode_char_to_flag('q',MODE_CHANUSER);
        int16 cumode_a = mode_char_to_flag('a',MODE_CHANUSER);

        if ((res & ~modes) & cumode_q) {
            ci->last_used = time(NULL);
            put_channelinfo(ci);
        }

        if ((res & ~modes) & cumode_a) {
            ci->last_used = time(NULL);
            put_channelinfo(ci);
        }
-------------------------------------------------------------------------
save and compile and run and enjoy :)
-------------------------------------------------------------------------

|SaMaN|

----- Original Message ----- 
From: "|SaMaN|" <saman at alkol.org>
To: <IRCServices-Coding at ircservices.za.net>
Sent: Friday, October 17, 2003 1:07 PM
Subject: Bug or misunderstood ?


> Im using unreal ircd. When channel is empty and if channel owner joins
> his/her registered channel it does
> (ChanServ sets mode: +ntrq nick) but when channel is not empty and if
> channel owner joins his/her registered channel it does (ChanServ sets
mode:
> +oq nick nick). As you see on the first one there is no +o and because of
> this chanserv does not update the last_used time because chanserv is set
to
> update last_used time with +o (CUMODE_o) so channels drop while channel
> owners use them. Is this a bug or my misunderstood ?
>
> ######################################################
> modules/chanserv/check.c
> ...
> void check_chan_user_modes(const char *source, struct c_userlist *u,
>                            Channel *c, int32 oldmodes)
> ...
>         if ((res & ~modes) & CUMODE_o) {
>             ci->last_used = time(NULL);
>             put_channelinfo(ci);
>         }
> ...
> ######################################################
>
> |SaMaN|
>
>