Eggdev: Re: [eggheads-patches] PATCH:gotnick.patch
Fabian Knittel
fknittel at gmx.de
Fri Oct 6 19:04:58 CST 2000
On Fri, Oct 06, 2000 at 11:17:11PM +0000, Axel Franke wrote:
> this patch removed in gotnick the call to clear_chanlist(); because
> this is cpu-waste. If we set only this m->user to NULL, this would be
> enough.
Agreed.
> +++ eggneu/src/mod/irc.mod/chan.c Fri Oct 6 22:05:11 2000
> @@ -1848,7 +1848,11 @@
> }
> chan = chan->next;
> }
> - clear_chanlist(); /* Cache is meaningless now. */
> + for (chan = chanset; chan; chan = chan->next) {
> + m = ismember(chan, msg);
> + if (m)
> + m->user = NULL;
> + }
> return 0;
> }
... but why don't you simply move this up a few lines into the
actual loop?
+++ eggdrop1.5/src/mod/irc.mod/chan.c Sat Oct 7 02:57:32 2000
@@ -1811,6 +1811,7 @@
m = ismember(chan, nick);
if (m) {
putlog(LOG_JOIN, chan->dname, "Nick change: %s -> %s", \
nick, msg);
+ m->user = NULL;
m->last = now;
if (rfc_casecmp(nick, msg)) {
/* Not just a capitalization change */
Or alternatively, after the check_tcl_nick() call at the very end
of the loop, depending on what kind of behaviour you'd like to
see. Maybe scripts depend on m->user to be set (i.e. the old user
record to be available) - depending on this specific caching
detail would be rather dangerous anyway, though, so maybe we
should force it to be cleared as shown above.
--
Fabian Knittel <fknittel at gmx.de> -- http://www.esc-web.de/fabian/
Signed or encrypted mail preferred. PGP DSA key ID: 0x838B4D20
More information about the Eggdev
mailing list