summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/extern.h1
-rw-r--r--include/services.h23
2 files changed, 17 insertions, 7 deletions
diff --git a/include/extern.h b/include/extern.h
index 0f1e8577f..1325ad2ba 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1118,7 +1118,6 @@ E void anope_cmd_chgident(const char *nick, const char *vIdent);
E void anope_SendVhost(const char *nick, const char *vIdent, const char *vhost); /* CHGHOST + CHGIDENT */
E void anope_SendConnect(); /* Connect */
E void anope_cmd_ea(); /* EA */
-E void anope_SendGlobops(const char *source, const char *fmt, ...); /* GLOBOPS */
E void anope_cmd_tmode(const char *source, const char *dest, const char *fmt, ...); /* TMODE */
E void anope_SendBanDel(const char *name, const char *nick); /* MODE -b */
E void anope_cmd_netinfo(int ac, const char **av); /* NETINFO */
diff --git a/include/services.h b/include/services.h
index 6fc0cf8cf..b9c81290e 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1263,6 +1263,14 @@ class IRCDProto {
else
send_cmd(nick, "PART %s", chan);
}
+ virtual void SendGlobopsInternal(const char *source, const char *buf)
+ {
+ BotInfo *bi = findbot(source);
+ if (bi)
+ send_cmd(UseTS6 ? bi->uid : bi->nick, "GLOBOPS :%s", buf);
+ else
+ send_cmd(ServerName, "GLOBOPS :%s", buf);
+ }
public:
virtual void SendSVSNOOP(const char *, int) { }
virtual void SendAkillDel(const char *, const char *) = 0;
@@ -1409,13 +1417,16 @@ class IRCDProto {
}
else SendPartInternal(nick, chan, NULL);
}
- virtual void SendGlobops(const char *source, const char *buf)
+ virtual void SendGlobops(const char *source, const char *fmt, ...)
{
- BotInfo *bi = findbot(source)
- if (bi)
- send_cmd(UseTS6 ? bi->uid : bi->nick, "GLOBOPS :%s", buf);
- else
- send_cmd(ServerName, "GLOBOPS :%s", buf);
+ va_list args;
+ char buf[BUFSIZE] = "";
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ SendGlobopsInternal(source, buf);
}
virtual void SendSQLine(const char *, const char *) = 0;
virtual void SendSquit(const char *servname, const char *message)