#include "../server/server.h"
#include "../parser/parser.h"
#include "../lib/version.h"
+#include "../lib/ccassert.h"
#include "../core/nsmalloc.h"
#include <stdlib.h>
MODULE_VERSION("");
+CCASSERT(sizeof(host) == sizeof(realname));
+
const flag umodeflags[] = {
{ 'i', UMODE_INV },
{ 'w', UMODE_WALLOPS },
{ 'R', UMODE_REGPRIV },
{ 'I', UMODE_HIDEIDLE },
{ 'P', UMODE_PARANOID },
+ { 'q', UMODE_COMCHANS },
+ { 'Q', UMODE_COMCHANSRESTR },
{ 'C', UMODE_CLOAKED },
{ '\0', 0 } };
for (anp=authnametable[i];anp;anp=anp->next)
anp->nicks=NULL;
- initnickalloc();
initnickhelpers();
memset(nicktable,0,sizeof(nicktable));
memset(servernicks,0,sizeof(servernicks));
* 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 */
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);
freesstring(np->shident); /* freesstring(NULL) is OK */
freesstring(np->sethost);
freesstring(np->opername);
+ freesstring(np->message);
node_decrement_usercount(np->ipnode);
derefnode(iptree, np->ipnode);
nick *tnp;
int j;
+ if (cloaked->cloak_count == 0)
+ return;
+
for(j=0;j<NICKHASHSIZE;j++)
for(tnp=nicktable[j];tnp;tnp=tnp->next)
if (tnp->cloak_extra == cloaked)