[IRCServices Coding] Finding the modes set via channel mode change

Andrew Church achurch at achurch.org
Thu Mar 30 13:01:23 PST 2006


>1.  I can't find out how to get the channel mode changes that were made to
>the channel using the "channel mode change" callback:
>static int do_channel_mode_change(const char *source, Channel *c);

     The callback only informs you of the fact that the modes have changed.
If you want to know exactly what has changed, you'll need to keep your own
copy of the modes (c->mode) for each channel.  I may change this for 5.1.

>2.  This module logs user joins but everytime ircservices starts up, the
>join callback is called for each user that is allready in the channel.  I
>tried using is_on_chan() but I guess until services has fully started up, it
>doesn't realize that the users are in the channel.

     This is because of the way IRC works: when a server joins the network,
all users are treated as if they had just joined the channels they are in.
There's no way around this without rewriting the IRC protocol.

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/