From f9b628b0d37844e66a8d2acae797a81444df78ba Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 30 Sep 2008 18:45:10 +0000 Subject: Remove legacy global function. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1208 5417fbe8-f217-4b02-8779-1006273d7864 --- src/ircd.c | 11 ----------- src/main.c | 4 ++-- src/protocol/bahamut.c | 7 ------- src/protocol/bahamut.h | 1 - src/protocol/charybdis.c | 20 -------------------- src/protocol/charybdis.h | 1 - src/protocol/inspircd11.c | 7 ------- src/protocol/inspircd11.h | 1 - src/protocol/ratbox.c | 20 -------------------- src/protocol/ratbox.h | 1 - src/protocol/unreal32.c | 8 -------- src/protocol/unreal32.h | 1 - src/send.c | 22 ---------------------- 13 files changed, 2 insertions(+), 102 deletions(-) (limited to 'src') diff --git a/src/ircd.c b/src/ircd.c index 12330437a..d11273d9b 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -87,7 +87,6 @@ void initIrcdProto() ircdproto.ircd_cmd_243 = NULL; ircdproto.ircd_cmd_211 = NULL; ircdproto.ircd_cmd_global = NULL; - ircdproto.ircd_cmd_global_legacy = NULL; ircdproto.ircd_cmd_sqline = NULL; ircdproto.ircd_cmd_squit = NULL; ircdproto.ircd_cmd_svso = NULL; @@ -531,11 +530,6 @@ void anope_cmd_global(const char *source, const char *fmt, ...) ircdproto.ircd_cmd_global(source, buf); } -void anope_cmd_global_legacy(const char *source, const char *fmt) -{ - ircdproto.ircd_cmd_global_legacy(source, fmt); -} - void anope_cmd_sqline(const char *mask, const char *reason) { ircdproto.ircd_cmd_sqline(mask, reason); @@ -918,11 +912,6 @@ void pmodule_cmd_global(void (*func) (const char *source, const char *buf)) ircdproto.ircd_cmd_global = func; } -void pmodule_cmd_global_legacy(void (*func) (const char *source, const char *fmt)) -{ - ircdproto.ircd_cmd_global_legacy = func; -} - void pmodule_cmd_sqline(void (*func) (const char *mask, const char *reason)) { ircdproto.ircd_cmd_sqline = func; diff --git a/src/main.c b/src/main.c index 3981a7a55..25bc5c090 100644 --- a/src/main.c +++ b/src/main.c @@ -385,7 +385,7 @@ void sighandler(int signum) inbuf[447] = '>'; inbuf[448] = 0; } - wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); + anope_cmd_global(NULL, "PANIC! buffer = %s\r\n", inbuf); modules_unload_all(false, true); } else if (waiting < 0) { /* This is static on the off-chance we run low on stack */ @@ -461,7 +461,7 @@ void sighandler(int signum) default: snprintf(buf, sizeof(buf), "waiting=%d", waiting); } - wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); + anope_cmd_global(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); alog("PANIC! %s (%s)", buf, strsignal(signum)); modules_unload_all(false, true); } diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index bd0b9f05e..5a38312d5 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -1506,12 +1506,6 @@ void bahamut_cmd_jupe(const char *jserver, const char *who, const char *reason) new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } -/* GLOBOPS - to handle old WALLOPS */ -void bahamut_cmd_global_legacy(const char *source, const char *fmt) -{ - send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt); -} - /* 1 = valid nick 0 = nick is in valid @@ -1601,7 +1595,6 @@ void moduleAddAnopeCmds() pmodule_cmd_243(bahamut_cmd_243); pmodule_cmd_211(bahamut_cmd_211); pmodule_cmd_global(bahamut_cmd_global); - pmodule_cmd_global_legacy(bahamut_cmd_global_legacy); pmodule_cmd_sqline(bahamut_cmd_sqline); pmodule_cmd_squit(bahamut_cmd_squit); pmodule_cmd_svso(bahamut_cmd_svso); diff --git a/src/protocol/bahamut.h b/src/protocol/bahamut.h index 4194d376b..e8a914c1c 100644 --- a/src/protocol/bahamut.h +++ b/src/protocol/bahamut.h @@ -100,7 +100,6 @@ void bahamut_cmd_242(const char *buf); void bahamut_cmd_243(const char *buf); void bahamut_cmd_211(const char *buf); void bahamut_cmd_global(const char *source, const char *buf); -void bahamut_cmd_global_legacy(const char *source, const char *fmt); void bahamut_cmd_sqline(const char *mask, const char *reason); void bahamut_cmd_squit(const char *servname, const char *message); void bahamut_cmd_svso(const char *source, const char *nick, const char *flag); diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index 3af3b2dd6..9de7d6036 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -527,25 +527,6 @@ void charybdis_cmd_global(const char *source, const char *buf) } } -/* GLOBOPS - to handle old WALLOPS */ -void charybdis_cmd_global_legacy(const char *source, const char *fmt) -{ - Uid *u; - - if (source) { - u = find_uid(source); - if (u) { - send_cmd((UseTS6 ? u->uid : source), "OPERWALL :%s", fmt); - } else { - send_cmd((UseTS6 ? TS6SID : ServerName), "WALLOPS :%s", fmt); - } - } else { - send_cmd((UseTS6 ? TS6SID : ServerName), "WALLOPS :%s", fmt); - } - - send_cmd(source ? source : ServerName, "OPERWALL :%s", fmt); -} - int anope_event_sjoin(const char *source, int ac, const char **av) { do_sjoin(source, ac, av); @@ -1892,7 +1873,6 @@ void moduleAddAnopeCmds() pmodule_cmd_243(charybdis_cmd_243); pmodule_cmd_211(charybdis_cmd_211); pmodule_cmd_global(charybdis_cmd_global); - pmodule_cmd_global_legacy(charybdis_cmd_global_legacy); pmodule_cmd_sqline(charybdis_cmd_sqline); pmodule_cmd_squit(charybdis_cmd_squit); pmodule_cmd_svso(charybdis_cmd_svso); diff --git a/src/protocol/charybdis.h b/src/protocol/charybdis.h index 6eb0c7232..8f4303902 100644 --- a/src/protocol/charybdis.h +++ b/src/protocol/charybdis.h @@ -88,7 +88,6 @@ void charybdis_cmd_242(const char *buf); void charybdis_cmd_243(const char *buf); void charybdis_cmd_211(const char *buf); void charybdis_cmd_global(const char *source, const char *buf); -void charybdis_cmd_global_legacy(const char *source, const char *fmt); void charybdis_cmd_sqline(const char *mask, const char *reason); void charybdis_cmd_squit(const char *servname, const char *message); void charybdis_cmd_svso(const char *source, const char *nick, const char *flag); diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 183be0740..88409b69f 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -1757,12 +1757,6 @@ void inspircd_cmd_jupe(const char *jserver, const char *who, const char *reason) new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL); } -/* GLOBOPS - to handle old WALLOPS */ -void inspircd_cmd_global_legacy(const char *source, const char *fmt) -{ - send_cmd(source ? source : s_OperServ, "GLOBOPS :%s", fmt); -} - int inspircd_valid_nick(const char *nick) { return 1; @@ -1836,7 +1830,6 @@ void moduleAddAnopeCmds() pmodule_cmd_243(inspircd_cmd_243); pmodule_cmd_211(inspircd_cmd_211); pmodule_cmd_global(inspircd_cmd_global); - pmodule_cmd_global_legacy(inspircd_cmd_global_legacy); pmodule_cmd_sqline(inspircd_cmd_sqline); pmodule_cmd_squit(inspircd_cmd_squit); pmodule_cmd_svso(inspircd_cmd_svso); diff --git a/src/protocol/inspircd11.h b/src/protocol/inspircd11.h index 517146414..ed6d6f8f6 100755 --- a/src/protocol/inspircd11.h +++ b/src/protocol/inspircd11.h @@ -93,7 +93,6 @@ void inspircd_cmd_242(const char *buf); void inspircd_cmd_243(const char *buf); void inspircd_cmd_211(const char *buf); void inspircd_cmd_global(const char *source, const char *buf); -void inspircd_cmd_global_legacy(const char *source, const char *fmt); void inspircd_cmd_sqline(const char *mask, const char *reason); void inspircd_cmd_squit(const char *servname, const char *message); void inspircd_cmd_svso(const char *source, const char *nick, const char *flag); diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index e6427b232..27e7ff3e1 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -516,25 +516,6 @@ void ratbox_cmd_global(const char *source, const char *buf) } } -/* GLOBOPS - to handle old WALLOPS */ -void ratbox_cmd_global_legacy(const char *source, const char *fmt) -{ - Uid *u; - - if (source) { - u = find_uid(source); - if (u) { - send_cmd((UseTS6 ? u->uid : source), "OPERWALL :%s", fmt); - } else { - send_cmd((UseTS6 ? TS6SID : ServerName), "OPERWALL :%s", fmt); - } - } else { - send_cmd((UseTS6 ? TS6SID : ServerName), "OPERWALL :%s", fmt); - } - - send_cmd(source ? source : ServerName, "OPERWALL :%s", fmt); -} - int anope_event_sjoin(const char *source, int ac, const char **av) { do_sjoin(source, ac, av); @@ -1788,7 +1769,6 @@ void moduleAddAnopeCmds() pmodule_cmd_243(ratbox_cmd_243); pmodule_cmd_211(ratbox_cmd_211); pmodule_cmd_global(ratbox_cmd_global); - pmodule_cmd_global_legacy(ratbox_cmd_global_legacy); pmodule_cmd_sqline(ratbox_cmd_sqline); pmodule_cmd_squit(ratbox_cmd_squit); pmodule_cmd_svso(ratbox_cmd_svso); diff --git a/src/protocol/ratbox.h b/src/protocol/ratbox.h index 8c6a42914..b4ac1f1cc 100644 --- a/src/protocol/ratbox.h +++ b/src/protocol/ratbox.h @@ -87,7 +87,6 @@ void ratbox_cmd_242(const char *buf); void ratbox_cmd_243(const char *buf); void ratbox_cmd_211(const char *buf); void ratbox_cmd_global(const char *source, const char *buf); -void ratbox_cmd_global_legacy(const char *source, const char *fmt); void ratbox_cmd_sqline(const char *mask, const char *reason); void ratbox_cmd_squit(const char *servname, const char *message); void ratbox_cmd_svso(const char *source, const char *nick, const char *flag); diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 794b074d3..4d7c94997 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -986,13 +986,6 @@ void unreal_cmd_global(const char *source, const char *buf) send_token("GLOBOPS", "]"), buf); } -/* GLOBOPS - to handle old WALLOPS */ -void unreal_cmd_global_legacy(const char *source, const char *fmt) -{ - send_cmd(source ? source : ServerName, "%s :%s", - send_token("GLOBOPS", "]"), fmt); -} - /* SQLINE */ /* ** parv[0] = sender @@ -2154,7 +2147,6 @@ void moduleAddAnopeCmds() pmodule_cmd_243(unreal_cmd_243); pmodule_cmd_211(unreal_cmd_211); pmodule_cmd_global(unreal_cmd_global); - pmodule_cmd_global_legacy(unreal_cmd_global_legacy); pmodule_cmd_sqline(unreal_cmd_sqline); pmodule_cmd_squit(unreal_cmd_squit); pmodule_cmd_svso(unreal_cmd_svso); diff --git a/src/protocol/unreal32.h b/src/protocol/unreal32.h index d45b428b9..7edaeb749 100644 --- a/src/protocol/unreal32.h +++ b/src/protocol/unreal32.h @@ -122,7 +122,6 @@ void unreal_cmd_242(const char *buf); void unreal_cmd_243(const char *buf); void unreal_cmd_211(const char *buf); void unreal_cmd_global(const char *source, const char *buf); -void unreal_cmd_global_legacy(const char *source, const char *fmt); void unreal_cmd_sqline(const char *mask, const char *reason); void unreal_cmd_squit(const char *servname, const char *message); void unreal_cmd_svso(const char *source, const char *nick, const char *flag); diff --git a/src/send.c b/src/send.c index a63624234..e17e69e87 100644 --- a/src/send.c +++ b/src/send.c @@ -290,26 +290,4 @@ void privmsg(char *source, char *dest, const char *fmt, ...) anope_cmd_privmsg(source, dest, buf); } -/*************************************************************************/ -/** - * Send out a WALLOP, this is here for legacy only, same day we will pull it out - * @param source Orgin of the Message - * @param fmt Format of the Message - * @param ... any number of parameters - * @return void - */ -void wallops(const char *source, const char *fmt, ...) -{ - va_list args; - char buf[BUFSIZE]; - *buf = '\0'; - - if (fmt) { - va_start(args, fmt); - vsnprintf(buf, BUFSIZE - 1, fmt, args); - va_end(args); - } - - anope_cmd_global_legacy(source, buf); -} -- cgit