diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:13 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:13 +0000 |
commit | 7eb190b1bd8cd9b3c89ec68aa0251fd5cd8e5add (patch) | |
tree | 61d187efbabc481816cf2b3f3dad26593e2036d8 | |
parent | ae4f3a615fb38bcec088f0ac41d8d4a78181d90e (diff) |
Added cmd_server() function to IRCDProtoNew class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1268 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | include/extern.h | 1 | ||||
-rw-r--r-- | include/services.h | 1 | ||||
-rw-r--r-- | src/protocol/bahamut.c | 8 | ||||
-rw-r--r-- | src/protocol/bahamut.h | 1 | ||||
-rw-r--r-- | src/protocol/charybdis.c | 8 | ||||
-rw-r--r-- | src/protocol/charybdis.h | 1 | ||||
-rw-r--r-- | src/protocol/inspircd11.c | 9 | ||||
-rwxr-xr-x | src/protocol/inspircd11.h | 1 | ||||
-rw-r--r-- | src/protocol/ratbox.c | 8 | ||||
-rw-r--r-- | src/protocol/ratbox.h | 1 | ||||
-rw-r--r-- | src/protocol/unreal32.c | 14 | ||||
-rw-r--r-- | src/protocol/unreal32.h | 1 |
12 files changed, 27 insertions, 27 deletions
diff --git a/include/extern.h b/include/extern.h index 04971d70c..7901245d4 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1196,7 +1196,6 @@ E void anope_cmd_serv_privmsg(const char *source, const char *dest, const char * E void anope_cmd_protoctl(); /* PROTOCTL */ E void anope_cmd_quit(const char *source, const char *fmt, ...); /* QUIT */ E void anope_cmd_remove_akill(const char *user, const char *host); /* RAKILL */ -E void anope_cmd_server(const char *servname, int hop, const char *descript); /* SERVER */ E void anope_cmd_sgline(const char *mask, const char *reason); /* SGLINE */ E void anope_cmd_sqline(const char *mask, const char *reason); /* SQLINE */ E void anope_cmd_szline(const char *mask, const char *reason, const char *whom); /* SZLINE */ diff --git a/include/services.h b/include/services.h index 500547d0c..c9f0d549f 100644 --- a/include/services.h +++ b/include/services.h @@ -1364,6 +1364,7 @@ class IRCDProtoNew { virtual void cmd_svspart(const char *, const char *, const char *) { } virtual void cmd_swhois(const char *, const char *, const char *) { } virtual void cmd_eob() { } + virtual void cmd_server(const char *, int, const char *) = 0; }; /*************************************************************************/ diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index 16166996d..b3a52bdfe 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -822,9 +822,9 @@ void bahamut_cmd_pass(const char *pass) } /* SERVER */ -void bahamut_cmd_server(const char *servname, int hop, const char *descript) +void BahamutIRCdProto::cmd_server(const char *servname, int hop, const char *descript) { - send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); + send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); } /* CAPAB */ @@ -841,7 +841,7 @@ void BahamutIRCdProto::cmd_connect() else if (servernum == 2) bahamut_cmd_pass(RemotePassword2); else if (servernum == 3) bahamut_cmd_pass(RemotePassword3); bahamut_cmd_capab(); - bahamut_cmd_server(ServerName, 1, ServerDesc); + cmd_server(ServerName, 1, ServerDesc); bahamut_cmd_svinfo(); bahamut_cmd_burst(); } @@ -1296,7 +1296,7 @@ void bahamut_cmd_jupe(const char *jserver, const char *who, const char *reason) if (findserver(servlist, jserver)) ircd_proto.cmd_squit(jserver, rbuf); - bahamut_cmd_server(jserver, 2, rbuf); + ircd_proto.cmd_server(jserver, 2, rbuf); new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } diff --git a/src/protocol/bahamut.h b/src/protocol/bahamut.h index 28d55209b..6f5a532bb 100644 --- a/src/protocol/bahamut.h +++ b/src/protocol/bahamut.h @@ -111,4 +111,5 @@ class BahamutIRCdProto : public IRCDProtoNew { void cmd_nc_change(User *); void cmd_svid_umode3(User *, const char *); void cmd_eob(); + void cmd_server(const char *, int, const char *); } ircd_proto; diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index 92c865f5e..2d1f80d99 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -885,9 +885,9 @@ void charybdis_cmd_pass(const char *pass) } /* SERVER name hop descript */ -void charybdis_cmd_server(const char *servname, int hop, const char *descript) +void CharybdisProto::cmd_server(const char *servname, int hop, const char *descript) { - send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); + send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); } void CharybdisProto::cmd_connect() @@ -899,7 +899,7 @@ void CharybdisProto::cmd_connect() else if (servernum == 2) charybdis_cmd_pass(RemotePassword2); else if (servernum == 3) charybdis_cmd_pass(RemotePassword3); charybdis_cmd_capab(); - charybdis_cmd_server(ServerName, 1, ServerDesc); + cmd_server(ServerName, 1, ServerDesc); charybdis_cmd_svinfo(); } @@ -1515,7 +1515,7 @@ void charybdis_cmd_jupe(const char *jserver, const char *who, const char *reason if (findserver(servlist, jserver)) ircd_proto.cmd_squit(jserver, rbuf); - charybdis_cmd_server(jserver, 2, rbuf); + ircd_proto.cmd_server(jserver, 2, rbuf); new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } diff --git a/src/protocol/charybdis.h b/src/protocol/charybdis.h index 60d461c57..c97c7d8ca 100644 --- a/src/protocol/charybdis.h +++ b/src/protocol/charybdis.h @@ -100,4 +100,5 @@ class CharybdisProto : public IRCDProtoNew { void cmd_release_svshold(const char *); void cmd_unsgline(const char *); void cmd_sgline(const char *, const char *); + void cmd_server(const char *, int, const char *); } ircd_proto; diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index f9531182e..c08218fb8 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -806,10 +806,9 @@ void inspircd_cmd_pass(const char *pass) } /* SERVER services-dev.chatspike.net password 0 :Description here */ -void inspircd_cmd_server(const char *servname, int hop, const char *descript) +void InspIRCdProto::cmd_server(const char *servname, int hop, const char *descript) { - send_cmd(ServerName, "SERVER %s %s %d :%s", servname, currentpass, hop, - descript); + send_cmd(ServerName, "SERVER %s %s %d :%s", servname, currentpass, hop, descript); } /* JOIN */ @@ -989,7 +988,7 @@ void InspIRCdProto::cmd_connect() if (servernum == 1) inspircd_cmd_pass(RemotePassword); else if (servernum == 2) inspircd_cmd_pass(RemotePassword2); else if (servernum == 3) inspircd_cmd_pass(RemotePassword3); - inspircd_cmd_server(ServerName, 0, ServerDesc); + cmd_server(ServerName, 0, ServerDesc); send_cmd(NULL, "BURST"); send_cmd(ServerName, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags, EncModule, version_build); me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); @@ -1546,7 +1545,7 @@ void inspircd_cmd_jupe(const char *jserver, const char *who, const char *reason) if (findserver(servlist, jserver)) ircd_proto.cmd_squit(jserver, rbuf); - inspircd_cmd_server(jserver, 1, rbuf); + ircd_proto.cmd_server(jserver, 1, rbuf); new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } diff --git a/src/protocol/inspircd11.h b/src/protocol/inspircd11.h index 8b4a0520f..a0b5dc7cb 100755 --- a/src/protocol/inspircd11.h +++ b/src/protocol/inspircd11.h @@ -114,4 +114,5 @@ class InspIRCdProto : public IRCDProtoNew { void cmd_svsjoin(const char *, const char *, const char *, const char *); void cmd_svspart(const char *, const char *, const char *); void cmd_eob(); + void cmd_server(const char *, int, const char *); } ircd_proto; diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 6c20237bc..aab1d63a8 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -820,9 +820,9 @@ void ratbox_cmd_pass(const char *pass) } /* SERVER name hop descript */ -void ratbox_cmd_server(const char *servname, int hop, const char *descript) +void RatboxProto::cmd_server(const char *servname, int hop, const char *descript) { - send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); + send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); } void RatboxProto::cmd_connect() @@ -834,7 +834,7 @@ void RatboxProto::cmd_connect() else if (servernum == 2) ratbox_cmd_pass(RemotePassword2); else if (servernum == 3) ratbox_cmd_pass(RemotePassword3); ratbox_cmd_capab(); - ratbox_cmd_server(ServerName, 1, ServerDesc); + cmd_server(ServerName, 1, ServerDesc); ratbox_cmd_svinfo(); } @@ -1410,7 +1410,7 @@ void ratbox_cmd_jupe(const char *jserver, const char *who, const char *reason) if (findserver(servlist, jserver)) ircd_proto.cmd_squit(jserver, rbuf); - ratbox_cmd_server(jserver, 2, rbuf); + ircd_proto.cmd_server(jserver, 2, rbuf); new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } diff --git a/src/protocol/ratbox.h b/src/protocol/ratbox.h index ee806e5e2..878002445 100644 --- a/src/protocol/ratbox.h +++ b/src/protocol/ratbox.h @@ -95,4 +95,5 @@ class RatboxProto : public IRCDProtoNew { void cmd_connect(); void cmd_unsgline(const char *); void cmd_sgline(const char *, const char *); + void cmd_server(const char *, int, const char *); } ircd_proto; diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index e91894351..9d53672fc 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -686,14 +686,10 @@ void unreal_cmd_pass(const char *pass) /* SERVER name hop descript */ /* Unreal 3.2 actually sends some info about itself in the descript area */ -void unreal_cmd_server(const char *servname, int hop, const char *descript) +void UnrealIRCdProto::cmd_server(const char *servname, int hop, const char *descript) { - if (Numeric) { - send_cmd(NULL, "SERVER %s %d :U0-*-%s %s", servname, hop, Numeric, - descript); - } else { - send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); - } + if (Numeric) send_cmd(NULL, "SERVER %s %d :U0-*-%s %s", servname, hop, Numeric, descript); + else send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript); } /* JOIN */ @@ -907,7 +903,7 @@ void UnrealIRCdProto::cmd_connect() if (servernum == 1) unreal_cmd_pass(RemotePassword); else if (servernum == 2) unreal_cmd_pass(RemotePassword2); else if (servernum == 3) unreal_cmd_pass(RemotePassword3); - unreal_cmd_server(ServerName, 1, ServerDesc); + cmd_server(ServerName, 1, ServerDesc); } /* Events */ @@ -1593,7 +1589,7 @@ void unreal_cmd_jupe(const char *jserver, const char *who, const char *reason) if (findserver(servlist, jserver)) ircd_proto.cmd_squit(jserver, rbuf); - unreal_cmd_server(jserver, 2, rbuf); + ircd_proto.cmd_server(jserver, 2, rbuf); new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } diff --git a/src/protocol/unreal32.h b/src/protocol/unreal32.h index 7d557b7f7..6ffc0e9b5 100644 --- a/src/protocol/unreal32.h +++ b/src/protocol/unreal32.h @@ -140,4 +140,5 @@ class UnrealIRCdProto : public IRCDProtoNew { void cmd_svspart(const char *, const char *, const char *); void cmd_swhois(const char *, const char *, const char *); void cmd_eob(); + void cmd_server(const char *, int, const char *); } ircd_proto; |