[IRCServices Coding] Weird stuff with delnick()

Andrew Church achurch at achurch.org
Fri Sep 27 11:46:44 PDT 2002


     ngi->mainnick will temporarily be set to -1 on deleting the last nick,
but since the nickgroup will be deleted immediately afterward this isn't a
problem.  ngi->nicks_count-- is done by the ARRAY_REMOVE macro.

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

>Hi,
>
>I used delnick() in one of my modules and I saw that it checks whether
>ngi->nicks_count == 0, and if it's the case, removes the whole
>nickgroupinfo.
>Although, I called delnick() with the only nick in a group, but the
>reference to the according ngi remained valid and ngi->mainnick was set to
>65536 (0-1 in unsigned short).
>Isn't there a ngi->nicks_count-- missing somewhere in
>modules/nickserv/util.c:delnick() ?
>
>Georges
>
>------------------------------------------------------------------
>To unsubscribe or change your subscription options, visit:
>http://www.ircservices.za.net/mailman/listinfo/ircservices-coding