[IRCServices Coding] Getting Main nickname from a nickgroup ID..

Andrew Church achurch at achurch.org
Tue Dec 9 14:38:05 PST 2003


>i was trying to do this today, some files for my hostserv module have the filenames of that users nickgroup, so the vhost sets on ID.. however, when i did a get_ngi_id(filename), it somehow came out with the error:
>[Dec 09 04:19:01 2003] nickserv/main: Unable to get NickGroupInfo (id 136191691) at hostserv.c:155
>then seg-faulted.. which i thought was kinda bizare, especially concidering the nickgroup in question was 3.. could this be caused by bad casting? or am i doing something wrong? if its either of these, whats the best way to solve it?

     get_ngi_id() takes the numeric nickgroup ID; it looks like you're
passing a string.  The crash is probably you not checking for a NULL
pointer return.

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