#define NL_MANAGEMENT 0x0001 /* hello, password, userflags, noticeflags */
#define NL_TRUSTS 0x0002 /* trust stuff... */
-#define NL_KICKS 0x0004 /* KICK command */
-#define NL_KILLS 0x0008 /* KILL command */
+#define NL_KICKKILLS 0x0004 /* KICK/KILL command */
+#define NL_MISC 0x0008 /* misc commands (resync, etc) */
#define NL_GLINES 0x0010 /* GLINE commands */
#define NL_HITS 0x0020 /* Where a gline or kill is set automatically by the bot */
#define NL_CLONING 0x0040 /* Clone detection */
#define NL_OPERING 0x0800 /* when someone opers */
#define NL_NOTICES 0x1000 /* turn off to receive privmsgs instead of notices */
#define NL_ALL_COMMANDS 0x2000 /* every single command sent */
-#define NL_MISC 0x4000 /* misc commands */
#endif
#define HOOK_IRC_SENDBURSTSERVERS 102
#define HOOK_IRC_SENDBURSTNICKS 103
#define HOOK_IRC_SENDBURSTBURSTS 104
+#define HOOK_IRC_PRE_DISCON 105
#define HOOK_SERVER_NEWSERVER 200 /* Argument is number of new server */
#define HOOK_SERVER_LOSTSERVER 201 /* Argument is number of lost server */
+#define HOOK_SERVER_END_OF_BURST 202
+#define HOOK_SERVER_PRE_LOSTSERVER 203 /* Argument is number of lost server */
#define HOOK_NICK_NEWNICK 300 /* Argument is nick* */
#define HOOK_NICK_RENAME 301 /* Argument is nick* */
deleteschedule(NULL,&irc_connect,NULL);
deleteschedule(NULL,&sendping,NULL);
scheduleoneshot(time(NULL)+2,&irc_connect,NULL);
+ triggerhook(HOOK_IRC_PRE_DISCON,NULL);
triggerhook(HOOK_IRC_DISCON,NULL);
}
}
/* Send EA */
irc_send("%s EA",mynumeric->content);
Error("server",ERR_INFO,"Acknowledging end of burst");
+ triggerhook(HOOK_SERVER_END_OF_BURST, NULL);
}
return CMD_OK;
/* Set state to SQUITting, then trigger hook */
Error("server",ERR_DEBUG,"Setting link state on %s to LS_SQUIT",serverlist[servernum].name->content);
serverlist[servernum].linkstate=LS_SQUIT;
+
+ /* Until hooks have priorities we need something like this */
+ triggerhook(HOOK_SERVER_PRE_LOSTSERVER,(void *)servernum);
triggerhook(HOOK_SERVER_LOSTSERVER,(void *)servernum);
/* Now delete the actual server */