From 809ed7c2c04f2c004be3f8f7d29ff3b4f0e3e0f7 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Thu, 2 Oct 2008 08:39:28 +0000 Subject: Convert various to new name scheme. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1306 5417fbe8-f217-4b02-8779-1006273d7864 --- include/depricated.h | 2 +- include/extern.h | 12 ++++++------ include/services.h | 12 ++++++------ src/bots.cpp | 2 +- src/botserv.c | 4 ++-- src/channels.c | 4 ++-- src/chanserv.c | 18 +++++++++--------- src/core/bs_bot.c | 4 ++-- src/core/cs_drop.c | 4 ++-- src/core/cs_forbid.c | 2 +- src/core/cs_getpass.c | 2 +- src/core/cs_invite.c | 2 +- src/core/cs_set.c | 2 +- src/core/cs_suspend.c | 4 ++-- src/core/cs_topic.c | 4 ++-- src/core/ns_drop.c | 6 +++--- src/core/ns_forbid.c | 2 +- src/core/ns_getpass.c | 4 ++-- src/core/ns_saset.c | 2 +- src/core/ns_suspend.c | 4 ++-- src/core/os_akill.c | 2 +- src/core/os_chankill.c | 2 +- src/core/os_clearmodes.c | 2 +- src/core/os_defcon.c | 2 +- src/core/os_global.c | 2 +- src/core/os_jupe.c | 2 +- src/core/os_kick.c | 2 +- src/core/os_mode.c | 2 +- src/core/os_noop.c | 2 +- src/core/os_oline.c | 4 ++-- src/core/os_raw.c | 2 +- src/core/os_set.c | 8 ++++---- src/core/os_sgline.c | 2 +- src/core/os_sqline.c | 2 +- src/core/os_svsnick.c | 2 +- src/core/os_szline.c | 2 +- src/core/os_umode.c | 2 +- src/datafiles.c | 10 +++++----- src/hostserv.c | 14 +++++++------- src/init.c | 4 ++-- src/ircd.c | 26 +++++++++++++------------- src/log.c | 6 +++--- src/main.c | 22 +++++++++++----------- src/messages.c | 2 +- src/modules.c | 4 ++-- src/modules/cs_appendtopic.c | 4 ++-- src/modules/os_info.c | 2 +- src/news.c | 2 +- src/nickserv.c | 2 +- src/operserv.c | 14 +++++++------- src/protocol/bahamut.c | 8 ++++---- src/protocol/bahamut.h | 4 ++-- src/protocol/charybdis.c | 16 ++++++++-------- src/protocol/charybdis.h | 12 ++++++------ src/protocol/inspircd11.c | 18 +++++++++--------- src/protocol/inspircd11.h | 4 ++-- src/protocol/obsolete/hybrid.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/hybrid.h | 14 +++++++------- src/protocol/obsolete/plexus3.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/plexus3.h | 14 +++++++------- src/protocol/obsolete/ptlink.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/ptlink.h | 14 +++++++------- src/protocol/obsolete/rageircd.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/rageircd.h | 14 +++++++------- src/protocol/obsolete/solidircd.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/solidircd.h | 14 +++++++------- src/protocol/obsolete/ultimate3.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/ultimate3.h | 14 +++++++------- src/protocol/obsolete/viagra.c | 32 ++++++++++++++++---------------- src/protocol/obsolete/viagra.h | 14 +++++++------- src/protocol/ratbox.c | 16 ++++++++-------- src/protocol/ratbox.h | 12 ++++++------ src/protocol/unreal32.c | 8 ++++---- src/protocol/unreal32.h | 4 ++-- src/servers.c | 2 +- src/sessions.c | 8 ++++---- 76 files changed, 342 insertions(+), 342 deletions(-) diff --git a/include/depricated.h b/include/depricated.h index 8f127441e..0be4108f7 100644 --- a/include/depricated.h +++ b/include/depricated.h @@ -35,7 +35,7 @@ #define s_sgline(mask, reason) anope_cmd_sgline(mask, reason) #define s_szline(mask, reason) anope_cmd_szline(mask, reason) #define s_unsgline(mask) anope_cmd_unsgline(mask) -#define s_unsqline(mask) anope_cmd_unsqline(mask) +#define s_unsqline(mask) anope_SendSQLineDel(mask) #define s_unszline(mask) anope_cmd_unszline(mask) #define s_rakill(user, host) anope_SendAkillDel(user, host) diff --git a/include/extern.h b/include/extern.h index 8a48bf69f..2bf286b00 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1123,9 +1123,9 @@ E void anope_cmd_vhost_on(const char *nick, const char *vIdent, const char *vhos E void anope_SendVhostDel(User *u); E void anope_cmd_connect(); /* Connect */ E void anope_cmd_ea(); /* EA */ -E void anope_cmd_global(const char *source, const char *fmt, ...); /* GLOBOPS */ -E void anope_cmd_invite(const char *source, const char *chan, const char *nick); /* INVITE */ -E void anope_cmd_join(const char *user, const char *channel, time_t chantime); /* JOIN */ +E void anope_SendGlobops(const char *source, const char *fmt, ...); /* GLOBOPS */ +E void anope_SendInvite(const char *source, const char *chan, const char *nick); /* INVITE */ +E void anope_SendJoin(const char *user, const char *channel, time_t chantime); /* JOIN */ E void anope_SendKick(const char *source, const char *chan, const char *user, const char *fmt, ...); /* KICK */ E void anope_SendMode(const char *source, const char *dest, const char *fmt, ...); /* MODE */ E void anope_cmd_tmode(const char *source, const char *dest, const char *fmt, ...); /* TMODE */ @@ -1139,9 +1139,9 @@ E void anope_cmd_message(const char *source, const char *dest, const char *fmt, E void anope_SendNoticeChanops(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */ E void anope_cmd_notice(const char *source, const char *dest, const char *msg); /* NOTICE */ E void anope_SendGlobalNotice(const char *source, const char *dest, const char *msg); /* NOTICE */ -E void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...); /* PART */ +E void anope_SendPart(const char *nick, const char *chan, const char *fmt, ...); /* PART */ E void anope_cmd_pass(const char *pass); /* PASS */ -E void anope_cmd_pong(const char *servname, const char *who); /* PONG */ +E void anope_SendPong(const char *servname, const char *who); /* PONG */ E void anope_cmd_privmsg(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */ E void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */ E void anope_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg); /* PRIVMSG */ @@ -1168,7 +1168,7 @@ E void anope_cmd_svspart(const char *source, const char *nick,const char *chan); E void anope_cmd_swhois(const char *source, const char *who, const char *mask); /* SWHOIS */ E void anope_cmd_topic(const char *whosets, const char *chan, const char *whosetit, const char *topic, time_t when); /* TOPIC */ E void anope_cmd_unsgline(const char *mask); /* UNSGLINE */ -E void anope_cmd_unsqline(const char *user); /* UNSQLINE */ +E void anope_SendSQLineDel(const char *user); /* UNSQLINE */ E void anope_cmd_unszline(const char *mask); /* UNSZLINE */ E void anope_cmd_eob(); /* EOB - end of burst */ E void anope_cmd_burst(); /* BURST - use eob to send burst 0 */ diff --git a/include/services.h b/include/services.h index f6feee436..d303c0e01 100644 --- a/include/services.h +++ b/include/services.h @@ -1273,24 +1273,24 @@ class IRCDProto { if (buf) send_cmd(source, "QUIT :%s", buf); else send_cmd(source, "QUIT"); } - virtual void cmd_pong(const char *servname, const char *who) + virtual void SendPong(const char *servname, const char *who) { send_cmd(servname, "PONG %s", who); } - virtual void cmd_join(const char *, const char *, time_t) = 0; - virtual void cmd_unsqline(const char *) = 0; - virtual void cmd_invite(const char *source, const char *chan, const char *nick) + virtual void SendJoin(const char *, const char *, time_t) = 0; + virtual void SendSQLineDel(const char *) = 0; + virtual void SendInvite(const char *source, const char *chan, const char *nick) { if (!source || !chan || !nick) return; send_cmd(source, "INVITE %s %s", nick, chan); } - virtual void cmd_part(const char *nick, const char *chan, const char *buf) + virtual void SendPart(const char *nick, const char *chan, const char *buf) { if (!nick || !chan) return; if (buf) send_cmd(nick, "PART %s :%s", chan, buf); else send_cmd(nick, "PART %s", chan); } - virtual void cmd_global(const char *source, const char *buf) + virtual void SendGlobops(const char *source, const char *buf) { if (!buf) return; send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf); diff --git a/src/bots.cpp b/src/bots.cpp index fe2c0e1ce..5195b23cf 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -108,7 +108,7 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci) send_event(EVENT_BOT_UNASSIGN, 2, ci->name, ci->bi->nick); if (u && ci->c && ci->c->usercount >= BSMinUsers) - anope_cmd_part(ci->bi->nick, ci->name, "UNASSIGN from %s", u->nick); + anope_SendPart(ci->bi->nick, ci->name, "UNASSIGN from %s", u->nick); ci->bi->chancount--; ci->bi = NULL; diff --git a/src/botserv.c b/src/botserv.c index b1686fcdc..8d529af0e 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -491,7 +491,7 @@ void load_bs_dbase(void) restore_db(f); \ log_perror("Write error on %s", BotDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", BotDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", BotDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ @@ -750,7 +750,7 @@ void bot_join(ChannelInfo * ci) "%s invited %s into the channel.", ci->bi->nick, ci->bi->nick); } - anope_cmd_join(ci->bi->nick, ci->c->name, ci->c->creation_time); + anope_SendJoin(ci->bi->nick, ci->c->name, ci->c->creation_time); anope_SendBotOp(ci->bi->nick, ci->c->name); send_event(EVENT_BOT_JOIN, 2, ci->name, ci->bi->nick); } diff --git a/src/channels.c b/src/channels.c index 7be1dfbbd..7a72a29c0 100644 --- a/src/channels.c +++ b/src/channels.c @@ -49,7 +49,7 @@ void chan_deluser(User * user, Channel * c) c->usercount--; if (s_BotServ && c->ci && c->ci->bi && c->usercount == BSMinUsers - 1) { - anope_cmd_part(c->ci->bi->nick, c->name, NULL); + anope_SendPart(c->ci->bi->nick, c->name, NULL); } if (!c->users) @@ -790,7 +790,7 @@ void do_sjoin(const char *source, int ac, const char **av) } if (c->ci && c->ci->bi) { /* This is ugly, but it always works */ - anope_cmd_part(c->ci->bi->nick, c->name, "TS reop"); + anope_SendPart(c->ci->bi->nick, c->name, "TS reop"); bot_join(c->ci); } /* XXX simple modes and bans */ diff --git a/src/chanserv.c b/src/chanserv.c index fd4d495fa..7f3570b3d 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -611,7 +611,7 @@ void load_cs_dbase(void) restore_db(f); \ log_perror("Write error on %s", ChanDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", ChanDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", ChanDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ @@ -876,7 +876,7 @@ void check_modes(Channel * c) /* Check for mode bouncing */ if (c->server_modecount >= 3 && c->chanserv_modecount >= 3) { - anope_cmd_global(NULL, + anope_SendGlobops(NULL, "Warning: unable to set modes on channel %s. " "Are your servers' U:lines configured correctly?", c->name); @@ -1244,7 +1244,7 @@ static void timeout_leave(Timeout * to) if (ci) /* Check cos the channel may be dropped in the meantime */ ci->flags &= ~CI_INHABIT; - anope_cmd_part(s_ChanServ, chan, NULL); + anope_SendPart(s_ChanServ, chan, NULL); free(to->data); } @@ -1352,7 +1352,7 @@ int check_kick(User * user, const char *chan, time_t chants) * c may be NULL even if it exists */ if ((!(c = findchan(chan)) || c->usercount == 0) && !(ci->flags & CI_INHABIT)) { - anope_cmd_join(s_ChanServ, chan, (c ? c->creation_time : chants)); + anope_SendJoin(s_ChanServ, chan, (c ? c->creation_time : chants)); /* Lets hide the channel from /list just incase someone does /list * while we are here. - katsklaw */ @@ -1448,7 +1448,7 @@ void restore_topic(const char *chan) } if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_join(s_ChanServ, chan, c->creation_time); + anope_SendJoin(s_ChanServ, chan, c->creation_time); anope_SendMode(NULL, chan, "+o %s", s_ChanServ); } } @@ -1456,7 +1456,7 @@ void restore_topic(const char *chan) c->topic ? c->topic : "", c->topic_time); if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_part(s_ChanServ, c->name, NULL); + anope_SendPart(s_ChanServ, c->name, NULL); } } } @@ -1510,7 +1510,7 @@ int check_topiclock(Channel * c, time_t topic_time) if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_join(s_ChanServ, c->name, c->creation_time); + anope_SendJoin(s_ChanServ, c->name, c->creation_time); anope_SendMode(NULL, c->name, "+o %s", s_ChanServ); } } @@ -1520,7 +1520,7 @@ int check_topiclock(Channel * c, time_t topic_time) if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_part(s_ChanServ, c->ci->name, NULL); + anope_SendPart(s_ChanServ, c->ci->name, NULL); } } return 1; @@ -1778,7 +1778,7 @@ int delchan(ChannelInfo * ci) } if (ci->c) { if (ci->bi && ci->c->usercount >= BSMinUsers) { - anope_cmd_part(ci->bi->nick, ci->c->name, NULL); + anope_SendPart(ci->bi->nick, ci->c->name, NULL); } ci->c->ci = NULL; } diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index cce84d789..eba82f5f9 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -267,7 +267,7 @@ int do_bot(User * u) /* The new nick is really different, so we remove the Q line for the old nick. */ if (ircd->sqline) { - anope_cmd_unsqline(bi->nick); + anope_SendSQLineDel(bi->nick); } /* We check whether user with this nick is online, and kill it if so */ @@ -324,7 +324,7 @@ int do_bot(User * u) "Quit: Help! I'm being deleted by %s!", u->nick); if (ircd->sqline) { - anope_cmd_unsqline(bi->nick); + anope_SendSQLineDel(bi->nick); } delete bi; diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c index 43305c158..61aad543a 100644 --- a/src/core/cs_drop.c +++ b/src/core/cs_drop.c @@ -104,7 +104,7 @@ int do_drop(User * u) } if (ircd->chansqline && (ci->flags & CI_VERBOTEN)) { - anope_cmd_unsqline(ci->name); + anope_SendSQLineDel(ci->name); } alog("%s: Channel %s dropped by %s!%s@%s (founder: %s)", @@ -117,7 +117,7 @@ int do_drop(User * u) * drop the channel before issuing the wallops. */ if (WallDrop && is_servadmin && level < ACCESS_FOUNDER) - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick, chan); diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c index ac9073185..599f51605 100644 --- a/src/core/cs_forbid.c +++ b/src/core/cs_forbid.c @@ -118,7 +118,7 @@ int do_forbid(User * u) } if (WallForbid) - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick, ci->name); diff --git a/src/core/cs_getpass.c b/src/core/cs_getpass.c index df2ce9b2d..de699e135 100644 --- a/src/core/cs_getpass.c +++ b/src/core/cs_getpass.c @@ -88,7 +88,7 @@ int do_getpass(User * u) alog("%s: %s!%s@%s used GETPASS on %s", s_ChanServ, u->nick, u->username, u->host, ci->name); if (WallGetpass) { - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 used GETPASS on channel \2%s\2", u->nick, chan); } diff --git a/src/core/cs_invite.c b/src/core/cs_invite.c index 60e92fb80..5e538d791 100644 --- a/src/core/cs_invite.c +++ b/src/core/cs_invite.c @@ -84,7 +84,7 @@ int do_invite(User * u) } else if (!u || !check_access(u, ci, CA_INVITE)) { notice_lang(s_ChanServ, u, PERMISSION_DENIED); } else { - anope_cmd_invite(whosends(ci), chan, u->nick); + anope_SendInvite(whosends(ci), chan, u->nick); } return MOD_CONT; } diff --git a/src/core/cs_set.c b/src/core/cs_set.c index 0616e933b..67c1b5f99 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -393,7 +393,7 @@ int do_set_password(User * u, ChannelInfo * ci, char *param) alog("%s: %s!%s@%s set password as Services admin for %s", s_ChanServ, u->nick, u->username, u->host, ci->name); if (WallSetpass) - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 set password as Services admin for channel \2%s\2", u->nick, ci->name); } else { diff --git a/src/core/cs_suspend.c b/src/core/cs_suspend.c index b379d8e24..855e6b531 100644 --- a/src/core/cs_suspend.c +++ b/src/core/cs_suspend.c @@ -133,7 +133,7 @@ int do_suspend(User * u) } if (WallForbid) - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick, ci->name); @@ -194,7 +194,7 @@ int do_unsuspend(User * u) } if (WallForbid) - anope_cmd_global(s_ChanServ, + anope_SendGlobops(s_ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick, ci->name); diff --git a/src/core/cs_topic.c b/src/core/cs_topic.c index 0a7854f69..a8c9533a7 100644 --- a/src/core/cs_topic.c +++ b/src/core/cs_topic.c @@ -103,7 +103,7 @@ int do_cs_topic(User * u) s_ChanServ, u->nick, u->username, u->host, c->name); if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_join(s_ChanServ, c->name, c->creation_time); + anope_SendJoin(s_ChanServ, c->name, c->creation_time); anope_SendMode(NULL, c->name, "+o %s", s_ChanServ); } } @@ -111,7 +111,7 @@ int do_cs_topic(User * u) c->topic_time); if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_part(s_ChanServ, c->name, NULL); + anope_SendPart(s_ChanServ, c->name, NULL); } } } diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c index e191a8395..416ecd58d 100644 --- a/src/core/ns_drop.c +++ b/src/core/ns_drop.c @@ -88,7 +88,7 @@ int do_drop(User * u) if (readonly) notice_lang(s_NickServ, u, READ_ONLY_MODE); if (WallDrop) - anope_cmd_global(s_NickServ, + anope_SendGlobops(s_NickServ, "\2%s\2 used DROP on \2%s\2", u->nick, nick); alog("%s: %s!%s@%s dropped nickname %s (e-mail: %s)", @@ -120,7 +120,7 @@ int do_drop(User * u) notice_lang(s_NickServ, u, READ_ONLY_MODE); if (ircd->sqline && (na->status & NS_VERBOTEN)) { - anope_cmd_unsqline(na->nick); + anope_SendSQLineDel(na->nick); } alog("%s: %s!%s@%s dropped nickname %s (group %s) (e-mail: %s)", @@ -132,7 +132,7 @@ int do_drop(User * u) if (!is_mine) { if (WallDrop) - anope_cmd_global(s_NickServ, "\2%s\2 used DROP on \2%s\2", + anope_SendGlobops(s_NickServ, "\2%s\2 used DROP on \2%s\2", u->nick, nick); notice_lang(s_NickServ, u, NICK_X_DROPPED, nick); } else { diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c index 6612be06e..ce26af71e 100644 --- a/src/core/ns_forbid.c +++ b/src/core/ns_forbid.c @@ -119,7 +119,7 @@ int do_forbid(User * u) } if (WallForbid) - anope_cmd_global(s_NickServ, "\2%s\2 used FORBID on \2%s\2", + anope_SendGlobops(s_NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick, nick); alog("%s: %s set FORBID for nick %s", s_NickServ, u->nick, nick); diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c index 938b75f8d..6079ca2ba 100644 --- a/src/core/ns_getpass.c +++ b/src/core/ns_getpass.c @@ -80,7 +80,7 @@ int do_getpass(User * u) alog("%s: %s!%s@%s used GETPASS on %s", s_NickServ, u->nick, u->username, u->host, nick); if (WallGetpass) - anope_cmd_global(s_NickServ, + anope_SendGlobops(s_NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick, nick); notice_lang(s_NickServ, u, NICK_GETPASS_PASSCODE_IS, nick, @@ -100,7 +100,7 @@ int do_getpass(User * u) alog("%s: %s!%s@%s used GETPASS on %s", s_NickServ, u->nick, u->username, u->host, nick); if (WallGetpass) - anope_cmd_global(s_NickServ, "\2%s\2 used GETPASS on \2%s\2", + anope_SendGlobops(s_NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick, nick); notice_lang(s_NickServ, u, NICK_GETPASS_PASSWORD_IS, nick, tmp_pass); diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c index 88db0526b..7261a55ce 100644 --- a/src/core/ns_saset.c +++ b/src/core/ns_saset.c @@ -265,7 +265,7 @@ int do_saset_password(User * u, NickCore * nc, char *param) u->nick, u->username, u->host, nc->display, (nc->email ? nc->email : "none")); if (WallSetpass) - anope_cmd_global(s_NickServ, + anope_SendGlobops(s_NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick, nc->display); return MOD_CONT; diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c index 1cf9f7030..53823f75f 100644 --- a/src/core/ns_suspend.c +++ b/src/core/ns_suspend.c @@ -119,7 +119,7 @@ int do_suspend(User * u) } if (WallForbid) - anope_cmd_global(s_NickServ, "\2%s\2 used SUSPEND on \2%s\2", + anope_SendGlobops(s_NickServ, "\2%s\2 used SUSPEND on \2%s\2", u->nick, nick); alog("%s: %s set SUSPEND for nick %s", s_NickServ, u->nick, nick); @@ -172,7 +172,7 @@ int do_unsuspend(User * u) na->nc->flags &= ~NI_SUSPENDED; if (WallForbid) - anope_cmd_global(s_NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", + anope_SendGlobops(s_NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", u->nick, nick); alog("%s: %s set UNSUSPEND for nick %s", s_NickServ, u->nick, diff --git a/src/core/os_akill.c b/src/core/os_akill.c index 689e00b43..d2250fef2 100644 --- a/src/core/os_akill.c +++ b/src/core/os_akill.c @@ -178,7 +178,7 @@ int do_akill(User * u) (wall_expiry == 1) ? "" : "s"); } - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "%s added an AKILL for %s (%s) (%s)", u->nick, mask, reason, buf); } diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index 40609440c..c92a6e481 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -118,7 +118,7 @@ int do_chankill(User * u) cu->user->host, NULL, NULL); } if (WallOSAkill) { - anope_cmd_global(s_OperServ, "%s used CHANKILL on %s (%s)", + anope_SendGlobops(s_OperServ, "%s used CHANKILL on %s (%s)", u->nick, channel, reason); } } else { diff --git a/src/core/os_clearmodes.c b/src/core/os_clearmodes.c index 51434212d..46adf090a 100644 --- a/src/core/os_clearmodes.c +++ b/src/core/os_clearmodes.c @@ -99,7 +99,7 @@ int do_clearmodes(User * u) } if (WallOSClearmodes) { - anope_cmd_global(s_OperServ, "%s used CLEARMODES%s on %s", + anope_SendGlobops(s_OperServ, "%s used CLEARMODES%s on %s", u->nick, all ? " ALL" : "", chan); } if (all) { diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index 4ba64c285..e2ab6da80 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -105,7 +105,7 @@ int do_defcon(User * u) notice_lang(s_OperServ, u, OPER_DEFCON_CHANGED, DefConLevel); defcon_sendlvls(u); alog("Defcon level changed to %d by Oper %s", newLevel, u->nick); - anope_cmd_global(s_OperServ, getstring2(NULL, OPER_DEFCON_WALL), + anope_SendGlobops(s_OperServ, getstring2(NULL, OPER_DEFCON_WALL), u->nick, newLevel); /* Global notice the user what is happening. Also any Message that the Admin would like to add. Set in config file. */ diff --git a/src/core/os_global.c b/src/core/os_global.c index 300b83867..befaf881c 100644 --- a/src/core/os_global.c +++ b/src/core/os_global.c @@ -75,7 +75,7 @@ int do_global(User * u) return MOD_CONT; } if (WallOSGlobal) - anope_cmd_global(s_OperServ, "\2%s\2 just used GLOBAL command.", + anope_SendGlobops(s_OperServ, "\2%s\2 just used GLOBAL command.", u->nick); oper_global(u->nick, "%s", msg); return MOD_CONT; diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c index a666a02cf..be0d0bb50 100644 --- a/src/core/os_jupe.c +++ b/src/core/os_jupe.c @@ -80,7 +80,7 @@ int do_jupe(User * u) anope_cmd_jupe(jserver, u->nick, reason); if (WallOSJupe) - anope_cmd_global(s_OperServ, "\2%s\2 used JUPE on \2%s\2", + anope_SendGlobops(s_OperServ, "\2%s\2 used JUPE on \2%s\2", u->nick, jserver); } } diff --git a/src/core/os_kick.c b/src/core/os_kick.c index 98c02f62a..ee256a463 100644 --- a/src/core/os_kick.c +++ b/src/core/os_kick.c @@ -87,7 +87,7 @@ int do_os_kick(User * u) } anope_SendKick(s_OperServ, chan, nick, "%s (%s)", u->nick, s); if (WallOSKick) - anope_cmd_global(s_OperServ, "%s used KICK on %s/%s", u->nick, + anope_SendGlobops(s_OperServ, "%s used KICK on %s/%s", u->nick, nick, chan); argv[0] = sstrdup(chan); argv[1] = sstrdup(nick); diff --git a/src/core/os_mode.c b/src/core/os_mode.c index 09e82f59f..7925679d7 100644 --- a/src/core/os_mode.c +++ b/src/core/os_mode.c @@ -95,7 +95,7 @@ int do_os_mode(User * u) free(av); if (WallOSMode) - anope_cmd_global(s_OperServ, "%s used MODE %s on %s", u->nick, + anope_SendGlobops(s_OperServ, "%s used MODE %s on %s", u->nick, modes, chan); } return MOD_CONT; diff --git a/src/core/os_noop.c b/src/core/os_noop.c index 92b37cc20..ec2f71e71 100644 --- a/src/core/os_noop.c +++ b/src/core/os_noop.c @@ -84,7 +84,7 @@ int do_noop(User * u) snprintf(reason, sizeof(reason), "NOOP command used by %s", u->nick); if (WallOSNoOp) - anope_cmd_global(s_OperServ, "\2%s\2 used NOOP on \2%s\2", + anope_SendGlobops(s_OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick, server); notice_lang(s_OperServ, u, OPER_NOOP_SET, server); diff --git a/src/core/os_oline.c b/src/core/os_oline.c index bf85b38ca..8a9adb9c9 100644 --- a/src/core/os_oline.c +++ b/src/core/os_oline.c @@ -94,12 +94,12 @@ int do_operoline(User * u) common_svsmode(u2, "+o", NULL); notice_lang(s_OperServ, u2, OPER_OLINE_IRCOP); notice_lang(s_OperServ, u, OPER_OLINE_SUCCESS, flags, nick); - anope_cmd_global(s_OperServ, "\2%s\2 used OLINE for %s", + anope_SendGlobops(s_OperServ, "\2%s\2 used OLINE for %s", u->nick, nick); } else if (u2 && flags[0] == '-') { anope_cmd_svso(s_OperServ, nick, flags); notice_lang(s_OperServ, u, OPER_OLINE_SUCCESS, flags, nick); - anope_cmd_global(s_OperServ, "\2%s\2 used OLINE for %s", + anope_SendGlobops(s_OperServ, "\2%s\2 used OLINE for %s", u->nick, nick); } else syntax_error(s_OperServ, u, "OLINE", OPER_OLINE_SYNTAX); diff --git a/src/core/os_raw.c b/src/core/os_raw.c index 5ef92e082..6628adb9d 100644 --- a/src/core/os_raw.c +++ b/src/core/os_raw.c @@ -67,7 +67,7 @@ int do_raw(User * u) char *kw = strtok(text, " "); while (kw && *kw == ':') kw = strtok(NULL, " "); - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "\2%s\2 used RAW command for \2%s\2", u->nick, (kw ? kw : "\2non RFC compliant message\2")); diff --git a/src/core/os_set.c b/src/core/os_set.c index ba26c9eac..5e3b8793c 100644 --- a/src/core/os_set.c +++ b/src/core/os_set.c @@ -187,7 +187,7 @@ int do_set(User * u) if (LogChannel && (stricmp(setting, "on") == 0)) { if (ircd->join2msg) { c = findchan(LogChannel); - anope_cmd_join(s_GlobalNoticer, LogChannel, c ? c->creation_time : time(NULL)); + anope_SendJoin(s_GlobalNoticer, LogChannel, c ? c->creation_time : time(NULL)); } logchan = 1; alog("Now sending log messages to %s", LogChannel); @@ -195,7 +195,7 @@ int do_set(User * u) } else if (LogChannel && (stricmp(setting, "off") == 0)) { alog("No longer sending log messages to a channel"); if (ircd->join2msg) { - anope_cmd_part(s_GlobalNoticer, LogChannel, NULL); + anope_SendPart(s_GlobalNoticer, LogChannel, NULL); } logchan = 0; notice_lang(s_OperServ, u, OPER_SET_LOGCHAN_OFF); @@ -214,14 +214,14 @@ int do_set(User * u) u->isSuperAdmin = 1; notice_lang(s_OperServ, u, OPER_SUPER_ADMIN_ON); alog("%s: %s is a SuperAdmin ", s_OperServ, u->nick); - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, getstring2(NULL, OPER_SUPER_ADMIN_WALL_ON), u->nick); } else if (stricmp(setting, "off") == 0) { u->isSuperAdmin = 0; notice_lang(s_OperServ, u, OPER_SUPER_ADMIN_OFF); alog("%s: %s is no longer a SuperAdmin", s_OperServ, u->nick); - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, getstring2(NULL, OPER_SUPER_ADMIN_WALL_OFF), u->nick); } else { diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c index 34db555b8..5babb79e8 100644 --- a/src/core/os_sgline.c +++ b/src/core/os_sgline.c @@ -162,7 +162,7 @@ int do_sgline(User * u) (wall_expiry == 1) ? "" : "s"); } - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "%s added an SGLINE for %s (%s)", u->nick, mask, buf); } diff --git a/src/core/os_sqline.c b/src/core/os_sqline.c index d35982b0a..c79e6aff2 100644 --- a/src/core/os_sqline.c +++ b/src/core/os_sqline.c @@ -157,7 +157,7 @@ int do_sqline(User * u) (wall_expiry == 1) ? "" : "s"); } - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "%s added an SQLINE for %s (%s)", u->nick, mask, buf); } diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c index fa0bb0903..b6c269fa6 100644 --- a/src/core/os_svsnick.c +++ b/src/core/os_svsnick.c @@ -117,7 +117,7 @@ int do_svsnick(User * u) notice_lang(s_OperServ, u, NICK_X_FORBIDDEN, newnick); } else { notice_lang(s_OperServ, u, OPER_SVSNICK_NEWNICK, nick, newnick); - anope_cmd_global(s_OperServ, "%s used SVSNICK to change %s to %s", + anope_SendGlobops(s_OperServ, "%s used SVSNICK to change %s to %s", u->nick, nick, newnick); anope_cmd_svsnick(nick, newnick, time(NULL)); } diff --git a/src/core/os_szline.c b/src/core/os_szline.c index f4ad787f9..20882a7c9 100644 --- a/src/core/os_szline.c +++ b/src/core/os_szline.c @@ -154,7 +154,7 @@ int do_szline(User * u) (wall_expiry == 1) ? "" : "s"); } - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "%s added an SZLINE for %s (%s)", u->nick, mask, buf); } diff --git a/src/core/os_umode.c b/src/core/os_umode.c index 076d82096..d09627fc2 100644 --- a/src/core/os_umode.c +++ b/src/core/os_umode.c @@ -109,7 +109,7 @@ int do_operumodes(User * u) notice_lang(s_OperServ, u2, OPER_UMODE_CHANGED, u->nick); if (WallOSMode) - anope_cmd_global(s_OperServ, "\2%s\2 used UMODE on %s", + anope_SendGlobops(s_OperServ, "\2%s\2 used UMODE on %s", u->nick, nick); } return MOD_CONT; diff --git a/src/datafiles.c b/src/datafiles.c index 6dd7d40dd..10d078f11 100644 --- a/src/datafiles.c +++ b/src/datafiles.c @@ -93,7 +93,7 @@ static dbFILE *open_db_read(const char *service, const char *filename) #ifndef NOT_MAIN log_perror("Can't read %s database %s", service, filename); if (time(NULL) - lastwarn > WarningTimeout) { - anope_cmd_global(NULL, + anope_SendGlobops(NULL, "Write error on %s: Memory allocation failed", filename); lastwarn = time(NULL); @@ -111,7 +111,7 @@ static dbFILE *open_db_read(const char *service, const char *filename) log_perror("Can not read %s database %s", service, f->filename); if (time(NULL) - lastwarn > WarningTimeout) { - anope_cmd_global(NULL, "Write error on %s: %s", f->filename, + anope_SendGlobops(NULL, "Write error on %s: %s", f->filename, strerror(errno)); lastwarn = time(NULL); } @@ -198,7 +198,7 @@ static dbFILE *open_db_write(const char *service, const char *filename, static int walloped = 0; if (!walloped) { walloped++; - anope_cmd_global(NULL, "Can not back up %s database %s", + anope_SendGlobops(NULL, "Can not back up %s database %s", service, filename); } #ifdef _WIN32 @@ -248,7 +248,7 @@ static dbFILE *open_db_write(const char *service, const char *filename, static int walloped = 0; if (!walloped) { walloped++; - anope_cmd_global(NULL, "Can't write to %s database %s", + anope_SendGlobops(NULL, "Can't write to %s database %s", service, filename); } errno = errno_save; @@ -587,7 +587,7 @@ static void rename_database(char *name, char *ext) snprintf(destpath, sizeof(destpath), "backups/%s.%s", name, ext); if (rename(name, destpath) != 0) { alog("Backup of %s failed.", name); - anope_cmd_global(s_OperServ, "WARNING! Backup of %s failed.", + anope_SendGlobops(s_OperServ, "WARNING! Backup of %s failed.", name); } } diff --git a/src/hostserv.c b/src/hostserv.c index 65eab319a..9683712a7 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -104,7 +104,7 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, next = (HostCore *)malloc(sizeof(HostCore)); if (next == NULL) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to create the vHost LL, problems i sense.."); } else { next->nick = (char *)malloc(sizeof(char) * strlen(nick) + 1); @@ -114,7 +114,7 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, next->vIdent = (char *)malloc(sizeof(char) * strlen(vIdent) + 1); if ((next->nick == NULL) || (next->vHost == NULL) || (next->creator == NULL)) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to create the vHost LL, problems i sense.."); return NULL; } @@ -123,7 +123,7 @@ HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, strcpy(next->creator, creator); if (vIdent) { if ((next->vIdent == NULL)) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to create the vHost LL, problems i sense.."); return NULL; } @@ -192,7 +192,7 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, newCore = (HostCore *)malloc(sizeof(HostCore)); if (newCore == NULL) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to insert into the vHost LL, problems i sense.."); return NULL; } else { @@ -203,7 +203,7 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, newCore->vIdent = (char *)malloc(sizeof(char) * strlen(vIdent) + 1); if ((newCore->nick == NULL) || (newCore->vHost == NULL) || (newCore->creator == NULL)) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to create the vHost LL, problems i sense.."); return NULL; } @@ -212,7 +212,7 @@ HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, strcpy(newCore->creator, creator); if (vIdent) { if ((newCore->vIdent == NULL)) { - anope_cmd_global(s_HostServ, + anope_SendGlobops(s_HostServ, "Unable to allocate memory to create the vHost LL, problems i sense.."); return NULL; } @@ -463,7 +463,7 @@ void load_hs_dbase_v3(dbFILE * f) restore_db(f); \ log_perror("Write error on %s", HostDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", HostDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", HostDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ diff --git a/src/init.c b/src/init.c index be5ac206b..431e11941 100644 --- a/src/init.c +++ b/src/init.c @@ -726,7 +726,7 @@ int init_secondary(int ac, char **av) /* Announce a logfile error if there was one */ if (openlog_failed) { - anope_cmd_global(NULL, "Warning: couldn't open logfile: %s", + anope_SendGlobops(NULL, "Warning: couldn't open logfile: %s", strerror(openlog_errno)); } @@ -736,7 +736,7 @@ int init_secondary(int ac, char **av) /* And hybrid needs Global joined in the logchan */ if (logchan && ircd->join2msg) { /* XXX might desync */ - anope_cmd_join(s_GlobalNoticer, LogChannel, time(NULL)); + anope_SendJoin(s_GlobalNoticer, LogChannel, time(NULL)); } anope_cmd_eob(); diff --git a/src/ircd.c b/src/ircd.c index 4a46b69d8..a8b60756f 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -202,27 +202,27 @@ void anope_SendQuit(const char *source, const char *fmt, ...) ircdproto->SendQuit(source, buf); } -void anope_cmd_pong(const char *servname, const char *who) +void anope_SendPong(const char *servname, const char *who) { - ircdproto->cmd_pong(servname, who); + ircdproto->SendPong(servname, who); } -void anope_cmd_join(const char *user, const char *channel, time_t chantime) +void anope_SendJoin(const char *user, const char *channel, time_t chantime) { - ircdproto->cmd_join(user, channel, chantime); + ircdproto->SendJoin(user, channel, chantime); } -void anope_cmd_unsqline(const char *user) +void anope_SendSQLineDel(const char *user) { - ircdproto->cmd_unsqline(user); + ircdproto->SendSQLineDel(user); } -void anope_cmd_invite(const char *source, const char *chan, const char *nick) +void anope_SendInvite(const char *source, const char *chan, const char *nick) { - ircdproto->cmd_invite(source, chan, nick); + ircdproto->SendInvite(source, chan, nick); } -void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...) +void anope_SendPart(const char *nick, const char *chan, const char *fmt, ...) { if (fmt) { va_list args; @@ -230,12 +230,12 @@ void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...) va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); va_end(args); - ircdproto->cmd_part(nick, chan, buf); + ircdproto->SendPart(nick, chan, buf); } - else ircdproto->cmd_part(nick, chan, NULL); + else ircdproto->SendPart(nick, chan, NULL); } -void anope_cmd_global(const char *source, const char *fmt, ...) +void anope_SendGlobops(const char *source, const char *fmt, ...) { va_list args; char buf[BUFSIZE] = ""; @@ -244,7 +244,7 @@ void anope_cmd_global(const char *source, const char *fmt, ...) vsnprintf(buf, BUFSIZE - 1, fmt, args); va_end(args); } - ircdproto->cmd_global(source, buf); + ircdproto->SendGlobops(source, buf); } void anope_cmd_sqline(const char *mask, const char *reason) diff --git a/src/log.c b/src/log.c index a4f354993..4c374b822 100644 --- a/src/log.c +++ b/src/log.c @@ -245,7 +245,7 @@ void fatal(const char *fmt, ...) if (nofork) fprintf(stderr, "%s FATAL: %s\n", buf, buf2); if (servsock >= 0) - anope_cmd_global(NULL, "FATAL ERROR! %s", buf2); + anope_SendGlobops(NULL, "FATAL ERROR! %s", buf2); /* one of the many places this needs to be called from */ ModuleRunTimeDirCleanUp(); @@ -283,7 +283,7 @@ void fatal_perror(const char *fmt, ...) fprintf(stderr, "%s FATAL: %s: %s\n", buf, buf2, strerror(errno_save)); if (servsock >= 0) - anope_cmd_global(NULL, "FATAL ERROR! %s: %s", buf2, + anope_SendGlobops(NULL, "FATAL ERROR! %s: %s", buf2, strerror(errno_save)); /* one of the many places this needs to be called from */ @@ -326,7 +326,7 @@ void fatal_sockerror(const char *fmt, ...) fprintf(stderr, "%s FATAL: %s: %s\n", buf, buf2, ano_sockstrerror(errno_save)); if (servsock >= 0) - anope_cmd_global(NULL, "FATAL ERROR! %s: %s", buf2, + anope_SendGlobops(NULL, "FATAL ERROR! %s: %s", buf2, strerror(errno_save)); /* one of the many places this needs to be called from */ diff --git a/src/main.c b/src/main.c index 25bc5c090..30cff5670 100644 --- a/src/main.c +++ b/src/main.c @@ -183,41 +183,41 @@ void save_databases(void) * exists we're safe. -GD */ if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); waiting = -12; save_cs_rdb_dbase(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); if (PreNickDBName) { save_ns_req_rdb_dbase(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); waiting = -13; } if (s_BotServ) { waiting = -14; save_bs_rdb_dbase(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); } if (s_HostServ) { waiting = -15; save_hs_rdb_dbase(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); } waiting = -16; save_os_rdb_dbase(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); waiting = -17; save_rdb_news(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); waiting = -18; save_rdb_exceptions(); if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); + anope_SendPong(ServerName, ServerName); } #endif waiting = -20; @@ -385,7 +385,7 @@ void sighandler(int signum) inbuf[447] = '>'; inbuf[448] = 0; } - anope_cmd_global(NULL, "PANIC! buffer = %s\r\n", inbuf); + anope_SendGlobops(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); } - anope_cmd_global(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); + anope_SendGlobops(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); alog("PANIC! %s (%s)", buf, strsignal(signum)); modules_unload_all(false, true); } @@ -585,7 +585,7 @@ int main(int ac, char **av, char **envp) if (!readonly && (save_data || t - last_update >= UpdateTimeout)) { if (delayed_quit) - anope_cmd_global(NULL, + anope_SendGlobops(NULL, "Updating databases on shutdown, please wait."); save_databases(); diff --git a/src/messages.c b/src/messages.c index 926c24dcc..a46b3834c 100644 --- a/src/messages.c +++ b/src/messages.c @@ -166,7 +166,7 @@ int m_privmsg(const char *source, const char *receiver, const char *msg) if (!is_oper(u) && OSOpersOnly) { notice_lang(s_OperServ, u, ACCESS_DENIED); if (WallBadOS) - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "Denied access to %s from %s!%s@%s (non-oper)", s_OperServ, u->nick, u->username, u->host); diff --git a/src/modules.c b/src/modules.c index dd1563bd9..6f62840c8 100644 --- a/src/modules.c +++ b/src/modules.c @@ -670,7 +670,7 @@ int loadModule(Module * m, User * u) } if (u) { - anope_cmd_global(s_OperServ, "%s loaded module %s", u->nick, + anope_SendGlobops(s_OperServ, "%s loaded module %s", u->nick, m->name); notice_lang(s_OperServ, u, OPER_MODULE_LOADED, m->name); } @@ -726,7 +726,7 @@ int unloadModule(Module * m, User * u) return MOD_ERR_NOUNLOAD; } else { if (u) { - anope_cmd_global(s_OperServ, "%s unloaded module %s", u->nick, + anope_SendGlobops(s_OperServ, "%s unloaded module %s", u->nick, m->name); notice_lang(s_OperServ, u, OPER_MODULE_UNLOADED, m->name); } diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 50e8af1d3..665782c73 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -147,14 +147,14 @@ int my_cs_appendtopic(User * u) s_ChanServ, u->nick, u->username, u->host, c->name); if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_join(s_ChanServ, c->name, c->creation_time); + anope_SendJoin(s_ChanServ, c->name, c->creation_time); anope_SendMode(NULL, c->name, "+o %s", s_ChanServ); } } anope_cmd_topic(whosends(ci), c->name, u->nick, topic, c->topic_time); if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { - anope_cmd_part(s_ChanServ, c->name, NULL); + anope_SendPart(s_ChanServ, c->name, NULL); } } } diff --git a/src/modules/os_info.c b/src/modules/os_info.c index 251fb62d8..f77628978 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -419,7 +419,7 @@ int mSaveData(int argc, char **argv) if (!stricmp(argv[0], EVENT_START)) { if ((out = fopen(OSInfoDBName, "w")) == NULL) { alog("os_info: ERROR: can not open the database file!"); - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, "os_info: ERROR: can not open the database file!"); ret = 1; } else { diff --git a/src/news.c b/src/news.c index 0e0dd426a..aea3cc32d 100644 --- a/src/news.c +++ b/src/news.c @@ -203,7 +203,7 @@ void load_news() restore_db(f); \ log_perror("Write error on %s", NewsDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", NewsDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", NewsDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ diff --git a/src/nickserv.c b/src/nickserv.c index 7d8ebb6ce..f1acba6eb 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -621,7 +621,7 @@ void load_ns_dbase(void) restore_db(f); \ log_perror("Write error on %s", NickDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", NickDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", NickDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ diff --git a/src/operserv.c b/src/operserv.c index 1bee93082..e5849423c 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -423,7 +423,7 @@ void load_os_dbase(void) restore_db(f); \ log_perror("Write error on %s", OperDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ - anope_cmd_global(NULL, "Write error on %s: %s", OperDBName, \ + anope_SendGlobops(NULL, "Write error on %s: %s", OperDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ @@ -903,7 +903,7 @@ void expire_akills(void) continue; if (WallAkillExpire) - anope_cmd_global(s_OperServ, "AKILL on %s@%s has expired", + anope_SendGlobops(s_OperServ, "AKILL on %s@%s has expired", ak->user, ak->host); slist_delete(&akills, i); } @@ -1091,7 +1091,7 @@ void expire_sglines(void) continue; if (WallSGLineExpire) - anope_cmd_global(s_OperServ, "SGLINE on \2%s\2 has expired", + anope_SendGlobops(s_OperServ, "SGLINE on \2%s\2 has expired", sx->mask); slist_delete(&sglines, i); } @@ -1311,7 +1311,7 @@ void expire_sqlines(void) continue; if (WallSQLineExpire) - anope_cmd_global(s_OperServ, "SQLINE on \2%s\2 has expired", + anope_SendGlobops(s_OperServ, "SQLINE on \2%s\2 has expired", sx->mask); slist_delete(&sqlines, i); @@ -1323,7 +1323,7 @@ static void free_sqline_entry(SList * slist, void *item) SXLine *sx = (SXLine *)item; /* Remove the SQLINE from all the servers */ - anope_cmd_unsqline(sx->mask); + anope_SendSQLineDel(sx->mask); /* Free the structure */ free(sx->mask); @@ -1480,7 +1480,7 @@ void expire_szlines(void) continue; if (WallSZLineExpire) - anope_cmd_global(s_OperServ, "SZLINE on \2%s\2 has expired", + anope_SendGlobops(s_OperServ, "SZLINE on \2%s\2 has expired", sx->mask); slist_delete(&szlines, i); } @@ -1598,7 +1598,7 @@ void resetDefCon(int level) DefConLevel = level; send_event(EVENT_DEFCON_LEVEL, 1, strLevel); alog("Defcon level timeout, returning to lvl %d", level); - anope_cmd_global(s_OperServ, + anope_SendGlobops(s_OperServ, getstring2(NULL, OPER_DEFCON_WALL), s_OperServ, level); if (GlobalOnDefcon) { diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index f6bae5782..e867af711 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -185,7 +185,7 @@ void BahamutIRCdProto::set_umode(User *user, int ac, const char **av) case 'o': if (add) { ++opcnt; - if (WallOper) anope_cmd_global(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); + if (WallOper) anope_SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); display_news(user, NEWS_OPER); } else --opcnt; @@ -723,13 +723,13 @@ void BahamutIRCdProto::cmd_topic(const char *whosets, const char *chan, const ch } /* UNSQLINE */ -void BahamutIRCdProto::cmd_unsqline(const char *user) +void BahamutIRCdProto::SendSQLineDel(const char *user) { send_cmd(NULL, "UNSQLINE %s", user); } /* JOIN - SJOIN */ -void BahamutIRCdProto::cmd_join(const char *user, const char *channel, time_t chantime) +void BahamutIRCdProto::SendJoin(const char *user, const char *channel, time_t chantime) { send_cmd(user, "SJOIN %ld %s", static_cast(chantime), channel); } @@ -982,7 +982,7 @@ int anope_event_ping(const char *source, int ac, const char **av) { if (ac < 1) return MOD_CONT; - ircd_proto.cmd_pong(ac > 1 ? av[1] : ServerName, av[0]); + ircd_proto.SendPong(ac > 1 ? av[1] : ServerName, av[0]); return MOD_CONT; } diff --git a/src/protocol/bahamut.h b/src/protocol/bahamut.h index cbc5e7092..107b7ffe7 100644 --- a/src/protocol/bahamut.h +++ b/src/protocol/bahamut.h @@ -72,8 +72,8 @@ class BahamutIRCdProto : public IRCDProto { void SendKick(const char *, const char *, const char *, const char *); void SendNoticeChanops(const char *, const char *, const char *); void SendBotOp(const char *, const char *); - void cmd_join(const char *, const char *, time_t); - void cmd_unsqline(const char *); + void SendJoin(const char *, const char *, time_t); + void SendSQLineDel(const char *); void cmd_sqline(const char *, const char *); void cmd_connect(); void cmd_svshold(const char *); diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index 6eed54868..218577c87 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -167,7 +167,7 @@ void CharybdisProto::set_umode(User *user, int ac, const char **av) case 'o': if (add) { ++opcnt; - if (WallOper) anope_cmd_global(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); + if (WallOper) anope_SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); display_news(user, NEWS_OPER); } else --opcnt; @@ -434,7 +434,7 @@ CUMode myCumodes[128] = { {0}, {0}, {0}, {0}, {0} }; -void CharybdisProto::cmd_global(const char *source, const char *buf) +void CharybdisProto::SendGlobops(const char *source, const char *buf) { if (!buf) return; if (source) { @@ -745,13 +745,13 @@ void CharybdisProto::cmd_vhost_on(const char *nick, const char *vIdent, const ch send_cmd(UseTS6 ? TS6SID : ServerName, "ENCAP * CHGHOST %s :%s", nick, vhost); } -void CharybdisProto::cmd_unsqline(const char *user) +void CharybdisProto::SendSQLineDel(const char *user) { Uid *ud = find_uid(s_OperServ); send_cmd(UseTS6 ? (ud ? ud->uid : s_OperServ) : s_OperServ, "UNRESV * %s", user); } -void CharybdisProto::cmd_join(const char *user, const char *channel, time_t chantime) +void CharybdisProto::SendJoin(const char *user, const char *channel, time_t chantime) { Uid *ud = find_uid(user); send_cmd(NULL, "SJOIN %ld %s + :%s", static_cast(chantime), channel, UseTS6 ? (ud ? ud->uid : user) : user); @@ -870,7 +870,7 @@ void CharybdisProto::SendClientIntroduction(const char *nick, const char *user, cmd_sqline(nick, "Reserved for services"); } -void CharybdisProto::cmd_part(const char *nick, const char *chan, const char *buf) +void CharybdisProto::SendPart(const char *nick, const char *chan, const char *buf) { Uid *ud = find_uid(nick); if (buf) send_cmd(UseTS6 ? ud->uid : nick, "PART %s :%s", chan, buf); @@ -881,7 +881,7 @@ int anope_event_ping(const char *source, int ac, const char **av) { if (ac < 1) return MOD_CONT; - ircd_proto.cmd_pong(ac > 1 ? av[1] : ServerName, av[0]); + ircd_proto.SendPong(ac > 1 ? av[1] : ServerName, av[0]); return MOD_CONT; } @@ -1101,7 +1101,7 @@ void CharybdisProto::SendQuit(const char *source, const char *buf) } /* PONG */ -void CharybdisProto::cmd_pong(const char *servname, const char *who) +void CharybdisProto::SendPong(const char *servname, const char *who) { /* deliberately no SID in the first parameter -- jilles */ if (UseTS6) send_cmd(TS6SID, "PONG %s :%s", servname, who); @@ -1109,7 +1109,7 @@ void CharybdisProto::cmd_pong(const char *servname, const char *who) } /* INVITE */ -void CharybdisProto::cmd_invite(const char *source, const char *chan, const char *nick) +void CharybdisProto::SendInvite(const char *source, const char *chan, const char *nick) { if (!source || !chan || !nick) return; Uid *ud = find_uid(source); diff --git a/src/protocol/charybdis.h b/src/protocol/charybdis.h index 74dd7309b..9065c47f1 100644 --- a/src/protocol/charybdis.h +++ b/src/protocol/charybdis.h @@ -59,12 +59,12 @@ class CharybdisProto : public IRCDTS6Proto { void SendNoticeChanops(const char *, const char *, const char *); void SendBotOp(const char *, const char *); void SendQuit(const char *, const char *); - void cmd_pong(const char *, const char *); - void cmd_join(const char *, const char *, time_t); - void cmd_unsqline(const char *); - void cmd_invite(const char *, const char *, const char *); - void cmd_part(const char *, const char *, const char *); - void cmd_global(const char *, const char *); + void SendPong(const char *, const char *); + void SendJoin(const char *, const char *, time_t); + void SendSQLineDel(const char *); + void SendInvite(const char *, const char *, const char *); + void SendPart(const char *, const char *, const char *); + void SendGlobops(const char *, const char *); void cmd_sqline(const char *, const char *); void cmd_svsnick(const char *, const char *, time_t); void cmd_vhost_on(const char *, const char *, const char *); diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index a9bbe2eb3..669bcaec1 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -421,7 +421,7 @@ void InspIRCdProto::set_umode(User *user, int ac, const char **av) case 'o': if (add) { ++opcnt; - if (WallOper) anope_cmd_global(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); + if (WallOper) anope_SendGlobops(s_OperServ, "\2%s\2 is now an IRC operator.", user->nick); display_news(user, NEWS_OPER); } else --opcnt; @@ -529,7 +529,7 @@ void inspircd_cmd_chghost(const char *nick, const char *vhost) } send_cmd(s_OperServ, "CHGHOST %s %s", nick, vhost); } else { - anope_cmd_global(s_OperServ, "CHGHOST not loaded!"); + anope_SendGlobops(s_OperServ, "CHGHOST not loaded!"); } } @@ -759,13 +759,13 @@ void InspIRCdProto::cmd_server(const char *servname, int hop, const char *descri } /* JOIN */ -void InspIRCdProto::cmd_join(const char *user, const char *channel, time_t chantime) +void InspIRCdProto::SendJoin(const char *user, const char *channel, time_t chantime) { send_cmd(user, "JOIN %s", channel); } /* UNSQLINE */ -void InspIRCdProto::cmd_unsqline(const char *user) +void InspIRCdProto::SendSQLineDel(const char *user) { if (!user) return; send_cmd(s_OperServ, "QLINE %s", user); @@ -780,7 +780,7 @@ void inspircd_cmd_chgident(const char *nick, const char *vIdent) } send_cmd(s_OperServ, "CHGIDENT %s %s", nick, vIdent); } else { - anope_cmd_global(s_OperServ, "CHGIDENT not loaded!"); + anope_SendGlobops(s_OperServ, "CHGIDENT not loaded!"); } } @@ -825,7 +825,7 @@ int anope_event_ping(const char *source, int ac, const char **av) if (ac < 1) return MOD_CONT; /* ((ac > 1) ? av[1] : ServerName) */ - ircd_proto.cmd_pong(ServerName, av[0]); + ircd_proto.SendPong(ServerName, av[0]); return MOD_CONT; } @@ -1212,13 +1212,13 @@ int anope_event_capab(const char *source, int ac, const char **av) return MOD_STOP; } if (!has_svsholdmod) { - anope_cmd_global(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded."); + anope_SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded."); } if (!has_chghostmod) { - anope_cmd_global(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded."); + anope_SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded."); } if (!has_chgidentmod) { - anope_cmd_global(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded."); + anope_SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded."); } if (has_messagefloodmod) { cbmi = myCbmodeinfos; diff --git a/src/protocol/inspircd11.h b/src/protocol/inspircd11.h index 68e4bbfbc..2ec399b27 100755 --- a/src/protocol/inspircd11.h +++ b/src/protocol/inspircd11.h @@ -77,8 +77,8 @@ class InspIRCdProto : public IRCDProto { void SendKick(const char *, const char *, const char *, const char *); void SendNoticeChanops(const char *, const char *, const char *); void SendBotOp(const char *, const char *); - void cmd_join(const char *, const char *, time_t); - void cmd_unsqline(const char *); + void SendJoin(const char *, const char *, time_t); + void SendSQLineDel(const char *); void cmd_sqline(const char *, const char *); void cmd_squit(const char *, const char *); void cmd_vhost_on(const char *, const char *, const char *); diff --git a/src/protocol/obs