1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 16:53:13 +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
-179
View File
@@ -963,157 +963,12 @@ void BahamutIRCdProto::cmd_notice_ops(const char *source, const char *dest, cons
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
/* 391 */
void bahamut_cmd_391(const char *source, const char *timestr)
{
if (!timestr) {
return;
}
send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void bahamut_cmd_250(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void bahamut_cmd_307(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void bahamut_cmd_311(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void bahamut_cmd_312(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void bahamut_cmd_317(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void bahamut_cmd_219(const char *source, const char *letter)
{
if (!source) {
return;
}
if (letter) {
send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
*letter);
} else {
send_cmd(NULL, "219 %s l :End of /STATS report.", source);
}
}
/* 401 */
void bahamut_cmd_401(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void bahamut_cmd_318(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void bahamut_cmd_242(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void bahamut_cmd_243(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void bahamut_cmd_211(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "211 %s", buf);
}
void BahamutIRCdProto::cmd_kick(const char *source, const char *chan, const char *user, const char *buf)
{
if (buf) send_cmd(source, "KICK %s %s :%s", chan, user, buf);
else send_cmd(source, "KICK %s %s", chan, user);
}
void bahamut_cmd_372(const char *source, const char *msg)
{
send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void bahamut_cmd_372_error(const char *source)
{
send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
"contact your IRC administrator.", source);
}
void bahamut_cmd_375(const char *source)
{
send_cmd(ServerName, "375 %s :- %s Message of the Day",
source, ServerName);
}
void bahamut_cmd_376(const char *source)
{
send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
int anope_event_away(const char *source, int ac, const char **av)
{
if (!source) {
@@ -1131,14 +986,6 @@ int anope_event_ping(const char *source, int ac, const char **av)
return MOD_CONT;
}
void bahamut_cmd_351(const char *source)
{
send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
source, version_number, ServerName, ircd->name, version_flags,
EncModule, version_build);
}
void BahamutIRCdProto::cmd_bot_nick(const char *nick, const char *user, const char *host, const char *real, const char *modes)
{
EnforceQlinedNick(nick, s_BotServ);
@@ -1262,31 +1109,6 @@ void bahamut_cmd_chghost(const char *nick, const char *vhost)
}
}
/**
* Tell anope which function we want to perform each task inside of anope.
* These prototypes must match what anope expects.
**/
void moduleAddAnopeCmds()
{
pmodule_cmd_372(bahamut_cmd_372);
pmodule_cmd_372_error(bahamut_cmd_372_error);
pmodule_cmd_375(bahamut_cmd_375);
pmodule_cmd_376(bahamut_cmd_376);
pmodule_cmd_351(bahamut_cmd_351);
pmodule_cmd_391(bahamut_cmd_391);
pmodule_cmd_250(bahamut_cmd_250);
pmodule_cmd_307(bahamut_cmd_307);
pmodule_cmd_311(bahamut_cmd_311);
pmodule_cmd_312(bahamut_cmd_312);
pmodule_cmd_317(bahamut_cmd_317);
pmodule_cmd_219(bahamut_cmd_219);
pmodule_cmd_401(bahamut_cmd_401);
pmodule_cmd_318(bahamut_cmd_318);
pmodule_cmd_242(bahamut_cmd_242);
pmodule_cmd_243(bahamut_cmd_243);
pmodule_cmd_211(bahamut_cmd_211);
}
/**
* Now tell anope how to use us.
**/
@@ -1319,7 +1141,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
+1 -19
View File
@@ -58,25 +58,7 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
void bahamut_cmd_372(const char *source, const char *msg);
void bahamut_cmd_372_error(const char *source);
void bahamut_cmd_375(const char *source);
void bahamut_cmd_376(const char *source);
void bahamut_cmd_351(const char *source);
void bahamut_cmd_391(const char *source, const char *timestr);
void bahamut_cmd_250(const char *buf);
void bahamut_cmd_307(const char *buf);
void bahamut_cmd_311(const char *buf);
void bahamut_cmd_312(const char *buf);
void bahamut_cmd_317(const char *buf);
void bahamut_cmd_219(const char *source, const char *letter);
void bahamut_cmd_401(const char *source, const char *who);
void bahamut_cmd_318(const char *source, const char *who);
void bahamut_cmd_242(const char *buf);
void bahamut_cmd_243(const char *buf);
void bahamut_cmd_211(const char *buf);
class BahamutIRCdProto : public IRCDProtoNew {
class BahamutIRCdProto : public IRCDProto {
public:
void cmd_svsnoop(const char *, int);
void cmd_remove_akill(const char *, const char *);
+3 -179
View File
@@ -1063,153 +1063,10 @@ int anope_event_quit(const char *source, int ac, const char **av)
return MOD_CONT;
}
void charybdis_cmd_372(const char *source, const char *msg)
void CharybdisProto::cmd_numeric(const char *source, int numeric, const char *dest, const char *buf)
{
send_cmd((UseTS6 ? TS6SID : ServerName), "372 %s :- %s", source, msg);
}
void charybdis_cmd_372_error(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"422 %s :- MOTD file not found! Please "
"contact your IRC administrator.", source);
}
void charybdis_cmd_375(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"375 %s :- %s Message of the Day", source, ServerName);
}
void charybdis_cmd_376(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"376 %s :End of /MOTD command.", source);
}
/* 391 */
void charybdis_cmd_391(const char *source, const char *timestr)
{
if (!timestr) {
return;
}
send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void charybdis_cmd_250(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void charybdis_cmd_307(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "307 %s", buf);
}
/* 311 */
void charybdis_cmd_311(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "311 %s", buf);
}
/* 312 */
void charybdis_cmd_312(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "312 %s", buf);
}
/* 317 */
void charybdis_cmd_317(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "317 %s", buf);
}
/* 219 */
void charybdis_cmd_219(const char *source, const char *letter)
{
if (!source) {
return;
}
if (letter) {
send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
*letter);
} else {
send_cmd(NULL, "219 %s l :End of /STATS report.", source);
}
}
/* 401 */
void charybdis_cmd_401(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "401 %s %s :No such service.",
source, who);
}
/* 318 */
void charybdis_cmd_318(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName),
"318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void charybdis_cmd_242(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void charybdis_cmd_243(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void charybdis_cmd_211(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "211 %s", buf);
// This might need to be set in the call to cmd_numeric instead of here, will review later -- CyberBotX
send_cmd(UseTS6 ? TS6SID : source, "%03d %s %s", numeric, dest, buf);
}
void CharybdisProto::cmd_mode(const char *source, const char *dest, const char *buf)
@@ -1320,13 +1177,6 @@ int anope_event_tmode(const char *source, int ac, const char **av)
return MOD_CONT;
}
void charybdis_cmd_351(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"351 %s Anope-%s %s :%s - %s (%s) -- %s", source, version_number,
ServerName, ircd->name, version_flags, EncModule, version_build);
}
/* Event: PROTOCTL */
int anope_event_capab(const char *source, int ac, const char **av)
{
@@ -1498,31 +1348,6 @@ int charybdis_send_deaccount(int argc, char **argv)
return MOD_CONT;
}
/**
* Tell anope which function we want to perform each task inside of anope.
* These prototypes must match what anope expects.
**/
void moduleAddAnopeCmds()
{
pmodule_cmd_372(charybdis_cmd_372);
pmodule_cmd_372_error(charybdis_cmd_372_error);
pmodule_cmd_375(charybdis_cmd_375);
pmodule_cmd_376(charybdis_cmd_376);
pmodule_cmd_351(charybdis_cmd_351);
pmodule_cmd_391(charybdis_cmd_391);
pmodule_cmd_250(charybdis_cmd_250);
pmodule_cmd_307(charybdis_cmd_307);
pmodule_cmd_311(charybdis_cmd_311);
pmodule_cmd_312(charybdis_cmd_312);
pmodule_cmd_317(charybdis_cmd_317);
pmodule_cmd_219(charybdis_cmd_219);
pmodule_cmd_401(charybdis_cmd_401);
pmodule_cmd_318(charybdis_cmd_318);
pmodule_cmd_242(charybdis_cmd_242);
pmodule_cmd_243(charybdis_cmd_243);
pmodule_cmd_211(charybdis_cmd_211);
}
/**
* Now tell anope how to use us.
**/
@@ -1555,7 +1380,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
+2 -19
View File
@@ -46,25 +46,7 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t
void charybdis_cmd_372(const char *source, const char *msg);
void charybdis_cmd_372_error(const char *source);
void charybdis_cmd_375(const char *source);
void charybdis_cmd_376(const char *source);
void charybdis_cmd_351(const char *source);
void charybdis_cmd_391(const char *source, const char *timestr);
void charybdis_cmd_250(const char *buf);
void charybdis_cmd_307(const char *buf);
void charybdis_cmd_311(const char *buf);
void charybdis_cmd_312(const char *buf);
void charybdis_cmd_317(const char *buf);
void charybdis_cmd_219(const char *source, const char *letter);
void charybdis_cmd_401(const char *source, const char *who);
void charybdis_cmd_318(const char *source, const char *who);
void charybdis_cmd_242(const char *buf);
void charybdis_cmd_243(const char *buf);
void charybdis_cmd_211(const char *buf);
class CharybdisProto : public IRCDProtoNew {
class CharybdisProto : public IRCDProto {
public:
void cmd_remove_akill(const char *, const char *);
void cmd_topic(const char *, const char *, const char *, const char *, time_t);
@@ -99,4 +81,5 @@ class CharybdisProto : public IRCDProtoNew {
void set_umode(User *, int, const char **);
int valid_nick(const char *);
int flood_mode_check(const char *);
void cmd_numeric(const char *, int, const char *, const char *);
} ircd_proto;
+2 -176
View File
@@ -560,27 +560,9 @@ void InspIRCdProto::cmd_svsmode(User *u, int ac, const char **av)
send_cmd(s_NickServ, "MODE %s %s", u->nick, merge_args(ac, av));
}
void inspircd_cmd_372(const char *source, const char *msg)
void InspIRCdProto::cmd_numeric(const char *source, int numeric, const char *dest, const char *buf)
{
send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void inspircd_cmd_372_error(const char *source)
{
send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
"contact your IRC administrator.", source);
}
void inspircd_cmd_375(const char *source)
{
send_cmd(ServerName, "375 %s :- %s Message of the Day",
source, ServerName);
}
void inspircd_cmd_376(const char *source)
{
send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
send_cmd(source, "PUSH %s ::%s %03d %s %s", dest, source, numeric, dest, buf);
}
void InspIRCdProto::cmd_guest_nick(const char *nick, const char *user, const char *host, const char *real, const char *modes)
@@ -757,13 +739,6 @@ void InspIRCdProto::cmd_bot_chan_mode(const char *nick, const char *chan)
anope_cmd_mode(nick, chan, "%s %s %s", ircd->botchanumode, nick, nick);
}
void inspircd_cmd_351(const char *source)
{
send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
source, version_number, ServerName, ircd->name, version_flags,
EncModule, version_build);
}
/* PROTOCTL */
void inspircd_cmd_protoctl()
{
@@ -809,129 +784,6 @@ void inspircd_cmd_chgident(const char *nick, const char *vIdent)
}
}
/* 391 */
void inspircd_cmd_391(const char *source, const char *timestr)
{
if (!timestr) {
return;
}
send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void inspircd_cmd_250(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void inspircd_cmd_307(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void inspircd_cmd_311(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void inspircd_cmd_312(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void inspircd_cmd_317(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void inspircd_cmd_219(const char *source, const char *letter)
{
if (!source) {
return;
}
if (letter) {
send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
*letter);
} else {
send_cmd(NULL, "219 %s l :End of /STATS report.", source);
}
}
/* 401 */
void inspircd_cmd_401(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void inspircd_cmd_318(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void inspircd_cmd_242(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void inspircd_cmd_243(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void inspircd_cmd_211(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "211 %s", buf);
}
/* SQLINE */
void InspIRCdProto::cmd_sqline(const char *mask, const char *reason)
{
@@ -1501,31 +1353,6 @@ int InspIRCdProto::flood_mode_check(const char *value)
else return 0;
}
/**
* Tell anope which function we want to perform each task inside of anope.
* These prototypes must match what anope expects.
**/
void moduleAddAnopeCmds()
{
pmodule_cmd_372(inspircd_cmd_372);
pmodule_cmd_372_error(inspircd_cmd_372_error);
pmodule_cmd_375(inspircd_cmd_375);
pmodule_cmd_376(inspircd_cmd_376);
pmodule_cmd_351(inspircd_cmd_351);
pmodule_cmd_391(inspircd_cmd_391);
pmodule_cmd_250(inspircd_cmd_250);
pmodule_cmd_307(inspircd_cmd_307);
pmodule_cmd_311(inspircd_cmd_311);
pmodule_cmd_312(inspircd_cmd_312);
pmodule_cmd_317(inspircd_cmd_317);
pmodule_cmd_219(inspircd_cmd_219);
pmodule_cmd_401(inspircd_cmd_401);
pmodule_cmd_318(inspircd_cmd_318);
pmodule_cmd_242(inspircd_cmd_242);
pmodule_cmd_243(inspircd_cmd_243);
pmodule_cmd_211(inspircd_cmd_211);
}
/**
* Now tell anope how to use us.
**/
@@ -1558,7 +1385,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
+2 -18
View File
@@ -51,23 +51,6 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
void inspircd_cmd_372(const char *source, const char *msg);
void inspircd_cmd_372_error(const char *source);
void inspircd_cmd_375(const char *source);
void inspircd_cmd_376(const char *source);
void inspircd_cmd_351(const char *source);
void inspircd_cmd_391(const char *source, const char *timestr);
void inspircd_cmd_250(const char *buf);
void inspircd_cmd_307(const char *buf);
void inspircd_cmd_311(const char *buf);
void inspircd_cmd_312(const char *buf);
void inspircd_cmd_317(const char *buf);
void inspircd_cmd_219(const char *source, const char *letter);
void inspircd_cmd_401(const char *source, const char *who);
void inspircd_cmd_318(const char *source, const char *who);
void inspircd_cmd_242(const char *buf);
void inspircd_cmd_243(const char *buf);
void inspircd_cmd_211(const char *buf);
int anope_event_fjoin(const char *source, int ac, const char **av);
int anope_event_fmode(const char *source, int ac, const char **av);
int anope_event_ftopic(const char *source, int ac, const char **av);
@@ -80,7 +63,7 @@ int anope_event_opertype(const char *source, int ac, const char **av);
int anope_event_idle(const char *source, int ac, const char **av);
int anope_event_rsquit(const char *source, int ac, const char **av);
class InspIRCdProto : public IRCDProtoNew {
class InspIRCdProto : public IRCDProto {
public:
void cmd_remove_akill(const char *, const char *);
void cmd_topic(const char *, const char *, const char *, const char *, time_t);
@@ -112,4 +95,5 @@ class InspIRCdProto : public IRCDProtoNew {
void cmd_server(const char *, int, const char *);
void set_umode(User *, int, const char **);
int flood_mode_check(const char *);
void cmd_numeric(const char *, int, const char *, const char *);
} ircd_proto;
+3 -180
View File
@@ -991,153 +991,10 @@ int anope_event_quit(const char *source, int ac, const char **av)
return MOD_CONT;
}
void ratbox_cmd_372(const char *source, const char *msg)
void RatboxProto::cmd_numeric(const char *source, int numeric, const char *dest, const char *buf)
{
send_cmd((UseTS6 ? TS6SID : ServerName), "372 %s :- %s", source, msg);
}
void ratbox_cmd_372_error(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"422 %s :- MOTD file not found! Please "
"contact your IRC administrator.", source);
}
void ratbox_cmd_375(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"375 %s :- %s Message of the Day", source, ServerName);
}
void ratbox_cmd_376(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"376 %s :End of /MOTD command.", source);
}
/* 391 */
void ratbox_cmd_391(const char *source, const char *timestr)
{
if (!timestr) {
return;
}
send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void ratbox_cmd_250(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void ratbox_cmd_307(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "307 %s", buf);
}
/* 311 */
void ratbox_cmd_311(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "311 %s", buf);
}
/* 312 */
void ratbox_cmd_312(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "312 %s", buf);
}
/* 317 */
void ratbox_cmd_317(const char *buf)
{
if (!buf) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "317 %s", buf);
}
/* 219 */
void ratbox_cmd_219(const char *source, const char *letter)
{
if (!source) {
return;
}
if (letter) {
send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
*letter);
} else {
send_cmd(NULL, "219 %s l :End of /STATS report.", source);
}
}
/* 401 */
void ratbox_cmd_401(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName), "401 %s %s :No such service.",
source, who);
}
/* 318 */
void ratbox_cmd_318(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd((UseTS6 ? TS6SID : ServerName),
"318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void ratbox_cmd_242(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void ratbox_cmd_243(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void ratbox_cmd_211(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "211 %s", buf);
// This might need to be set in the call to cmd_numeric instead of here, will review later -- CyberBotX
send_cmd(UseTS6 ? TS6SID : source, "%03d %s %s", numeric, dest, buf);
}
void RatboxProto::cmd_mode(const char *source, const char *dest, const char *buf)
@@ -1246,14 +1103,6 @@ int anope_event_tmode(const char *source, int ac, const char **av)
return MOD_CONT;
}
void ratbox_cmd_351(const char *source)
{
send_cmd((UseTS6 ? TS6SID : ServerName),
"351 %s Anope-%s %s :%s - %s (%s) -- %s", source, version_number,
ServerName, ircd->name, version_flags, EncModule, version_build);
}
/* Event: PROTOCTL */
int anope_event_capab(const char *source, int ac, const char **av)
{
@@ -1379,31 +1228,6 @@ int RatboxProto::valid_nick(const char *nick)
return 1;
}
/**
* Tell anope which function we want to perform each task inside of anope.
* These prototypes must match what anope expects.
**/
void moduleAddAnopeCmds()
{
pmodule_cmd_372(ratbox_cmd_372);
pmodule_cmd_372_error(ratbox_cmd_372_error);
pmodule_cmd_375(ratbox_cmd_375);
pmodule_cmd_376(ratbox_cmd_376);
pmodule_cmd_351(ratbox_cmd_351);
pmodule_cmd_391(ratbox_cmd_391);
pmodule_cmd_250(ratbox_cmd_250);
pmodule_cmd_307(ratbox_cmd_307);
pmodule_cmd_311(ratbox_cmd_311);
pmodule_cmd_312(ratbox_cmd_312);
pmodule_cmd_317(ratbox_cmd_317);
pmodule_cmd_219(ratbox_cmd_219);
pmodule_cmd_401(ratbox_cmd_401);
pmodule_cmd_318(ratbox_cmd_318);
pmodule_cmd_242(ratbox_cmd_242);
pmodule_cmd_243(ratbox_cmd_243);
pmodule_cmd_211(ratbox_cmd_211);
}
/**
* Now tell anope how to use us.
**/
@@ -1435,7 +1259,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
+2 -19
View File
@@ -45,25 +45,7 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t
void ratbox_cmd_372(const char *source, const char *msg);
void ratbox_cmd_372_error(const char *source);
void ratbox_cmd_375(const char *source);
void ratbox_cmd_376(const char *source);
void ratbox_cmd_351(const char *source);
void ratbox_cmd_391(const char *source, const char *timestr);
void ratbox_cmd_250(const char *buf);
void ratbox_cmd_307(const char *buf);
void ratbox_cmd_311(const char *buf);
void ratbox_cmd_312(const char *buf);
void ratbox_cmd_317(const char *buf);
void ratbox_cmd_219(const char *source, const char *letter);
void ratbox_cmd_401(const char *source, const char *who);
void ratbox_cmd_318(const char *source, const char *who);
void ratbox_cmd_242(const char *buf);
void ratbox_cmd_243(const char *buf);
void ratbox_cmd_211(const char *buf);
class RatboxProto : public IRCDProtoNew {
class RatboxProto : public IRCDProto {
public:
void cmd_remove_akill(const char *, const char *);
void cmd_topic(const char *, const char *, const char *, const char *, time_t);
@@ -93,4 +75,5 @@ class RatboxProto : public IRCDProtoNew {
void cmd_server(const char *, int, const char *);
void set_umode(User *, int, const char **);
int valid_nick(const char *);
void cmd_numeric(const char *, int, const char *, const char *);
} ircd_proto;
-179
View File
@@ -541,29 +541,6 @@ void UnrealIRCdProto::cmd_svsmode(User *u, int ac, const char **av)
}
}
/* 372 */
void unreal_cmd_372(const char *source, const char *msg)
{
send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void unreal_cmd_372_error(const char *source)
{
send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
"contact your IRC administrator.", source);
}
void unreal_cmd_375(const char *source)
{
send_cmd(ServerName, "375 %s :- %s Message of the Day",
source, ServerName);
}
void unreal_cmd_376(const char *source)
{
send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
void UnrealIRCdProto::cmd_guest_nick(const char *nick, const char *user, const char *host, const char *real, const char *modes)
{
send_cmd(NULL, "%s %s 1 %ld %s %s %s 0 %s %s%s :%s", send_token("NICK", "&"), nick, static_cast<long>(time(NULL)), user, host, ServerName, modes, host,
@@ -602,13 +579,6 @@ void UnrealIRCdProto::cmd_bot_chan_mode(const char *nick, const char *chan)
anope_cmd_mode(nick, chan, "%s %s %s", myIrcd->botchanumode, nick, nick);
}
void unreal_cmd_351(const char *source)
{
send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
source, version_number, ServerName, myIrcd->name,
version_flags, EncModule, version_build);
}
/* PROTOCTL */
/*
NICKv2 = Nick Version 2
@@ -696,129 +666,6 @@ void unreal_cmd_chgident(const char *nick, const char *vIdent)
vIdent);
}
/* 391 RPL_TIME ":%s 391 %s %s :%s" */
void unreal_cmd_391(const char *source, const char *timestr)
{
if (!timestr) {
return;
}
send_cmd(ServerName, "391 %s %s :%s", source, ServerName, timestr);
}
/* 250 */
void unreal_cmd_250(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void unreal_cmd_307(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void unreal_cmd_311(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void unreal_cmd_312(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void unreal_cmd_317(const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void unreal_cmd_219(const char *source, const char *letter)
{
if (!source) {
return;
}
if (letter) {
send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
*letter);
} else {
send_cmd(NULL, "219 %s l :End of /STATS report.", source);
}
}
/* 401 */
void unreal_cmd_401(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void unreal_cmd_318(const char *source, const char *who)
{
if (!source || !who) {
return;
}
send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void unreal_cmd_242(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void unreal_cmd_243(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void unreal_cmd_211(const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "211 %s", buf);
}
/* SQLINE */
/*
** parv[0] = sender
@@ -1801,31 +1648,6 @@ void moduleAddIRCDMsgs(void) {
/* *INDENT-ON* */
/**
* Tell anope which function we want to perform each task inside of anope.
* These prototypes must match what anope expects.
**/
void moduleAddAnopeCmds()
{
pmodule_cmd_372(unreal_cmd_372);
pmodule_cmd_372_error(unreal_cmd_372_error);
pmodule_cmd_375(unreal_cmd_375);
pmodule_cmd_376(unreal_cmd_376);
pmodule_cmd_351(unreal_cmd_351);
pmodule_cmd_391(unreal_cmd_391);
pmodule_cmd_250(unreal_cmd_250);
pmodule_cmd_307(unreal_cmd_307);
pmodule_cmd_311(unreal_cmd_311);
pmodule_cmd_312(unreal_cmd_312);
pmodule_cmd_317(unreal_cmd_317);
pmodule_cmd_219(unreal_cmd_219);
pmodule_cmd_401(unreal_cmd_401);
pmodule_cmd_318(unreal_cmd_318);
pmodule_cmd_242(unreal_cmd_242);
pmodule_cmd_243(unreal_cmd_243);
pmodule_cmd_211(unreal_cmd_211);
}
/**
* Now tell anope how to use us.
**/
@@ -1857,7 +1679,6 @@ int AnopeInit(int argc, char **argv)
pmodule_key_mode(CMODE_k);
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
+1 -19
View File
@@ -80,25 +80,7 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
void unreal_cmd_372(const char *source, const char *msg);
void unreal_cmd_372_error(const char *source);
void unreal_cmd_375(const char *source);
void unreal_cmd_376(const char *source);
void unreal_cmd_351(const char *source);
void unreal_cmd_391(const char *source, const char *timestr);
void unreal_cmd_250(const char *buf);
void unreal_cmd_307(const char *buf);
void unreal_cmd_311(const char *buf);
void unreal_cmd_312(const char *buf);
void unreal_cmd_317(const char *buf);
void unreal_cmd_219(const char *source, const char *letter);
void unreal_cmd_401(const char *source, const char *who);
void unreal_cmd_318(const char *source, const char *who);
void unreal_cmd_242(const char *buf);
void unreal_cmd_243(const char *buf);
void unreal_cmd_211(const char *buf);
class UnrealIRCdProto : public IRCDProtoNew {
class UnrealIRCdProto : public IRCDProto {
public:
void cmd_svsnoop(const char *, int);
void cmd_remove_akill(const char *, const char *);