diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 21:20:54 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 21:20:54 +0000 |
commit | e46bc26a06cecb72ffe8587ec84997d89b75d852 (patch) | |
tree | 9d005b4f035494962cfbbdfd06a0fd23c9890f1e /include | |
parent | 8aa6436d7380d160d1fc2eb2235d71b57dacea17 (diff) |
Merge commit 'cbx/anopeng-protocol' into anopeng
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1295 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r-- | include/extern.h | 39 | ||||
-rw-r--r-- | include/services.h | 33 |
2 files changed, 9 insertions, 63 deletions
diff --git a/include/extern.h b/include/extern.h index be6d56681..96780dec3 100644 --- a/include/extern.h +++ b/include/extern.h @@ -49,7 +49,7 @@ E CBMode cbmodes[128]; E CBModeInfo *cbmodeinfos; E CUMode cumodes[128]; E char *IRCDModule; -E IRCDProto ircdproto; +E IRCDProto *ircdproto; /**** actions.c ****/ @@ -603,24 +603,7 @@ E int init_secondary(int ac, char **av); E int servernum; /**** ircd.c ****/ -E void pmodule_ircd_proto(IRCDProtoNew *); -E void pmodule_cmd_372(void (*func) (const char *source, const char *msg)); -E void pmodule_cmd_372_error(void (*func) (const char *source)); -E void pmodule_cmd_375(void (*func) (const char *source)); -E void pmodule_cmd_376(void (*func) (const char *source)); -E void pmodule_cmd_351(void (*func) (const char *source)); -E void pmodule_cmd_391(void (*func) (const char *source, const char *timestr)); -E void pmodule_cmd_250(void (*func) (const char *buf)); -E void pmodule_cmd_307(void (*func) (const char *buf)); -E void pmodule_cmd_311(void (*func) (const char *buf)); -E void pmodule_cmd_312(void (*func) (const char *buf)); -E void pmodule_cmd_317(void (*func) (const char *buf)); -E void pmodule_cmd_219(void (*func) (const char *source, const char *letter)); -E void pmodule_cmd_401(void (*func) (const char *source, const char *who)); -E void pmodule_cmd_318(void (*func) (const char *source, const char *who)); -E void pmodule_cmd_242(void (*func) (const char *buf)); -E void pmodule_cmd_243(void (*func) (const char *buf)); -E void pmodule_cmd_211(void (*func) (const char *buf)); +E void pmodule_ircd_proto(IRCDProto *); E void pmodule_ircd_var(IRCDVar * ircdvar); E void pmodule_ircd_cap(IRCDCAPAB * cap); E void pmodule_ircd_version(const char *version); @@ -1135,23 +1118,6 @@ E void notice(char *source, const char *dest, const char *fmt, ...); /******************************************************************************/ -E void anope_cmd_211(const char *fmt, ...); /* 211 */ -E void anope_cmd_219(const char *source, const char *who); /* 219 */ -E void anope_cmd_242(const char *fmt, ...); /* 242 */ -E void anope_cmd_243(const char *fmt, ...); /* 243 */ -E void anope_cmd_250(const char *fmt, ...); /* 250 */ -E void anope_cmd_307(const char *fmt, ...); /* 307 */ -E void anope_cmd_311(const char *fmt, ...); /* 311 */ -E void anope_cmd_312(const char *fmt, ...); /* 312 */ -E void anope_cmd_317(const char *fmt, ...); /* 317 */ -E void anope_cmd_318(const char *source, const char *who); /* 318 */ -E void anope_cmd_351(const char *source); /* 351 */ -E void anope_cmd_372(const char *source, const char *msg); /* 372 */ -E void anope_cmd_372_error(const char *source); /* 372 */ -E void anope_cmd_375(const char *source); /* 375 */ -E void anope_cmd_376(const char *source); /* 376 */ -E void anope_cmd_391(const char *source, const char *timestr); /* 391 */ -E void anope_cmd_401(const char *source, const char *who); /* 401 */ E void anope_cmd_akill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason); /* AKILL */ E void anope_cmd_capab(); /* CAPAB */ E void anope_cmd_chghost(const char *nick, const char *vhost); /* CHGHOST */ @@ -1211,6 +1177,7 @@ E void anope_cmd_eob(); /* EOB - end of burst */ E void anope_cmd_burst(); /* BURST - use eob to send burst 0 */ E void anope_cmd_svswatch(const char *sender, const char *nick, const char *parm); E void anope_cmd_ctcp(const char *source, const char *dest, const char *fmt, ...); /* CTCP */ +E void anope_cmd_numeric(const char *, int, const char *, const char *, ...) FORMAT(printf, 4, 5); /* Numerics */ EI int anope_event_482(const char *source, int ac, const char **av); EI int anope_event_436(const char *source, int ac, const char **av); diff --git a/include/services.h b/include/services.h index 8e0f49167..e63133707 100644 --- a/include/services.h +++ b/include/services.h @@ -1060,31 +1060,6 @@ struct session_ { }; /*************************************************************************/ -/** - * IRCD Protocol module support struct. - * protocol modules register the command they want touse for function X with our set - * functions, we then call the correct function for the anope_ commands. - **/ -typedef struct ircd_proto_ { - void (*ircd_cmd_372)(const char *source, const char *msg); - void (*ircd_cmd_372_error)(const char *source); - void (*ircd_cmd_375)(const char *source); - void (*ircd_cmd_376)(const char *source); - void (*ircd_cmd_351)(const char *source); - void (*ircd_cmd_391)(const char *source, const char *timestr); - void (*ircd_cmd_250)(const char *buf); - void (*ircd_cmd_307)(const char *buf); - void (*ircd_cmd_311)(const char *buf); - void (*ircd_cmd_312)(const char *buf); - void (*ircd_cmd_317)(const char *buf); - void (*ircd_cmd_219)(const char *source, const char *letter); - void (*ircd_cmd_401)(const char *source, const char *who); - void (*ircd_cmd_318)(const char *source, const char *who); - void (*ircd_cmd_242)(const char *buf); - void (*ircd_cmd_243)(const char *buf); - void (*ircd_cmd_211)(const char *buf); -} IRCDProto; - typedef struct ircd_modes_ { int user_invis; int user_oper; @@ -1257,11 +1232,11 @@ struct capabinfo_ { /*************************************************************************/ -class IRCDProtoNew; +class IRCDProto; #include "extern.h" -class IRCDProtoNew { +class IRCDProto { public: virtual void cmd_svsnoop(const char *, int) { } virtual void cmd_remove_akill(const char *, const char *) = 0; @@ -1381,6 +1356,10 @@ class IRCDProtoNew { virtual int valid_nick(const char *) { return 1; } virtual int valid_chan(const char *) { return 1; } virtual int flood_mode_check(const char *) { return 0; } + virtual void cmd_numeric(const char *source, int numeric, const char *dest, const char *buf) + { + send_cmd(source, "%03d %s %s", numeric, dest, buf); + } }; /*************************************************************************/ |