1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 12:43:12 +02:00

Merge commit 'cbx/anopeng-protocol' into anopeng

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1295 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-10-01 21:20:54 +00:00
parent 8aa6436d73
commit e46bc26a06
14 changed files with 136 additions and 1436 deletions
+3 -36
View File
@@ -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);
+6 -27
View File
@@ -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);
}
};
/*************************************************************************/