1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 04:06:39 +02:00

Remove legacy global function.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1208 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-09-30 18:45:10 +00:00
parent d64b3aa890
commit f9b628b0d3
15 changed files with 2 additions and 107 deletions
-4
View File
@@ -650,7 +650,6 @@ 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_cmd_global(void (*func) (const char *source, const char *buf));
E void pmodule_cmd_global_legacy(void (*func) (const char *source, const char *fmt));
E void pmodule_cmd_sqline(void (*func) (const char *mask, const char *reason));
E void pmodule_cmd_squit(void (*func) (const char *servname, const char *message));
E void pmodule_cmd_svso(void (*func) (const char *source, const char *nick, const char *flag));
@@ -1353,9 +1352,6 @@ E int anope_flood_mode_check(const char *value);
E void anope_cmd_jupe(const char *jserver, const char *who, const char *reason);
E void anope_cmd_global_legacy(const char *source, const char *fmt);
E void wallops(const char *source, const char *fmt, ...);
E int anope_valid_nick(char *nick);
E int anope_valid_chan(char *chan);
-1
View File
@@ -1116,7 +1116,6 @@ typedef struct ircd_proto_ {
void (*ircd_cmd_243)(const char *buf);
void (*ircd_cmd_211)(const char *buf);
void (*ircd_cmd_global)(const char *source, const char *buf);
void (*ircd_cmd_global_legacy)(const char *source, const char *fmt);
void (*ircd_cmd_sqline)(const char *mask, const char *reason);
void (*ircd_cmd_squit)(const char *servname, const char *message);
void (*ircd_cmd_svso)(const char *source, const char *nick, const char *flag);
-11
View File
@@ -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;
+2 -2
View File
@@ -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);
}
-7
View File
@@ -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);
-1
View File
@@ -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);
-20
View File
@@ -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);
-1
View File
@@ -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);
-7
View File
@@ -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);
-1
View File
@@ -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);
-20
View File
@@ -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);
-1
View File
@@ -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);
-8
View File
@@ -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);
-1
View File
@@ -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);
-22
View File
@@ -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);
}