From 34d8ef4d14dfcef13f8aab3746b30c6f8cacb4a1 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sun, 7 Mar 2010 22:42:51 -0500 Subject: [PATCH] Change all override snotes to wallops to match m_o* and to make it a lot more obvious when a oper is using override. --- modules/core/m_kick.c | 7 ++++++- modules/m_invite.c | 7 ++++++- modules/m_topic.c | 7 ++++++- src/channel.c | 5 ++++- src/chmode.c | 28 +++++++++++++++++++--------- 5 files changed, 41 insertions(+), 13 deletions(-) diff --git a/modules/core/m_kick.c b/modules/core/m_kick.c index 4d903d1..937b05b 100644 --- a/modules/core/m_kick.c +++ b/modules/core/m_kick.c @@ -205,9 +205,14 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p comment[REASONLEN] = '\0'; if(is_override) - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + { + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding KICK [%s] on [%s] [%s]", get_oper_name(source_p), who->name, chptr->chname, comment); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding KICK [%s] on [%s] [%s]", + use_id(source_p), get_oper_name(source_p), who->name, chptr->chname, comment); + } /* jdc * - In the case of a server kicking a user (i.e. CLEARCHAN), diff --git a/modules/m_invite.c b/modules/m_invite.c index cd33aff..f96194e 100644 --- a/modules/m_invite.c +++ b/modules/m_invite.c @@ -149,9 +149,14 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char !(chptr->mode.mode & MODE_FREEINVITE)) { if(IsOverride(source_p)) - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + { + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding INVITE [%s] on [%s]", get_oper_name(source_p), target_p->name, chptr->chname); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding INVITE [%s] on [%s]", + use_id(source_p), get_oper_name(source_p), target_p->name, chptr->chname); + } else { sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), diff --git a/modules/m_topic.c b/modules/m_topic.c index cddf5f9..4b6d44b 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -119,9 +119,14 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_chanop(msptr)) { if(IsOverride(source_p)) - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + { + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding TOPIC on [%s]", get_oper_name(source_p), chptr->chname); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding TOPIC on [%s]", + use_id(source_p), get_oper_name(source_p), chptr->chname); + } else { sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), diff --git a/src/channel.c b/src/channel.c index 7ff1684..ff77a3a 100644 --- a/src/channel.c +++ b/src/channel.c @@ -837,9 +837,12 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key) if(IsOverride(source_p)) { - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding JOIN to [%s]", get_oper_name(source_p), chptr->chname); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding JOIN to [%s]", + use_id(source_p), get_oper_name(source_p), chptr->chname); return 0; } diff --git a/src/chmode.c b/src/chmode.c index ade4ddf..25ae838 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -799,10 +799,12 @@ chm_ban(struct Client *source_p, struct Channel *chptr, { if(IsOverride(source_p)) { - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding modes on %s: (%s list)", - get_oper_name(source_p), chptr->chname, - mode_type == CHFL_INVEX ? "invex" : "exempt"); + get_oper_name(source_p), chptr->chname, mode_type == CHFL_INVEX ? "invex" : "exempt"); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding modes on %s: (%s list)", + use_id(source_p), get_oper_name(source_p), chptr->chname, mode_type == CHFL_INVEX ? "invex" : "exempt"); } else { @@ -2138,10 +2140,14 @@ set_channel_mode(struct Client *client_p, struct Client *source_p, sendto_channel_local(flags, chptr, "%s%s %s", cmdbuf, modebuf, parabuf); if(override) - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + { + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding modes on %s: %s %s", - get_oper_name(source_p), chptr->chname, - modebuf, parabuf); + get_oper_name(source_p), chptr->chname, modebuf, parabuf); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding modes on %s: %s %s", + use_id(source_p), get_oper_name(source_p), chptr->chname, modebuf, parabuf); + } } else continue; @@ -2181,10 +2187,14 @@ set_channel_mode(struct Client *client_p, struct Client *source_p, { sendto_channel_local(flags, chptr, "%s%s %s", cmdbuf, modebuf, parabuf); if(override) - sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, + { + sendto_wallops_flags(UMODE_WALLOP, &me, "%s is overriding modes on %s: %s %s", - get_oper_name(source_p), chptr->chname, - modebuf, parabuf); + get_oper_name(source_p), chptr->chname, modebuf, parabuf); + sendto_server(NULL, chptr, NOCAPS, NOCAPS, + ":%s WALLOPS :%s is overriding modes on %s: %s %s", + use_id(source_p), get_oper_name(source_p), chptr->chname, modebuf, parabuf); + } } } if(override)