BarkerJr barkerjr at barkerjr.net
Mon Apr 26 11:35:52 CDT 2004
Previous message: Eggheads: How to edit the internal channel rejoin timer on aneggdrop?
Next message: Eggheads: About logging in Eggdrop
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--------------------------------------------------------------------------------
> I think it is a numerical value and wouldn't take to much to do so.
Unfortunately, it isn't. It's in a function that is called every 60 seconds.
> I'm not sure which files this relates too but its in one of the
> ".c" files chan.c probobaly, then again I'm not sure.
src/mod/irc.mod/irc.c
Starting on line 677 in 1.6.16rc1.
} else if (!channel_inactive(chan) && !channel_pending(chan))
dprintf(DP_MODE, "JOIN %s %s\n",
(chan->name[0]) ? chan->name : chan->dname,
chan->channel.key[0] ? chan->channel.key : chan->key_prot);
Myself, I'd probably just declare a static char as a counter in that if
statement. For example, if you want it every 7 minutes.
} else if (!channel_inactive(chan) && !channel_pending(chan)) {
static unsigned char ctr;
if (ctr >= 7)
{
dprintf(DP_MODE, "JOIN %s %s\n",
(chan->name[0]) ? chan->name : chan->dname,
chan->channel.key[0] ? chan->channel.key : chan->key_prot);
ctr = 0;
}
else ctr++;
}
On second thought, the code is flawed. With this code, it'll only rejoin every seventh channel in the bot. But, anyways, you get the idea