X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/0732aa7d06758ad9b4bed155f7bbf11ff8d6f61c..211567363bd8bfbd70cef81e4208ea02d49ebb55:/nick/nick.c diff --git a/nick/nick.c b/nick/nick.c index 1b7dcadf..f04f1df1 100644 --- a/nick/nick.c +++ b/nick/nick.c @@ -51,7 +51,7 @@ const flag accountflags[] = { { 'd', AFLAG_DEVELOPER }, { '\0', 0 } }; -#define nickhash(x) ((crc32i(x))%NICKHASHSIZE) +#define nickhash(x) ((irc_crc32i(x))%NICKHASHSIZE) nick *nicktable[NICKHASHSIZE]; nick **servernicks[MAXSERVERS]; @@ -79,7 +79,7 @@ void _init() { * before we register all our hooks which would otherwise get called * during the disconnect. */ if (connected) { - irc_send("%s SQ %s 0 :Resync [adding nick support]",mynumeric->content,myserver->content); irc_disconnected(); + irc_send("%s SQ %s 0 :Resync [adding nick support]",mynumeric->content,myserver->content); irc_disconnected(0); } /* Register our hooks */ @@ -175,6 +175,9 @@ void handleserverchange(int hooknum, void *arg) { void deletenick(nick *np) { nick **nh; + /* Fire a pre-lostnick trigger to allow hooks to check the channels etc. of a lost nick */ + triggerhook(HOOK_NICK_PRE_LOSTNICK, np); + /* Fire the hook. This will deal with removal from channels etc. */ triggerhook(HOOK_NICK_LOSTNICK, np);