summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-10-30 21:04:38 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-10-30 21:04:38 +0000
commit363f35dab5293ee89b870df8effd09249d024576 (patch)
tree82fa01195c8cfe635bcef3a28f0b51ebfef0d424
parenteef62fc56ba6df5690830206d5341cbd5be91612 (diff)
- Made m_globops() and ms_globops() use sendto_realops_flags()
- Added message-type parameter to sendto_realops_flags() which can be one of SEND_NOTICE, SEND_GLOBAL, SEND_LOCOPS - Forward-port -r1617 git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1618 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--contrib/ip_cloaking.c6
-rw-r--r--contrib/m_ctrace.c2
-rw-r--r--contrib/m_ltrace.c2
-rw-r--r--contrib/m_operspy.c2
-rw-r--r--include/send.h7
-rw-r--r--modules/core/m_error.c20
-rw-r--r--modules/core/m_join.c8
-rw-r--r--modules/core/m_kill.c6
-rw-r--r--modules/core/m_message.c4
-rw-r--r--modules/core/m_nick.c31
-rw-r--r--modules/core/m_server.c70
-rw-r--r--modules/core/m_sjoin.c8
-rw-r--r--modules/core/m_squit.c3
-rw-r--r--modules/m_admin.c2
-rw-r--r--modules/m_challenge.c3
-rw-r--r--modules/m_dline.c10
-rw-r--r--modules/m_eob.c3
-rw-r--r--modules/m_etrace.c2
-rw-r--r--modules/m_gline.c24
-rw-r--r--modules/m_globops.c4
-rw-r--r--modules/m_info.c2
-rw-r--r--modules/m_kline.c10
-rw-r--r--modules/m_links.c2
-rw-r--r--modules/m_module.c5
-rw-r--r--modules/m_motd.c2
-rw-r--r--modules/m_oper.c15
-rw-r--r--modules/m_post.c2
-rw-r--r--modules/m_rehash.c10
-rw-r--r--modules/m_resv.c12
-rw-r--r--modules/m_set.c33
-rw-r--r--modules/m_stats.c2
-rw-r--r--modules/m_svinfo.c10
-rw-r--r--modules/m_trace.c2
-rw-r--r--modules/m_xline.c6
-rw-r--r--src/channel.c10
-rw-r--r--src/channel_mode.c2
-rw-r--r--src/client.c33
-rw-r--r--src/conf.c42
-rw-r--r--src/csvlib.c8
-rw-r--r--src/fdlist.c2
-rw-r--r--src/hostmask.c2
-rw-r--r--src/ircd.c4
-rw-r--r--src/listener.c3
-rw-r--r--src/modules.c13
-rw-r--r--src/numeric.c3
-rw-r--r--src/parse.c34
-rw-r--r--src/s_bsd.c3
-rw-r--r--src/s_serv.c57
-rw-r--r--src/s_user.c26
-rw-r--r--src/send.c66
50 files changed, 340 insertions, 298 deletions
diff --git a/contrib/ip_cloaking.c b/contrib/ip_cloaking.c
index d9c2d68..2b2cf48 100644
--- a/contrib/ip_cloaking.c
+++ b/contrib/ip_cloaking.c
@@ -422,7 +422,8 @@ module_init(void)
{
ilog(LOG_TYPE_IRCD, "You have more than 32 usermodes, "
"IP cloaking not installed");
- sendto_realops_flags(UMODE_ALL, L_ALL, "You have more than "
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "You have more than "
"32 usermodes, IP cloaking not installed");
return;
}
@@ -433,7 +434,8 @@ module_init(void)
else
{
ilog(LOG_TYPE_IRCD, "Usermode +h already in use, IP cloaking not installed");
- sendto_realops_flags(UMODE_ALL, L_ALL, "Usermode +h already in use, "
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Usermode +h already in use, "
"IP cloaking not installed");
return;
}
diff --git a/contrib/m_ctrace.c b/contrib/m_ctrace.c
index 629b7a4..619d2a4 100644
--- a/contrib/m_ctrace.c
+++ b/contrib/m_ctrace.c
@@ -69,7 +69,7 @@ do_ctrace(struct Client *source_p, int parc, char *parv[])
const char *class_name = NULL;
dlink_node *ptr;
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"CTRACE requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/contrib/m_ltrace.c b/contrib/m_ltrace.c
index 4f165da..e13ec44 100644
--- a/contrib/m_ltrace.c
+++ b/contrib/m_ltrace.c
@@ -118,7 +118,7 @@ do_ltrace(struct Client *source_p, int parc, char *parv[])
return;
}
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"LTRACE requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/contrib/m_operspy.c b/contrib/m_operspy.c
index 9fdf0c1..e690be6 100644
--- a/contrib/m_operspy.c
+++ b/contrib/m_operspy.c
@@ -603,7 +603,7 @@ operspy_log(struct Client *source_p, const char *command, const char *target)
#endif
#ifdef OPERSPY_NOTICE
- sendto_realops_flags(UMODE_SPY, L_ALL, "OPERSPY %s %s %s",
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE, "OPERSPY %s %s %s",
get_oper_name(source_p), command, target);
#endif
diff --git a/include/send.h b/include/send.h
index 1039618..10eff63 100644
--- a/include/send.h
+++ b/include/send.h
@@ -63,9 +63,8 @@ extern void sendto_match_butone(struct Client *, struct Client *,
char *, int, const char *, ...);
extern void sendto_match_servs(struct Client *, const char *, int,
const char *, ...);
-extern void sendto_realops_flags(unsigned int, int,
+extern void sendto_realops_flags(unsigned int, int, int,
const char *, ...);
-extern void sendto_globops_flags(unsigned int, int, const char *, ...);
extern void sendto_wallops_flags(unsigned int, struct Client *,
const char *, ...);
extern void ts_warn(const char *, ...);
@@ -88,6 +87,10 @@ extern void kill_client_ll_serv_butone(struct Client *, struct Client *,
#define L_OPER 1
#define L_ADMIN 2
+#define SEND_NOTICE 1
+#define SEND_GLOBAL 2
+#define SEND_LOCOPS 3
+
#define NOCAPS 0 /* no caps */
#define NOFLAGS 0 /* no flags */
diff --git a/modules/core/m_error.c b/modules/core/m_error.c
index 9228628..096538e 100644
--- a/modules/core/m_error.c
+++ b/modules/core/m_error.c
@@ -51,17 +51,21 @@ m_error(struct Client *client_p, struct Client *source_p,
if (client_p == source_p)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "ERROR :from %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "ERROR :from %s -- %s",
get_client_name(client_p, HIDE_IP), para);
- sendto_realops_flags(UMODE_ALL, L_OPER, "ERROR :from %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "ERROR :from %s -- %s",
get_client_name(client_p, MASK_IP), para);
}
else
{
- sendto_realops_flags(UMODE_ALL, L_OPER, "ERROR :from %s via %s -- %s",
- source_p->name, get_client_name(client_p, MASK_IP), para);
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "ERROR :from %s via %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "ERROR :from %s via %s -- %s",
source_p->name, get_client_name(client_p, HIDE_IP), para);
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "ERROR :from %s via %s -- %s",
+ source_p->name, get_client_name(client_p, MASK_IP), para);
}
if (MyClient(source_p))
@@ -80,10 +84,12 @@ ms_error(struct Client *client_p, struct Client *source_p,
source_p->name, para);
if (client_p == source_p)
- sendto_realops_flags(UMODE_ALL, L_ALL, "ERROR :from %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "ERROR :from %s -- %s",
get_client_name(client_p, MASK_IP), para);
else
- sendto_realops_flags(UMODE_ALL, L_ALL, "ERROR :from %s via %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "ERROR :from %s via %s -- %s",
source_p->name,
get_client_name(client_p, MASK_IP), para);
}
diff --git a/modules/core/m_join.c b/modules/core/m_join.c
index 35bbf3a..7f872f7 100644
--- a/modules/core/m_join.c
+++ b/modules/core/m_join.c
@@ -138,7 +138,7 @@ m_join(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(ERR_BADCHANNAME),
me.name, source_p->name, chan);
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"Forbidding reserved channel [%s] from user %s",
chan, get_client_name(source_p, HIDE_IP));
continue;
@@ -302,7 +302,7 @@ ms_join(struct Client *client_p, struct Client *source_p,
if (!check_channel_name(parv[2], 0))
{
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"*** Too long or invalid channel name from %s: %s",
client_p->name, parv[2]);
return;
@@ -326,7 +326,7 @@ ms_join(struct Client *client_p, struct Client *source_p,
{
if (newts < 800000000)
{
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"*** Bogus TS %lu on %s ignored from %s",
(unsigned long)newts, chptr->chname,
client_p->name);
@@ -341,7 +341,7 @@ ms_join(struct Client *client_p, struct Client *source_p,
sendto_channel_local(ALL_MEMBERS, 0, chptr,
":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to 0",
me.name, chptr->chname, chptr->chname, (unsigned long)oldts);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Server %s changing TS on %s from %lu to 0",
source_p->name, chptr->chname, (unsigned long)oldts);
}
diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c
index a76e5a4..7686b77 100644
--- a/modules/core/m_kill.c
+++ b/modules/core/m_kill.c
@@ -151,7 +151,7 @@ mo_kill(struct Client *client_p, struct Client *source_p,
* Do not change the format of this message. There's no point in changing messages
* that have been around for ever, for no reason..
*/
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Received KILL message for %s. From %s Path: %s (%s)",
target_p->name, source_p->name, me.name, reason);
@@ -278,12 +278,12 @@ ms_kill(struct Client *client_p, struct Client *source_p,
* local --fl
*/
if (HasUMode(source_p, UMODE_OPER)) /* send it normally */
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Received KILL message for %s. From %s Path: %s!%s!%s!%s %s",
target_p->name, source_p->name, source_p->servptr->name,
source_p->host, source_p->username, source_p->name, reason);
else
- sendto_realops_flags(UMODE_SKILL, L_ALL,
+ sendto_realops_flags(UMODE_SKILL, L_ALL, SEND_NOTICE,
"Received KILL message for %s. From %s %s",
target_p->name, source_p->name, reason);
diff --git a/modules/core/m_message.c b/modules/core/m_message.c
index 183154f..e72126d 100644
--- a/modules/core/m_message.c
+++ b/modules/core/m_message.c
@@ -620,7 +620,7 @@ flood_attack_client(int p_or_n, struct Client *source_p,
{
if (!HasFlag(target_p, FLAGS_FLOOD_NOTICED))
{
- sendto_realops_flags(UMODE_BOTS, L_ALL,
+ sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
"Possible Flooder %s on %s target: %s",
get_client_name(source_p, HIDE_IP),
source_p->servptr->name, target_p->name);
@@ -676,7 +676,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p,
{
if (!IsSetFloodNoticed(chptr))
{
- sendto_realops_flags(UMODE_BOTS, L_ALL,
+ sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
"Possible Flooder %s on %s target: %s",
get_client_name(source_p, HIDE_IP),
source_p->servptr->name, chptr->chname);
diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c
index 68f4e57..36dfcc9 100644
--- a/modules/core/m_nick.c
+++ b/modules/core/m_nick.c
@@ -145,7 +145,8 @@ change_local_nick(struct Client *source_p, const char *nick)
/* XXX - the format of this notice should eventually be changed
* to either %s[%s@%s], or even better would be get_client_name() -bill
*/
- sendto_realops_flags(UMODE_NCHANGE, L_ALL, "Nick change: From %s to %s [%s@%s]",
+ sendto_realops_flags(UMODE_NCHANGE, L_ALL, SEND_NOTICE,
+ "Nick change: From %s to %s [%s@%s]",
source_p->name, nick, source_p->username, source_p->host);
sendto_common_channels_local(source_p, 1, ":%s!%s@%s NICK :%s",
source_p->name, source_p->username,
@@ -225,7 +226,7 @@ mr_nick(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), me.name,
source_p->name[0] ? source_p->name : "*", nick);
- sendto_realops_flags(L_ALL, UMODE_REJ,
+ sendto_realops_flags(L_ALL, UMODE_REJ, SEND_NOTICE,
"Forbidding reserved nick [%s] from user %s",
nick, get_client_name(client_p, HIDE_IP));
return;
@@ -291,7 +292,7 @@ m_nick(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
me.name, source_p->name, nick);
- sendto_realops_flags(L_ALL, UMODE_REJ,
+ sendto_realops_flags(L_ALL, UMODE_REJ, SEND_NOTICE,
"Forbidding reserved nick [%s] from user %s",
nick, get_client_name(client_p, HIDE_IP));
return;
@@ -382,7 +383,7 @@ ms_nick(struct Client *client_p, struct Client *source_p,
if (server_p == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Invalid server %s from %s for NICK %s",
parv[7], source_p->name, parv[1]);
sendto_one(client_p, ":%s KILL %s :%s (Server doesn't exist!)",
@@ -495,7 +496,7 @@ ms_uid(struct Client *client_p, struct Client *source_p,
*/
if ((target_p = hash_find_id(parv[8])) != NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"ID collision on %s(%s <- %s)(both killed)",
target_p->name, target_p->from->name,
client_p->name);
@@ -542,7 +543,7 @@ check_clean_nick(struct Client *client_p, struct Client *source_p,
if (!valid_nickname(nick, 0))
{
++ServerStats.is_kill;
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"Bad/long Nick: %s From: %s(via %s)",
nick, server_p->name, client_p->name);
@@ -581,7 +582,7 @@ check_clean_user(struct Client *client_p, char *nick,
if (!clean_user_name(user))
{
++ServerStats.is_kill;
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"Bad/Long Username: %s Nickname: %s From: %s(via %s)",
user, nick, server_p->name, client_p->name);
sendto_one(client_p, ":%s KILL %s :%s (Bad Username)",
@@ -608,7 +609,7 @@ check_clean_host(struct Client *client_p, char *nick,
if (!clean_host_name(host))
{
++ServerStats.is_kill;
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"Bad/Long Hostname: %s Nickname: %s From: %s(via %s)",
host, nick, server_p->name, client_p->name);
sendto_one(client_p, ":%s KILL %s :%s (Bad Hostname)",
@@ -803,7 +804,7 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
/* if we dont have a ts, or their TS's are the same, kill both */
if (!newts || !target_p->tsinfo || (newts == target_p->tsinfo))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick collision on %s(%s <- %s)(both killed)",
target_p->name, target_p->from->name,
client_p->name);
@@ -845,7 +846,7 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
else
{
if (sameuser)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick collision on %s(%s <- %s)(older killed)",
target_p->name, target_p->from->name,
client_p->name);
@@ -882,7 +883,7 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
/* its a client changing nick and causing a collide */
if (!newts || !target_p->tsinfo || (newts == target_p->tsinfo))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick change collision from %s to %s(%s <- %s)(both killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
@@ -914,12 +915,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
(!sameuser && newts > target_p->tsinfo))
{
if (sameuser)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick change collision from %s to %s(%s <- %s)(older killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
else
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick change collision from %s to %s(%s <- %s)(newer killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
@@ -940,12 +941,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
else
{
if (sameuser)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick collision on %s(%s <- %s)(older killed)",
target_p->name, target_p->from->name,
client_p->name);
else
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Nick collision on %s(%s <- %s)(newer killed)",
target_p->name, target_p->from->name,
client_p->name);
diff --git a/modules/core/m_server.c b/modules/core/m_server.c
index 6054a34..ed4ca7f 100644
--- a/modules/core/m_server.c
+++ b/modules/core/m_server.c
@@ -70,10 +70,10 @@ mr_server(struct Client *client_p, struct Client *source_p,
*/
if (!DoesTS(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Non-TS server "
"for server %s", get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Non-TS server "
"for server %s", get_client_name(client_p, MASK_IP), name);
exit_client(client_p, client_p, "Non-TS server");
@@ -82,7 +82,7 @@ mr_server(struct Client *client_p, struct Client *source_p,
if (!valid_servname(name))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Bogus server name "
"for server %s", get_client_name(client_p, HIDE_IP), name);
sendto_realops_flags(UMODE_ALL, L_OPER,
@@ -100,11 +100,11 @@ mr_server(struct Client *client_p, struct Client *source_p,
case -1:
if (ConfigFileEntry.warn_no_nline)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Unauthorized server connection attempt from %s: No entry for "
"servername %s", get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Unauthorized server connection attempt from %s: No entry for "
"servername %s", get_client_name(client_p, MASK_IP), name);
}
@@ -115,11 +115,11 @@ mr_server(struct Client *client_p, struct Client *source_p,
break;
case -2:
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Bad password "
"for server %s", get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Bad password "
"for server %s", get_client_name(client_p, MASK_IP), name);
@@ -129,11 +129,11 @@ mr_server(struct Client *client_p, struct Client *source_p,
break;
case -3:
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Invalid host "
"for server %s", get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Unauthorized server connection attempt from %s: Invalid host "
"for server %s", get_client_name(client_p, MASK_IP), name);
@@ -156,11 +156,11 @@ mr_server(struct Client *client_p, struct Client *source_p,
* Definitely don't do that here. This is from an unregistered
* connect - A1kmm.
*/
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Attempt to re-introduce server %s SID %s from %s",
name, client_p->id,
get_client_name(client_p, HIDE_IP));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Attempt to re-introduce server %s SID %s from %s",
name, client_p->id,
get_client_name(client_p, MASK_IP));
@@ -219,10 +219,10 @@ ms_server(struct Client *client_p, struct Client *source_p,
if (!valid_servname(name))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s introduced server with bogus server name %s",
get_client_name(client_p, SHOW_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s introduced server with bogus server name %s",
get_client_name(client_p, MASK_IP), name);
sendto_one(client_p, "ERROR :Bogus server name introduced");
@@ -250,10 +250,10 @@ ms_server(struct Client *client_p, struct Client *source_p,
* solution.. --fl_
*/
sendto_one(client_p, "ERROR :Server %s already exists", name);
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s cancelled, server %s already exists",
get_client_name(client_p, SHOW_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s cancelled, server %s already exists",
client_p->name, name);
exit_client(client_p, &me, "Server Exists");
@@ -314,9 +314,11 @@ ms_server(struct Client *client_p, struct Client *source_p,
if (!hlined)
{
/* OOOPs nope can't HUB */
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "Non-Hub link %s introduced %s.",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "Non-Hub link %s introduced %s.",
get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER, "Non-Hub link %s introduced %s.",
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "Non-Hub link %s introduced %s.",
get_client_name(client_p, MASK_IP), name);
exit_client(source_p, &me, "No matching hub_mask.");
return;
@@ -326,10 +328,10 @@ ms_server(struct Client *client_p, struct Client *source_p,
if (llined)
{
/* OOOPs nope can't HUB this leaf */
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s introduced leafed server %s.",
get_client_name(client_p, HIDE_IP), name);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s introduced leafed server %s.",
get_client_name(client_p, MASK_IP), name);
/* If it is new, we are probably misconfigured, so split the
@@ -366,7 +368,7 @@ ms_server(struct Client *client_p, struct Client *source_p,
source_p->name, target_p->name, hop + 1,
IsHidden(target_p) ? "(H) " : "", target_p->info);
- sendto_realops_flags(UMODE_EXTERNAL, L_ALL,
+ sendto_realops_flags(UMODE_EXTERNAL, L_ALL, SEND_NOTICE,
"Server %s being introduced by %s",
target_p->name, source_p->name);
}
@@ -403,10 +405,10 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if (!valid_servname(parv[1]))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s introduced server with bogus server name %s",
get_client_name(client_p, SHOW_IP), parv[1]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s introduced server with bogus server name %s",
get_client_name(client_p, MASK_IP), parv[1]);
sendto_one(client_p, "ERROR :Bogus server name introduced");
@@ -416,10 +418,10 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if (!valid_sid(parv[3]))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s introduced server with bogus server ID %s",
get_client_name(client_p, SHOW_IP), parv[3]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s introduced server with bogus server ID %s",
get_client_name(client_p, MASK_IP), parv[3]);
sendto_one(client_p, "ERROR :Bogus server ID introduced");
@@ -431,10 +433,10 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if ((target_p = hash_find_id(parv[3])))
{
sendto_one(client_p, "ERROR :SID %s already exists", parv[3]);
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s cancelled, SID %s already exists",
get_client_name(client_p, SHOW_IP), parv[3]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s cancelled, SID %s already exists",
client_p->name, parv[3]);
exit_client(client_p, &me, "SID Exists");
@@ -445,10 +447,10 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if ((target_p = hash_find_server(parv[1])))
{
sendto_one(client_p, "ERROR :Server %s already exists", parv[1]);
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s cancelled, server %s already exists",
get_client_name(client_p, SHOW_IP), parv[1]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s cancelled, server %s already exists",
client_p->name, parv[1]);
exit_client(client_p, &me, "Server Exists");
@@ -510,9 +512,11 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if (!hlined)
{
/* OOOPs nope can't HUB */
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "Non-Hub link %s introduced %s.",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "Non-Hub link %s introduced %s.",
get_client_name(client_p, SHOW_IP), parv[1]);
- sendto_realops_flags(UMODE_ALL, L_OPER, "Non-Hub link %s introduced %s.",
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "Non-Hub link %s introduced %s.",
get_client_name(client_p, MASK_IP), parv[1]);
exit_client(source_p, &me, "No matching hub_mask.");
return;
@@ -522,10 +526,10 @@ ms_sid(struct Client *client_p, struct Client *source_p,
if (llined)
{
/* OOOPs nope can't HUB this leaf */
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s introduced leafed server %s.",
get_client_name(client_p, SHOW_IP), parv[1]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s introduced leafed server %s.",
get_client_name(client_p, MASK_IP), parv[1]);
exit_client(client_p, &me, "Leafed Server.");
@@ -560,7 +564,7 @@ ms_sid(struct Client *client_p, struct Client *source_p,
source_p->name, target_p->name, hop + 1,
IsHidden(target_p) ? "(H) " : "", target_p->info);
- sendto_realops_flags(UMODE_EXTERNAL, L_ALL,
+ sendto_realops_flags(UMODE_EXTERNAL, L_ALL, SEND_NOTICE,
"Server %s being introduced by %s",
target_p->name, source_p->name);
}
diff --git a/modules/core/m_sjoin.c b/modules/core/m_sjoin.c
index 72f1bda..a072183 100644
--- a/modules/core/m_sjoin.c
+++ b/modules/core/m_sjoin.c
@@ -104,7 +104,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
if (!check_channel_name(parv[2], 0))
{
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"*** Too long or invalid channel name from %s: %s",
client_p->name, parv[2]);
return;
@@ -181,7 +181,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
{
if (newts < 800000000)
{
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"*** Bogus TS %lu on %s ignored from %s",
(unsigned long)newts, chptr->chname,
client_p->name);
@@ -196,7 +196,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
sendto_channel_local(ALL_MEMBERS, 0, chptr,
":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to 0",
me.name, chptr->chname, chptr->chname, (unsigned long)oldts);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Server %s changing TS on %s from %lu to 0",
source_p->name, chptr->chname, (unsigned long)oldts);
}
@@ -285,7 +285,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
*/
if (buflen >= (IRCD_BUFSIZE - IRCD_MAX(NICKLEN, IDLEN) - 2 - 3 - 1))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Long SJOIN from server: %s(via %s) (ignored)",
source_p->name, client_p->name);
return;
diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c
index 0995c47..7ba9b43 100644
--- a/modules/core/m_squit.c
+++ b/modules/core/m_squit.c
@@ -100,7 +100,8 @@ mo_squit(struct Client *client_p, struct Client *source_p,
if (MyConnect(target_p))
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "Received SQUIT %s from %s (%s)",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Received SQUIT %s from %s (%s)",
target_p->name, get_client_name(source_p, HIDE_IP), comment);
ilog(LOG_TYPE_IRCD, "Received SQUIT %s from %s (%s)",
target_p->name, get_client_name(source_p, HIDE_IP), comment);
diff --git a/modules/m_admin.c b/modules/m_admin.c
index b66f649..9db6fa9 100644
--- a/modules/m_admin.c
+++ b/modules/m_admin.c
@@ -47,7 +47,7 @@ do_admin(struct Client *source_p)
const char *me_name = ID_or_name(&me, source_p->from);
const char *nick = ID_or_name(source_p, source_p->from);
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"ADMIN requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_challenge.c b/modules/m_challenge.c
index 4c24b3a..027d143 100644
--- a/modules/m_challenge.c
+++ b/modules/m_challenge.c
@@ -50,7 +50,8 @@ failed_challenge_notice(struct Client *source_p, const char *name,
const char *reason)
{
if (ConfigFileEntry.failed_oper_notice)
- sendto_realops_flags(UMODE_ALL, L_ALL, "Failed CHALLENGE attempt as %s "
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Failed CHALLENGE attempt as %s "
"by %s (%s@%s) - %s", name, source_p->name,
source_p->username, source_p->host, reason);
diff --git a/modules/m_dline.c b/modules/m_dline.c
index 182489b..8c4c33d 100644
--- a/modules/m_dline.c
+++ b/modules/m_dline.c
@@ -62,7 +62,7 @@ apply_tdline(struct Client *source_p, struct ConfItem *conf,
add_conf_by_address(CONF_DLINE, aconf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added temporary %d min. D-Line for [%s] [%s]",
get_oper_name(source_p), tkline_time/60,
aconf->host, aconf->reason);
@@ -468,7 +468,7 @@ mo_undline(struct Client *client_p, struct Client *source_p,
sendto_one(source_p,
":%s NOTICE %s :Un-Dlined [%s] from temporary D-Lines",
me.name, source_p->name, addr);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the temporary D-Line for: [%s]",
get_oper_name(source_p), addr);
ilog(LOG_TYPE_DLINE, "%s removed temporary D-Line for [%s]",
@@ -480,7 +480,7 @@ mo_undline(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed",
me.name, source_p->name, addr);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the D-Line for: [%s]",
get_oper_name(source_p), addr);
ilog(LOG_TYPE_DLINE, "%s removed D-Line for [%s]",
@@ -515,7 +515,7 @@ me_undline(struct Client *client_p, struct Client *source_p,
sendto_one(source_p,
":%s NOTICE %s :Un-Dlined [%s] from temporary D-Lines",
me.name, source_p->name, addr);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the temporary D-Line for: [%s]",
get_oper_name(source_p), addr);
ilog(LOG_TYPE_DLINE, "%s removed temporary D-Line for [%s]",
@@ -527,7 +527,7 @@ me_undline(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed",
me.name, source_p->name, addr);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the D-Line for: [%s]",
get_oper_name(source_p), addr);
ilog(LOG_TYPE_DLINE, "%s removed D-Line for [%s]",
diff --git a/modules/m_eob.c b/modules/m_eob.c
index ceeff0c..bf3bc14 100644
--- a/modules/m_eob.c
+++ b/modules/m_eob.c
@@ -42,7 +42,8 @@ ms_eob(struct Client *client_p, struct Client *source_p,
assert(IsServer(source_p));
assert(client_p == source_p);
- sendto_realops_flags(UMODE_ALL, L_ALL, "End of burst from %s (%u seconds)",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "End of burst from %s (%u seconds)",
source_p->name,
(unsigned int)(CurrentTime - source_p->localClient->firsttime));
AddFlag(source_p, FLAGS_EOB);
diff --git a/modules/m_etrace.c b/modules/m_etrace.c
index 28b80ae..8a3421b 100644
--- a/modules/m_etrace.c
+++ b/modules/m_etrace.c
@@ -53,7 +53,7 @@ do_etrace(struct Client *source_p, int parc, char *parv[])
int full_etrace = 0;
dlink_node *ptr;
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"ETRACE requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_gline.c b/modules/m_gline.c
index 1b29445..a1acdfd 100644
--- a/modules/m_gline.c
+++ b/modules/m_gline.c
@@ -77,7 +77,7 @@ set_local_gline(const struct Client *source_p, const char *user,
SetConfTemporary(aconf);
add_conf_by_address(CONF_GLINE, aconf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added G-Line for [%s@%s] [%s]",
get_oper_name(source_p),
aconf->user, aconf->host, aconf->reason);
@@ -215,7 +215,7 @@ check_majority(const struct Client *source_p, const char *user,
{
if (remove_gline_match(user, host))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the G-Line for: [%s@%s]",
get_oper_name(source_p), user, host);
ilog(LOG_TYPE_GLINE, "%s removed G-Line for [%s@%s]",
@@ -296,10 +296,10 @@ do_sgline(struct Client *source_p, int parc, char *parv[], int prop)
if (bitlen < min_bitlen)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s!%s@%s on %s is requesting "
- "a GLINE with a CIDR mask < %d for [%s@%s] [%s]",
- source_p->name, source_p->username, source_p->host,
- source_p->servptr->name, min_bitlen, user, host, reason);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s is requesting a GLINE with a CIDR mask < %d for [%s@%s] [%s]",
+ get_oper_name(source_p), min_bitlen,
+ user, host, reason);
return;
}
}
@@ -309,11 +309,12 @@ do_sgline(struct Client *source_p, int parc, char *parv[], int prop)
if (check_majority(source_p, user, host, reason, GLINE_PENDING_ADD_TYPE) ==
GLINE_ALREADY_VOTED)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "oper or server has already voted");
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "oper or server has already voted");
return;
}
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s requesting G-Line for [%s@%s] [%s]",
get_oper_name(source_p),
user, host, reason);
@@ -391,7 +392,7 @@ mo_gline(struct Client *client_p, struct Client *source_p,
* call these two functions first so the 'requesting' notice always comes
* before the 'has triggered' notice. -bill
*/
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s requesting G-Line for [%s@%s] [%s]",
get_oper_name(source_p),
user, host, reason);
@@ -444,7 +445,7 @@ do_sungline(struct Client *source_p, const char *user,
{
assert(source_p->servptr != NULL);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s requesting UNG-Line for [%s@%s] [%s]",
get_oper_name(source_p), user, host, reason);
ilog(LOG_TYPE_GLINE, "#ungline for %s@%s [%s] requested by %s",
@@ -453,7 +454,8 @@ do_sungline(struct Client *source_p, const char *user,
/* If at least 3 opers agree this user should be un G lined then do it */
if (check_majority(source_p, user, host, reason, GLINE_PENDING_DEL_TYPE) ==
GLINE_ALREADY_VOTED)
- sendto_realops_flags(UMODE_ALL, L_ALL, "oper or server has already voted");
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "oper or server has already voted");
if (prop)
{
diff --git a/modules/m_globops.c b/modules/m_globops.c
index 9f9c2eb..8cf3ed7 100644
--- a/modules/m_globops.c
+++ b/modules/m_globops.c
@@ -64,7 +64,7 @@ mo_globops(struct Client *client_p, struct Client *source_p,
sendto_server(NULL, NOCAPS, CAP_TS6,
":%s GLOBOPS :%s", source_p->name, message);
- sendto_globops_flags(UMODE_ALL, L_ALL, "from: %s: %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_GLOBAL, "from: %s: %s",
source_p->name, message);
}
@@ -80,7 +80,7 @@ ms_globops(struct Client *client_p, struct Client *source_p,
sendto_server(client_p, NOCAPS, CAP_TS6, ":%s GLOBOPS :%s",
source_p->name, parv[1]);
- sendto_globops_flags(UMODE_ALL, L_ALL, "from: %s: %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_GLOBAL, "from: %s: %s",
source_p->name, parv[1]);
}
diff --git a/modules/m_info.c b/modules/m_info.c
index c3e81d7..2e4d7be 100644
--- a/modules/m_info.c
+++ b/modules/m_info.c
@@ -541,7 +541,7 @@ send_info_text(struct Client *source_p)
const char **text = infotext;
char *source, *target;
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"INFO requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_kline.c b/modules/m_kline.c
index 8833fe5..9270d0f 100644
--- a/modules/m_kline.c
+++ b/modules/m_kline.c
@@ -266,7 +266,7 @@ apply_tkline(struct Client *source_p, struct ConfItem *conf,
SetConfTemporary(aconf);
add_conf_by_address(CONF_KLINE, aconf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added temporary %d min. K-Line for [%s@%s] [%s]",
get_oper_name(source_p), tkline_time/60,
aconf->user, aconf->host,
@@ -386,7 +386,7 @@ mo_unkline(struct Client *client_p,struct Client *source_p,
sendto_one(source_p,
":%s NOTICE %s :Un-klined [%s@%s] from temporary K-Lines",
me.name, source_p->name, user, host);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the temporary K-Line for: [%s@%s]",
get_oper_name(source_p), user, host);
ilog(LOG_TYPE_KLINE, "%s removed temporary K-Line for [%s@%s]",
@@ -398,7 +398,7 @@ mo_unkline(struct Client *client_p,struct Client *source_p,
{
sendto_one(source_p, ":%s NOTICE %s :K-Line for [%s@%s] is removed",
me.name, source_p->name, user,host);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the K-Line for: [%s@%s]",
get_oper_name(source_p), user, host);
ilog(LOG_TYPE_KLINE, "%s removed K-Line for [%s@%s]",
@@ -444,7 +444,7 @@ me_unkline(struct Client *client_p, struct Client *source_p,
sendto_one(source_p,
":%s NOTICE %s :Un-klined [%s@%s] from temporary K-Lines",
me.name, source_p->name, kuser, khost);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the temporary K-Line for: [%s@%s]",
get_oper_name(source_p), kuser, khost);
ilog(LOG_TYPE_KLINE, "%s removed temporary K-Line for [%s@%s]",
@@ -456,7 +456,7 @@ me_unkline(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, ":%s NOTICE %s :K-Line for [%s@%s] is removed",
me.name, source_p->name, kuser, khost);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the K-Line for: [%s@%s]",
get_oper_name(source_p), kuser, khost);
diff --git a/modules/m_links.c b/modules/m_links.c
index 04192d4..0ad525b 100644
--- a/modules/m_links.c
+++ b/modules/m_links.c
@@ -38,7 +38,7 @@
static void
do_links(struct Client *source_p, int parc, char *parv[])
{
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"LINKS requested by %s (%s@%s) [%s]",
source_p->name,
source_p->username, source_p->host,
diff --git a/modules/m_module.c b/modules/m_module.c
index a3a2d34..755810c 100644
--- a/modules/m_module.c
+++ b/modules/m_module.c
@@ -165,7 +165,7 @@ mo_module(struct Client *client_p, struct Client *source_p,
load_conf_modules();
load_core_modules(0);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Module Restart: %u modules unloaded, %u modules loaded",
modnum, dlink_list_length(&modules_list));
ilog(LOG_TYPE_IRCD, "Module Restart: %u modules unloaded, %u modules loaded",
@@ -199,7 +199,8 @@ mo_module(struct Client *client_p, struct Client *source_p,
if ((load_one_module(parv[2]) == -1) && check_core)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "Error reloading core "
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Error reloading core "
"module: %s: terminating ircd", parv[2]);
ilog(LOG_TYPE_IRCD, "Error loading core module %s: terminating ircd", parv[2]);
exit(0);
diff --git a/modules/m_motd.c b/modules/m_motd.c
index 4e0bd1c..805840f 100644
--- a/modules/m_motd.c
+++ b/modules/m_motd.c
@@ -38,7 +38,7 @@
static void
do_motd(struct Client *source_p)
{
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"MOTD requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_oper.c b/modules/m_oper.c
index c325755..d58c11b 100644
--- a/modules/m_oper.c
+++ b/modules/m_oper.c
@@ -51,13 +51,14 @@ failed_oper_notice(struct Client *source_p, const char *name,
const char *reason)
{
if (ConfigFileEntry.failed_oper_notice)
- sendto_realops_flags(UMODE_ALL, L_ALL, "Failed OPER attempt as %s "
- "by %s (%s@%s) - %s", name, source_p->name,
- source_p->username, source_p->host, reason);
-
- ilog(LOG_TYPE_OPER, "Failed OPER attempt as %s "
- "by %s (%s@%s) - %s", name, source_p->name,
- source_p->username, source_p->host, reason);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Failed OPER attempt as %s by %s (%s@%s) - %s",
+ name, source_p->name, source_p->username,
+ source_p->host, reason);
+
+ ilog(LOG_TYPE_OPER, "Failed OPER attempt as %s by %s (%s@%s) - %s",
+ name, source_p->name, source_p->username,
+ source_p->host, reason);
}
/*
diff --git a/modules/m_post.c b/modules/m_post.c
index f8e6ff6..7dade59 100644
--- a/modules/m_post.c
+++ b/modules/m_post.c
@@ -39,7 +39,7 @@ static void
mr_dumb_proxy(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
- sendto_realops_flags(UMODE_REJ, L_ALL,
+ sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
"HTTP Proxy disconnected: [%s@%s]",
client_p->username, client_p->host);
exit_client(source_p, source_p, "Client Exit");
diff --git a/modules/m_rehash.c b/modules/m_rehash.c
index f73c867..488291d 100644
--- a/modules/m_rehash.c
+++ b/modules/m_rehash.c
@@ -58,7 +58,8 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
if (irccmp(parv[1], "DNS") == 0)
{
sendto_one(source_p, form_str(RPL_REHASHING), me.name, source_p->name, "DNS");
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s is rehashing DNS",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s is rehashing DNS",
get_oper_name(source_p));
restart_resolver(); /* re-read /etc/resolv.conf AGAIN?
and close/re-open res socket */
@@ -68,14 +69,15 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(RPL_REHASHING), me.name,
source_p->name, "FDLIMIT");
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s is updating FDLIMIT",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s is updating FDLIMIT",
get_oper_name(source_p));
recalc_fdlimit(NULL);
found = 1;
}
else if (irccmp(parv[1], "MOTD") == 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s is forcing re-reading of MOTD file",
get_oper_name(source_p));
read_message_file(&ConfigFileEntry.motd);
@@ -99,7 +101,7 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(RPL_REHASHING),
me.name, source_p->name, ConfigFileEntry.configfile);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s is rehashing server config file",
get_oper_name(source_p));
ilog(LOG_TYPE_IRCD, "REHASH From %s[%s]",
diff --git a/modules/m_resv.c b/modules/m_resv.c
index e733ddc..e57a67e 100644
--- a/modules/m_resv.c
+++ b/modules/m_resv.c
@@ -240,7 +240,7 @@ parse_resv(struct Client *source_p, char *name, int tkline_time, char *reason)
me.name, source_p->name,
tkline_time/60,
(MyClient(source_p) ? "local" : "remote"), name);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has placed a %d minute %s RESV on channel: %s [%s]",
get_oper_name(source_p),
tkline_time/60,
@@ -258,7 +258,7 @@ parse_resv(struct Client *source_p, char *name, int tkline_time, char *reason)
":%s NOTICE %s :A %s RESV has been placed on channel %s",
me.name, source_p->name,
(MyClient(source_p) ? "local" : "remote"), name);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has placed a %s RESV on channel %s : [%s]",
get_oper_name(source_p),
(MyClient(source_p) ? "local" : "remote"),
@@ -302,7 +302,7 @@ parse_resv(struct Client *source_p, char *name, int tkline_time, char *reason)
tkline_time/60,
(MyClient(source_p) ? "local" : "remote"),
conf->name, resv_p->reason);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has placed a %d minute %s RESV on nick %s : [%s]",
get_oper_name(source_p),
tkline_time/60,
@@ -321,7 +321,7 @@ parse_resv(struct Client *source_p, char *name, int tkline_time, char *reason)
me.name, source_p->name,
(MyClient(source_p) ? "local" : "remote"),
conf->name, resv_p->reason);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has placed a %s RESV on nick %s : [%s]",
get_oper_name(source_p),
(MyClient(source_p) ? "local" : "remote"),
@@ -363,7 +363,7 @@ remove_resv(struct Client *source_p, const char *name)
sendto_one(source_p,
":%s NOTICE %s :The RESV has been removed on channel: %s",
me.name, source_p->name, name);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the RESV for channel: %s",
get_oper_name(source_p), name);
}
@@ -393,7 +393,7 @@ remove_resv(struct Client *source_p, const char *name)
sendto_one(source_p, ":%s NOTICE %s :The RESV has been removed on nick: %s",
me.name, source_p->name, name);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the RESV for nick: %s",
get_oper_name(source_p), name);
}
diff --git a/modules/m_set.c b/modules/m_set.c
index f17b4a6..2623283 100644
--- a/modules/m_set.c
+++ b/modules/m_set.c
@@ -152,7 +152,7 @@ quote_autoconn(struct Client *source_p, const char *arg, int newval)
else
ClearConfAllowAutoConn(aconf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed AUTOCONN for %s to %i",
get_oper_name(source_p), arg, newval);
sendto_one(source_p,
@@ -178,7 +178,8 @@ quote_autoconnall(struct Client *source_p, int newval)
{
if (newval >= 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s has changed AUTOCONNALL to %i",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s has changed AUTOCONNALL to %i",
get_oper_name(source_p), newval);
GlobalSetOptions.autoconn = newval;
@@ -195,7 +196,7 @@ quote_floodcount(struct Client *source_p, int newval)
if (newval >= 0)
{
GlobalSetOptions.floodcount = newval;
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed FLOODCOUNT to %i",
get_oper_name(source_p), GlobalSetOptions.floodcount);
}
@@ -217,7 +218,7 @@ quote_identtimeout(struct Client *source_p, int newval)
if (newval > 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed IDENTTIMEOUT to %d",
get_oper_name(source_p), newval);
GlobalSetOptions.ident_timeout = newval;
@@ -253,7 +254,7 @@ quote_max(struct Client *source_p, int newval)
ServerInfo.max_clients = newval;
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s set new MAXCLIENTS to %d (%d current)",
get_oper_name(source_p), ServerInfo.max_clients, Count.local);
}
@@ -286,14 +287,15 @@ quote_spamnum(struct Client *source_p, int newval)
{
if (newval == 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has disabled ANTI_SPAMBOT", source_p->name);
GlobalSetOptions.spam_num = newval;
return;
}
GlobalSetOptions.spam_num = IRCD_MAX(newval, MIN_SPAM_NUM);
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s has changed SPAMNUM to %i",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s has changed SPAMNUM to %i",
get_oper_name(source_p), GlobalSetOptions.spam_num);
}
else
@@ -308,7 +310,8 @@ quote_spamtime(struct Client *source_p, int newval)
if (newval > 0)
{
GlobalSetOptions.spam_time = IRCD_MAX(newval, MIN_SPAM_TIME);
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s has changed SPAMTIME to %i",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s has changed SPAMTIME to %i",
get_oper_name(source_p), GlobalSetOptions.spam_time);
}
else
@@ -350,7 +353,7 @@ quote_splitmode(struct Client *source_p, char *charval)
/* OFF */
if (newval == 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s is disabling splitmode",
get_oper_name(source_p));
@@ -362,7 +365,7 @@ quote_splitmode(struct Client *source_p, char *charval)
/* ON */
else if (newval == 1)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s is enabling and activating splitmode",
get_oper_name(source_p));
@@ -375,7 +378,7 @@ quote_splitmode(struct Client *source_p, char *charval)
/* AUTO */
else if (newval == 2)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s is enabling automatic splitmode",
get_oper_name(source_p));
@@ -399,7 +402,7 @@ quote_splitnum(struct Client *source_p, int newval)
{
if (newval >= 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed SPLITNUM to %i",
get_oper_name(source_p), newval);
split_servers = newval;
@@ -418,7 +421,7 @@ quote_splitusers(struct Client *source_p, int newval)
{
if (newval >= 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed SPLITUSERS to %i",
get_oper_name(source_p), newval);
split_users = newval;
@@ -437,7 +440,7 @@ quote_jfloodtime(struct Client *source_p, int newval)
{
if (newval >= 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed JFLOODTIME to %i",
get_oper_name(source_p), newval);
GlobalSetOptions.joinfloodtime = newval;
@@ -453,7 +456,7 @@ quote_jfloodcount(struct Client *source_p, int newval)
{
if (newval >= 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has changed JFLOODCOUNT to %i",
get_oper_name(source_p), newval);
GlobalSetOptions.joinfloodcount = newval;
diff --git a/modules/m_stats.c b/modules/m_stats.c
index 2361688..938b068 100644
--- a/modules/m_stats.c
+++ b/modules/m_stats.c
@@ -1398,7 +1398,7 @@ do_stats(struct Client *source_p, int parc, char *parv[])
break;
}
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"STATS %c requested by %s (%s@%s) [%s]",
statchar, source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_svinfo.c b/modules/m_svinfo.c
index bb36887..b3a693b 100644
--- a/modules/m_svinfo.c
+++ b/modules/m_svinfo.c
@@ -65,10 +65,10 @@ ms_svinfo(struct Client *client_p, struct Client *source_p,
* TS_ONLY we can't fall back to the non-TS protocol so
* we drop the link -orabidoo
*/
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s dropped, wrong TS protocol version (%s,%s)",
get_client_name(source_p, SHOW_IP), parv[1], parv[2]);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s dropped, wrong TS protocol version (%s,%s)",
get_client_name(source_p, MASK_IP), parv[1], parv[2]);
exit_client(source_p, source_p, "Incompatible TS version");
@@ -84,13 +84,13 @@ ms_svinfo(struct Client *client_p, struct Client *source_p,
if (deltat > ConfigFileEntry.ts_max_delta)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
get_client_name(source_p, SHOW_IP),
(unsigned long) CurrentTime,
(unsigned long) theirtime,
(int) deltat);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
get_client_name(source_p, MASK_IP),
(unsigned long) CurrentTime,
@@ -107,7 +107,7 @@ ms_svinfo(struct Client *client_p, struct Client *source_p,
}
if (deltat > ConfigFileEntry.ts_warn_delta)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Link %s notable TS delta (my TS=%lu, their TS=%lu, delta=%d)",
source_p->name,
(unsigned long) CurrentTime,
diff --git a/modules/m_trace.c b/modules/m_trace.c
index 910b390..3694140 100644
--- a/modules/m_trace.c
+++ b/modules/m_trace.c
@@ -186,7 +186,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
to = source_p->name;
}
- sendto_realops_flags(UMODE_SPY, L_ALL,
+ sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
"TRACE requested by %s (%s@%s) [%s]",
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
diff --git a/modules/m_xline.c b/modules/m_xline.c
index 3a70299..1020e09 100644
--- a/modules/m_xline.c
+++ b/modules/m_xline.c
@@ -353,7 +353,7 @@ write_xline(struct Client *source_p, char *gecos, char *reason,
if (tkline_time != 0)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added temporary %d min. X-Line for [%s] [%s]",
get_oper_name(source_p), (int)tkline_time/60,
conf->name, match_item->reason);
@@ -380,7 +380,7 @@ remove_xline(struct Client *source_p, char *gecos)
sendto_one(source_p,
":%s NOTICE %s :Un-xlined [%s] from temporary X-Lines",
me.name, source_p->name, gecos);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the temporary X-Line for: [%s]",
get_oper_name(source_p), gecos);
ilog(LOG_TYPE_KLINE, "%s removed temporary X-Line for [%s]",
@@ -392,7 +392,7 @@ remove_xline(struct Client *source_p, char *gecos)
{
sendto_one(source_p, ":%s NOTICE %s :X-Line for [%s] is removed",
me.name, source_p->name, gecos);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s has removed the X-Line for: [%s]",
get_oper_name(source_p), gecos);
ilog(LOG_TYPE_KLINE, "%s removed X-Line for [%s]",
diff --git a/src/channel.c b/src/channel.c
index 14e6a14..90d1548 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -103,7 +103,7 @@ add_user_to_channel(struct Channel *chptr, struct Client *who,
if (!IsSetJoinFloodNoticed(chptr))
{
SetJoinFloodNoticed(chptr);
- sendto_realops_flags(UMODE_BOTS, L_ALL,
+ sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
"Possible Join Flooder %s on %s target: %s",
get_client_name(who, HIDE_IP),
who->servptr->name, chptr->chname);
@@ -777,12 +777,12 @@ check_spambot_warning(struct Client *source_p, const char *name)
{
/* Its already known as a possible spambot */
if (name != NULL)
- sendto_realops_flags(UMODE_BOTS, L_ALL,
+ sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
"User %s (%s@%s) trying to join %s is a possible spambot",
source_p->name, source_p->username,
source_p->host, name);
else
- sendto_realops_flags(UMODE_BOTS, L_ALL,
+ sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
"User %s (%s@%s) is a possible spambot",
source_p->name, source_p->username,
source_p->host);
@@ -833,7 +833,7 @@ check_splitmode(void *unused)
{
splitmode = 1;
- sendto_realops_flags(UMODE_ALL,L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Network split, activating splitmode");
eventAddIsh("check_splitmode", check_splitmode, NULL, 10);
}
@@ -841,7 +841,7 @@ check_splitmode(void *unused)
{
splitmode = 0;
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Network rejoined, deactivating splitmode");
eventDelete(check_splitmode, NULL);
}
diff --git a/src/channel_mode.c b/src/channel_mode.c
index 4751ec4..5607df2 100644
--- a/src/channel_mode.c
+++ b/src/channel_mode.c
@@ -302,7 +302,7 @@ del_id(struct Channel *chptr, char *banid, int type)
list = &chptr->invexlist;
break;
default:
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"del_id() called with unknown ban type %d!", type);
return 0;
}
diff --git a/src/client.c b/src/client.c
index 4341716..2d245ec 100644
--- a/src/client.c
+++ b/src/client.c
@@ -280,10 +280,10 @@ check_pings_list(dlink_list *list)
*/
if (IsServer(client_p) || IsHandshake(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"No response from %s, closing link",
get_client_name(client_p, HIDE_IP));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"No response from %s, closing link",
get_client_name(client_p, MASK_IP));
ilog(LOG_TYPE_IRCD, "No response from %s, closing link",
@@ -303,10 +303,10 @@ check_pings_list(dlink_list *list)
* the PING, notify the opers so that they are aware of the problem.
*/
SetPingWarning(client_p);
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Warning, no response from %s in %d seconds",
get_client_name(client_p, HIDE_IP), pingwarn);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Warning, no response from %s in %d seconds",
get_client_name(client_p, MASK_IP), pingwarn);
ilog(LOG_TYPE_IRCD, "No response from %s in %d seconds",
@@ -382,7 +382,7 @@ check_conf_klines(void)
if (IsExemptKline(client_p) ||
IsExemptGline(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"GLINE over-ruled for %s, client is %sline_exempt",
get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g");
continue;
@@ -400,7 +400,7 @@ check_conf_klines(void)
/* if there is a returned struct AccessItem.. then kill it */
if (IsExemptKline(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"KLINE over-ruled for %s, client is kline_exempt",
get_client_name(client_p, HIDE_IP));
continue;
@@ -489,7 +489,7 @@ ban_them(struct Client *client_p, struct ConfItem *conf)
if (xconf != NULL)
user_reason = xconf->reason ? xconf->reason : type_string;
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s active for %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s active for %s",
type_string, get_client_name(client_p, HIDE_IP));
if (IsClient(client_p))
@@ -518,7 +518,8 @@ update_client_exit_stats(struct Client *client_p)
--Count.invisi;
}
else if (IsServer(client_p))
- sendto_realops_flags(UMODE_EXTERNAL, L_ALL, "Server %s split from %s",
+ sendto_realops_flags(UMODE_EXTERNAL, L_ALL, SEND_NOTICE,
+ "Server %s split from %s",
client_p->name, client_p->servptr->name);
if (splitchecking && !splitmode)
@@ -896,11 +897,13 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment)
free_list_task(source_p->localClient->list_task, source_p);
watch_del_watch_list(source_p);
- sendto_realops_flags(UMODE_CCONN, L_ALL, "Client exiting: %s (%s@%s) [%s] [%s]",
+ sendto_realops_flags(UMODE_CCONN, L_ALL, SEND_NOTICE,
+ "Client exiting: %s (%s@%s) [%s] [%s]",
source_p->name, source_p->username, source_p->host, comment,
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
"255.255.255.255" : source_p->sockhost);
- sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, "CLIEXIT: %s %s %s %s 0 %s",
+ sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE,
+ "CLIEXIT: %s %s %s %s 0 %s",
source_p->name,
source_p->username,
source_p->host,
@@ -972,7 +975,7 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment)
if (source_p->servptr == &me)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s was connected for %d seconds. %llu/%llu sendK/recvK.",
source_p->name, (int)(CurrentTime - source_p->localClient->firsttime),
source_p->localClient->send.bytes >> 10,
@@ -1051,12 +1054,12 @@ dead_link_on_read(struct Client *client_p, int error)
if (error == 0)
{
/* Admins get the real IP */
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Server %s closed the connection",
get_client_name(client_p, SHOW_IP));
/* Opers get a masked IP */
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Server %s closed the connection",
get_client_name(client_p, MASK_IP));
@@ -1071,7 +1074,7 @@ dead_link_on_read(struct Client *client_p, int error)
get_client_name(client_p, MASK_IP), current_error);
}
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s had been connected for %d day%s, %2d:%02d:%02d",
client_p->name, connected/86400,
(connected/86400 == 1) ? "" : "s",
@@ -1103,7 +1106,7 @@ exit_aborted_clients(void)
if (target_p == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Warning: null client on abort_list!");
dlinkDelete(ptr, &abort_list);
free_dlink_node(ptr);
diff --git a/src/conf.c b/src/conf.c
index b5adf94..98109d8 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -760,7 +760,7 @@ check_client(va_list args)
switch (i)
{
case TOO_MANY:
- sendto_realops_flags(UMODE_FULL, L_ALL,
+ sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
"Too many on IP for %s (%s).",
get_client_name(source_p, SHOW_IP),
source_p->sockhost);
@@ -771,8 +771,8 @@ check_client(va_list args)
break;
case I_LINE_FULL:
- sendto_realops_flags(UMODE_FULL, L_ALL,
- "I-line is full for %s (%s).",
+ sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
+ "auth{} block is full for %s (%s).",
get_client_name(source_p, SHOW_IP),
source_p->sockhost);
ilog(LOG_TYPE_IRCD, "Too many connections from %s.",
@@ -786,7 +786,7 @@ check_client(va_list args)
++ServerStats.is_ref;
/* jdc - lists server name & port connections are on */
/* a purely cosmetical change */
- sendto_realops_flags(UMODE_UNAUTH, L_ALL,
+ sendto_realops_flags(UMODE_UNAUTH, L_ALL, SEND_NOTICE,
"Unauthorized client connection from %s [%s] on [%s/%u].",
get_client_name(source_p, SHOW_IP),
source_p->sockhost,
@@ -875,7 +875,8 @@ verify_access(struct Client *client_p, const char *username)
conf = unmap_conf_item(aconf);
if (!ConfigFileEntry.hide_spoof_ips && IsConfSpoofNotice(aconf))
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "%s spoofing: %s as %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "%s spoofing: %s as %s",
client_p->name, client_p->host, conf->name);
strlcpy(client_p->host, conf->name, sizeof(client_p->host));
SetIPSpoof(client_p);
@@ -1685,7 +1686,7 @@ int
rehash(int sig)
{
if (sig != 0)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Got signal SIGHUP, reloading ircd.conf file");
restart_resolver();
@@ -2077,8 +2078,8 @@ expire_tklines(dlink_list *tklist)
if (xconf->hold <= CurrentTime)
{
if (ConfigFileEntry.tkline_expire_notices)
- sendto_realops_flags(UMODE_ALL, L_ALL,
- "Temporary X-line for [%s] sexpired", conf->name);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Temporary X-line for [%s] expired", conf->name);
dlinkDelete(ptr, tklist);
free_dlink_node(ptr);
delete_conf_item(conf);
@@ -2090,7 +2091,7 @@ expire_tklines(dlink_list *tklist)
if (nconf->hold <= CurrentTime)
{
if (ConfigFileEntry.tkline_expire_notices)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Temporary RESV for [%s] expired", conf->name);
dlinkDelete(ptr, tklist);
free_dlink_node(ptr);
@@ -2103,7 +2104,7 @@ expire_tklines(dlink_list *tklist)
if (cconf->hold <= CurrentTime)
{
if (ConfigFileEntry.tkline_expire_notices)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Temporary RESV for [%s] expired", cconf->name);
delete_channel_resv(cconf);
}
@@ -2231,7 +2232,7 @@ read_conf_files(int cold)
}
else
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Unable to read configuration file '%s': %s",
filename, strerror(errno));
return;
@@ -2294,7 +2295,7 @@ parse_conf_file(int type, int cold)
ilog(LOG_TYPE_IRCD, "Unable to read configuration file '%s': %s",
filename, strerror(errno));
else
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Unable to read configuration file '%s': %s",
filename, strerror(errno));
}
@@ -2775,11 +2776,11 @@ conf_add_class_to_conf(struct ConfItem *conf, const char *class_name)
aconf->class_ptr = class_default;
if (conf->type == CLIENT_TYPE)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Warning *** Defaulting to default class for %s@%s",
aconf->user, aconf->host);
else
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Warning *** Defaulting to default class for %s",
conf->name);
}
@@ -2792,11 +2793,11 @@ conf_add_class_to_conf(struct ConfItem *conf, const char *class_name)
if (aconf->class_ptr == NULL || !class->active)
{
if (conf->type == CLIENT_TYPE)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Warning *** Defaulting to default class for %s@%s",
aconf->user, aconf->host);
else
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Warning *** Defaulting to default class for %s",
conf->name);
aconf->class_ptr = class_default;
@@ -2819,14 +2820,16 @@ conf_add_server(struct ConfItem *conf, const char *class_name)
if (!aconf->host || !conf->name)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "Bad connect block");
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Bad connect block");
ilog(LOG_TYPE_IRCD, "Bad connect block");
return -1;
}
if (EmptyString(aconf->passwd))
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "Bad connect block, name %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Bad connect block, name %s",
conf->name);
ilog(LOG_TYPE_IRCD, "Bad connect block, host %s", conf->name);
return -1;
@@ -2852,7 +2855,8 @@ yyerror(const char *msg)
return;
strip_tabs(newlinebuf, linebuf, sizeof(newlinebuf));
- sendto_realops_flags(UMODE_ALL, L_ALL, "\"%s\", line %u: %s: %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "\"%s\", line %u: %s: %s",
conffilebuf, lineno + 1, msg, newlinebuf);
ilog(LOG_TYPE_IRCD, "\"%s\", line %u: %s: %s",
conffilebuf, lineno + 1, msg, newlinebuf);
diff --git a/src/csvlib.c b/src/csvlib.c
index 0b6034d..cb43243 100644
--- a/src/csvlib.c
+++ b/src/csvlib.c
@@ -244,7 +244,7 @@ write_conf_line(struct Client *source_p, struct ConfItem *conf,
if ((out = fopen(filename, "a")) == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"*** Problem opening %s ", filename);
return;
}
@@ -253,7 +253,7 @@ write_conf_line(struct Client *source_p, struct ConfItem *conf,
{
case KLINE_TYPE:
aconf = (struct AccessItem *)map_to_conf(conf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added K-Line for [%s@%s] [%s]",
get_oper_name(source_p),
aconf->user, aconf->host, aconf->reason);
@@ -268,7 +268,7 @@ write_conf_line(struct Client *source_p, struct ConfItem *conf,
break;
case DLINE_TYPE:
aconf = (struct AccessItem *)map_to_conf(conf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added D-Line for [%s] [%s]",
get_oper_name(source_p), aconf->host, aconf->reason);
sendto_one(source_p, ":%s NOTICE %s :Added D-Line [%s] to %s",
@@ -283,7 +283,7 @@ write_conf_line(struct Client *source_p, struct ConfItem *conf,
case XLINE_TYPE:
xconf = (struct MatchItem *)map_to_conf(conf);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"%s added X-Line for [%s] [%s]",
get_oper_name(source_p), conf->name,
xconf->reason);
diff --git a/src/fdlist.c b/src/fdlist.c
index 5400ad3..d7729d2 100644
--- a/src/fdlist.c
+++ b/src/fdlist.c
@@ -52,7 +52,7 @@ changing_fdlimit(va_list args)
if (ServerInfo.max_clients > (unsigned int)MAXCLIENTS_MAX)
{
if (old_fdlimit != 0)
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"HARD_FDLIMIT changed to %d, adjusting MAXCLIENTS to %d",
hard_fdlimit, MAXCLIENTS_MAX);
diff --git a/src/hostmask.c b/src/hostmask.c
index f7cca41..368378b 100644
--- a/src/hostmask.c
+++ b/src/hostmask.c
@@ -782,7 +782,7 @@ hostmask_send_expiration(struct AddressRec *arec)
break;
}
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Temporary %c-line for [%s@%s] expired", ban_type,
(arec->aconf->user) ? arec->aconf->user : "*",
(arec->aconf->host) ? arec->aconf->host : "*");
diff --git a/src/ircd.c b/src/ircd.c
index ee02bcd..d7ac4a7 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -174,7 +174,7 @@ set_time(void)
{
ilog(LOG_TYPE_IRCD, "Clock Failure (%s), TS can be corrupted",
strerror(errno));
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Clock Failure (%s), TS can be corrupted",
strerror(errno));
restart("Clock Failure");
@@ -243,7 +243,7 @@ io_loop(void)
if (doremotd)
{
read_message_file(&ConfigFileEntry.motd);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Got signal SIGUSR1, reloading ircd motd file");
doremotd = 0;
}
diff --git a/src/listener.c b/src/listener.c
index 3572570..326ba43 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -384,7 +384,8 @@ accept_connection(fde_t *pfd, void *data)
*/
if ((last_oper_notice + 20) <= CurrentTime)
{
- sendto_realops_flags(UMODE_ALL, L_ALL, "All connections in use. (%s)",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "All connections in use. (%s)",
get_listener_name(listener));
last_oper_notice = CurrentTime;
}
diff --git a/src/modules.c b/src/modules.c
index 8a5ab1b..677eb82 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -97,7 +97,8 @@ unload_one_module(const char *name, int warn)
if (warn == 1)
{
ilog(LOG_TYPE_IRCD, "Module %s unloaded", name);
- sendto_realops_flags(UMODE_ALL, L_ALL, "Module %s unloaded", name);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Module %s unloaded", name);
}
return 0;
@@ -122,7 +123,8 @@ load_a_module(const char *path, int warn)
if (!(tmpptr = lt_dlopen(path))) {
const char *err = ((err = lt_dlerror())) ? err : "<unknown>";
- sendto_realops_flags(UMODE_ALL, L_ALL, "Error loading module %s: %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Error loading module %s: %s",
mod_basename, err);
ilog(LOG_TYPE_IRCD, "Error loading module %s: %s", mod_basename, err);
return -1;
@@ -132,7 +134,8 @@ load_a_module(const char *path, int warn)
{
const char *err = ((err = lt_dlerror())) ? err : "<unknown>";
- sendto_realops_flags(UMODE_ALL, L_ALL, "Error loading module %s: %s",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Error loading module %s: %s",
mod_basename, err);
ilog(LOG_TYPE_IRCD, "Error loading module %s: %s", mod_basename, err);
lt_dlclose(tmpptr);
@@ -152,7 +155,7 @@ load_a_module(const char *path, int warn)
if (warn == 1)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Module %s [version: %s handle: %p] loaded.",
modp->name, modp->version, tmpptr);
ilog(LOG_TYPE_IRCD, "Module %s [version: %s handle: %p] loaded.",
@@ -394,7 +397,7 @@ load_one_module(const char *path)
return load_a_module(modpath, 1);
}
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Cannot locate module %s", path);
ilog(LOG_TYPE_IRCD, "Cannot locate module %s", path);
return -1;
diff --git a/src/numeric.c b/src/numeric.c
index 2a1042d..4da0786 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -213,7 +213,8 @@ set_locale(const char *locale)
strlcpy(used_locale, locale, sizeof(used_locale));
if (!res)
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "Language file [%s] contains "
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "Language file [%s] contains "
"errors, check server log file for more details",
used_locale);
}
diff --git a/src/parse.c b/src/parse.c
index f326d74..b79a2f8 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -322,7 +322,7 @@ handle_command(struct Message *mptr, struct Client *client_p,
}
else
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Dropping server %s due to (invalid) command '%s' "
"with only %d arguments (expecting %d).",
client_p->name, mptr->cmd, i, mptr->args_min);
@@ -572,13 +572,15 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
*/
if (IsServer(source_p) || IsMe(source_p))
{
- sendto_realops_flags(UMODE_DEBUG, L_ADMIN, "Message for %s[%s] from %s",
+ sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
+ "Message for %s[%s] from %s",
source_p->name, source_p->from->name,
get_client_name(client_p, SHOW_IP));
- sendto_realops_flags(UMODE_DEBUG, L_OPER, "Message for %s[%s] from %s",
+ sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
+ "Message for %s[%s] from %s",
source_p->name, source_p->from->name,
get_client_name(client_p, MASK_IP));
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"Not dropping server %s (%s) for Fake Direction",
client_p->name, source_p->name);
return -1;
@@ -594,11 +596,11 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
*
* all servers must be TS these days --is
*/
- sendto_realops_flags(UMODE_DEBUG, L_ADMIN,
+ sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
"Message for %s[%s@%s!%s] from %s (TS, ignored)",
source_p->name, source_p->username, source_p->host,
source_p->from->name, get_client_name(client_p, SHOW_IP));
- sendto_realops_flags(UMODE_DEBUG, L_OPER,
+ sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
"Message for %s[%s@%s!%s] from %s (TS, ignored)",
source_p->name, source_p->username, source_p->host,
source_p->from->name, get_client_name(client_p, MASK_IP));
@@ -626,10 +628,10 @@ remove_unknown(struct Client *client_p, char *lsender, char *lbuffer)
if ((IsDigit(*lsender) && strlen(lsender) <= IRC_MAXSID) ||
strchr(lsender, '.') != NULL)
{
- sendto_realops_flags(UMODE_DEBUG, L_ADMIN,
+ sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
"Unknown prefix (%s) from %s, Squitting %s",
lbuffer, get_client_name(client_p, SHOW_IP), lsender);
- sendto_realops_flags(UMODE_DEBUG, L_OPER,
+ sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
"Unknown prefix (%s) from %s, Squitting %s",
lbuffer, client_p->name, lsender);
sendto_one(client_p, ":%s SQUIT %s :(Unknown prefix (%s) from %s)",
@@ -716,7 +718,7 @@ handle_numeric(char numeric[], struct Client *client_p, struct Client *source_p,
num = atoi(numeric);
if ((num != ERR_NOSUCHNICK))
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"*** %s(via %s) sent a %s numeric to me: %s",
source_p->name, client_p->name, numeric, buffer);
return;
@@ -797,17 +799,21 @@ rfc1459_command_send_error(struct Client *client_p, struct Client *source_p,
if (client_p == source_p)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "ERROR :from %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "ERROR :from %s -- %s",
get_client_name(client_p, HIDE_IP), in_para);
- sendto_realops_flags(UMODE_ALL, L_OPER, "ERROR :from %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "ERROR :from %s -- %s",
get_client_name(client_p, MASK_IP), in_para);
}
else
{
- sendto_realops_flags(UMODE_ALL, L_OPER, "ERROR :from %s via %s -- %s",
- source_p->name, get_client_name(client_p, MASK_IP), in_para);
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "ERROR :from %s via %s -- %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "ERROR :from %s via %s -- %s",
source_p->name, get_client_name(client_p, HIDE_IP), in_para);
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
+ "ERROR :from %s via %s -- %s",
+ source_p->name, get_client_name(client_p, MASK_IP), in_para);
}
if (MyClient(source_p))
diff --git a/src/s_bsd.c b/src/s_bsd.c
index 316d3f4..5eaae02 100644
--- a/src/s_bsd.c
+++ b/src/s_bsd.c
@@ -129,7 +129,8 @@ report_error(int level, const char* text, const char* who, int error)
{
who = (who) ? who : "";
- sendto_realops_flags(UMODE_DEBUG, level, text, who, strerror(error));
+ sendto_realops_flags(UMODE_DEBUG, level, SEND_NOTICE,
+ text, who, strerror(error));
ilog(LOG_TYPE_IRCD, text, who, strerror(error));
}
diff --git a/src/s_serv.c b/src/s_serv.c
index 4d7dcd6..ea2da4e 100644
--- a/src/s_serv.c
+++ b/src/s_serv.c
@@ -341,10 +341,12 @@ try_connections(void *unused)
* -- adrian
*/
if (ConfigServerHide.hide_server_ips)
- sendto_realops_flags(UMODE_ALL, L_ALL, "Connection to %s activated.",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Connection to %s activated.",
conf->name);
else
- sendto_realops_flags(UMODE_ALL, L_ALL, "Connection to %s[%s] activated.",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Connection to %s[%s] activated.",
conf->name, aconf->host);
serv_connect(aconf, NULL);
@@ -702,7 +704,8 @@ server_estab(struct Client *client_p)
== NULL)
{
/* This shouldn't happen, better tell the ops... -A1kmm */
- sendto_realops_flags(UMODE_ALL, L_ALL, "Warning: Lost connect{} block "
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Warning: Lost connect{} block "
"for server %s(this shouldn't happen)!", host);
exit_client(client_p, &me, "Lost connect{} block!");
return;
@@ -812,14 +815,14 @@ server_estab(struct Client *client_p)
compression = SSL_get_current_compression(client_p->localClient->fd.ssl);
expansion = SSL_get_current_expansion(client_p->localClient->fd.ssl);
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link with %s established: [SSL: %s, Compression/Expansion method: %s/%s] (Capabilities: %s)",
inpath_ip, ssl_get_cipher(client_p->localClient->fd.ssl),
compression ? SSL_COMP_get_name(compression) : "NONE",
expansion ? SSL_COMP_get_name(expansion) : "NONE",
show_capabilities(client_p));
/* Now show the masked hostname/IP to opers */
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link with %s established: [SSL: %s, Compression/Expansion method: %s/%s] (Capabilities: %s)",
inpath, ssl_get_cipher(client_p->localClient->fd.ssl),
compression ? SSL_COMP_get_name(compression) : "NONE",
@@ -834,13 +837,13 @@ server_estab(struct Client *client_p)
else
#endif
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Link with %s established: (Capabilities: %s)",
- inpath_ip,show_capabilities(client_p));
+ inpath_ip, show_capabilities(client_p));
/* Now show the masked hostname/IP to opers */
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Link with %s established: (Capabilities: %s)",
- inpath,show_capabilities(client_p));
+ inpath, show_capabilities(client_p));
ilog(LOG_TYPE_IRCD, "Link with %s established: (Capabilities: %s)",
inpath_ip, show_capabilities(client_p));
}
@@ -1098,7 +1101,7 @@ serv_connect(struct AccessItem *aconf, struct Client *by)
/* Still processing a DNS lookup? -> exit */
if (aconf->dns_pending)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Error connecting to %s: DNS lookup for connect{} in progress.",
conf->name);
return (0);
@@ -1106,7 +1109,7 @@ serv_connect(struct AccessItem *aconf, struct Client *by)
if (aconf->dns_failed)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Error connecting to %s: DNS lookup for connect{} failed.",
conf->name);
return (0);
@@ -1117,10 +1120,10 @@ serv_connect(struct AccessItem *aconf, struct Client *by)
*/
if ((client_p = hash_find_server(conf->name)) != NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Server %s already present from %s",
conf->name, get_client_name(client_p, SHOW_IP));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Server %s already present from %s",
conf->name, get_client_name(client_p, MASK_IP));
if (by && IsClient(by) && !MyClient(by))
@@ -1160,8 +1163,8 @@ serv_connect(struct AccessItem *aconf, struct Client *by)
*/
if (!attach_connect_block(client_p, conf->name, aconf->host))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
- "Host %s is not enabled for connecting:no C/N-line",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "Host %s is not enabled for connecting: no connect{} block",
conf->name);
if (by && IsClient(by) && !MyClient(by))
sendto_one(by, ":%s NOTICE %s :Connect to host %s failed.",
@@ -1282,9 +1285,9 @@ finish_ssl_server_handshake(struct Client *client_p)
client_p->name, SERVER_TYPE);
if (conf == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Lost connect{} block for %s", get_client_name(client_p, HIDE_IP));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Lost connect{} block for %s", get_client_name(client_p, MASK_IP));
exit_client(client_p, &me, "Lost connect{} block");
@@ -1309,11 +1312,11 @@ finish_ssl_server_handshake(struct Client *client_p)
*/
if (IsDead(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"%s[%s] went dead during handshake",
client_p->name,
client_p->host);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"%s went dead during handshake", client_p->name);
return;
}
@@ -1346,7 +1349,7 @@ ssl_server_handshake(fde_t *fd, struct Client *client_p)
default:
{
const char *sslerr = ERR_error_string(ERR_get_error(), NULL);
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Error connecting to %s: %s", client_p->name,
sslerr ? sslerr : "unknown SSL error");
exit_client(client_p, client_p, "Error during SSL handshake");
@@ -1408,15 +1411,15 @@ serv_connect_callback(fde_t *fd, int status, void *data)
* Admins get to see any IP, mere opers don't *sigh*
*/
if (ConfigServerHide.hide_server_ips)
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Error connecting to %s: %s",
client_p->name, comm_errstr(status));
else
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Error connecting to %s[%s]: %s", client_p->name,
client_p->host, comm_errstr(status));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Error connecting to %s: %s",
client_p->name, comm_errstr(status));
@@ -1433,9 +1436,9 @@ serv_connect_callback(fde_t *fd, int status, void *data)
client_p->name, SERVER_TYPE);
if (conf == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Lost connect{} block for %s", get_client_name(client_p, HIDE_IP));
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"Lost connect{} block for %s", get_client_name(client_p, MASK_IP));
exit_client(client_p, &me, "Lost connect{} block");
@@ -1470,11 +1473,11 @@ serv_connect_callback(fde_t *fd, int status, void *data)
*/
if (IsDead(client_p))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN,
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"%s[%s] went dead during handshake",
client_p->name,
client_p->host);
- sendto_realops_flags(UMODE_ALL, L_OPER,
+ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
"%s went dead during handshake", client_p->name);
return;
}
diff --git a/src/s_user.c b/src/s_user.c
index 1973bfa..cb8cc61 100644
--- a/src/s_user.c
+++ b/src/s_user.c
@@ -390,7 +390,7 @@ register_local_user(struct Client *source_p)
if ((Count.local >= ServerInfo.max_clients + MAX_BUFFER) ||
(Count.local >= ServerInfo.max_clients && !IsExemptLimits(source_p)))
{
- sendto_realops_flags(UMODE_FULL, L_ALL,
+ sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
"Too many clients, rejecting %s[%s].",
source_p->name, source_p->host);
++ServerStats.is_ref;
@@ -403,7 +403,8 @@ register_local_user(struct Client *source_p)
{
char tmpstr2[IRCD_BUFSIZE];
- sendto_realops_flags(UMODE_REJ, L_ALL, "Invalid username: %s (%s@%s)",
+ sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
+ "Invalid username: %s (%s@%s)",
source_p->name, source_p->username, source_p->host);
++ServerStats.is_ref;
snprintf(tmpstr2, sizeof(tmpstr2), "Invalid username [%s]",
@@ -421,7 +422,7 @@ register_local_user(struct Client *source_p)
strlcpy(source_p->id, id, sizeof(source_p->id));
hash_add_id(source_p);
- sendto_realops_flags(UMODE_CCONN, L_ALL,
+ sendto_realops_flags(UMODE_CCONN, L_ALL, SEND_NOTICE,
"Client connecting: %s (%s@%s) [%s] {%s} [%s] <%s>",
source_p->name, source_p->username, source_p->host,
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
@@ -429,7 +430,7 @@ register_local_user(struct Client *source_p)
get_client_class(source_p),
source_p->info, source_p->id);
- sendto_realops_flags(UMODE_CCONN_FULL, L_ALL,
+ sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE,
"CLICONN %s %s %s %s %s %s %s 0 %s",
source_p->name, source_p->username, source_p->host,
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ?
@@ -453,7 +454,8 @@ register_local_user(struct Client *source_p)
Count.max_loc = Count.local;
if (!(Count.max_loc % 10))
- sendto_realops_flags(UMODE_ALL, L_ALL, "New Max Local Clients: %d",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "New Max Local Clients: %d",
Count.max_loc);
}
@@ -509,13 +511,14 @@ register_remote_user(struct Client *source_p,
*/
source_p->servptr = hash_find_server(server);
- /* Super GhostDetect:
+ /*
+ * Super GhostDetect:
* If we can't find the server the user is supposed to be on,
* then simply blow the user away. -Taner
*/
if (source_p->servptr == NULL)
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"No server %s for user %s[%s@%s] from %s",
server, source_p->name, source_p->username,
source_p->host, source_p->from->name);
@@ -528,7 +531,7 @@ register_remote_user(struct Client *source_p,
if ((target_p = source_p->servptr) && target_p->from != source_p->from)
{
- sendto_realops_flags(UMODE_DEBUG, L_ALL,
+ sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
"Bad User [%s] :%s USER %s@%s %s, != %s[%s]",
source_p->from->name, source_p->name, source_p->username,
source_p->host, source_p->servptr->name,
@@ -848,7 +851,8 @@ set_user_mode(struct Client *client_p, struct Client *source_p,
if (IsServer(source_p))
{
- sendto_realops_flags(UMODE_ALL, L_ADMIN, "*** Mode for User %s from %s",
+ sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
+ "*** Mode for User %s from %s",
parv[1], source_p->name);
return;
}
@@ -1169,7 +1173,7 @@ check_xline(struct Client *source_p)
else
reason = "No Reason";
- sendto_realops_flags(UMODE_REJ, L_ALL,
+ sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
"X-line Rejecting [%s] [%s], user %s [%s]",
source_p->info, reason,
get_client_name(source_p, HIDE_IP),
@@ -1223,7 +1227,7 @@ oper_up(struct Client *source_p)
if (!HasOFlag(source_p, OPER_FLAG_N))
DelUMode(source_p, UMODE_NCHANGE);
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s is now an operator",
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s is now an operator",
get_oper_name(source_p));
send_umode_out(source_p, source_p, old);
sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
diff --git a/src/send.c b/src/send.c
index afa684e..53804b3 100644
--- a/src/send.c
+++ b/src/send.c
@@ -109,7 +109,7 @@ send_message(struct Client *to, char *buf, int len)
if (dbuf_length(&to->localClient->buf_sendq) + len > get_sendq(to))
{
if (IsServer(to))
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Max SendQ limit exceeded for %s: %lu > %lu",
get_client_name(to, HIDE_IP),
(unsigned long)(dbuf_length(&to->localClient->buf_sendq) + len),
@@ -152,7 +152,7 @@ send_message_remote(struct Client *to, struct Client *from,
{
if (!MyConnect(to))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"server send message to %s [%s] dropped from %s(Not local server)",
to->name, to->from->name, from->name);
return;
@@ -165,13 +165,13 @@ send_message_remote(struct Client *to, struct Client *from,
{
if (IsServer(from))
{
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Send message to %s [%s] dropped from %s(Fake Dir)",
to->name, to->from->name, from->name);
return;
}
- sendto_realops_flags(UMODE_ALL, L_ALL,
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Ghosted: %s[%s@%s] from %s[%s@%s] (%s)",
to->name, to->username, to->host,
from->name, from->username, from->host,
@@ -892,60 +892,48 @@ sendto_anywhere(struct Client *to, struct Client *from,
* side effects - Send to *local* ops only but NOT +s nonopers.
*/
void
-sendto_realops_flags(unsigned int flags, int level, const char *pattern, ...)
+sendto_realops_flags(unsigned int flags, int level, int type, const char *pattern, ...)
{
+ const char *ntype = NULL;
dlink_node *ptr = NULL;
char nbuf[IRCD_BUFSIZE];
va_list args;
va_start(args, pattern);
- vsnprintf(nbuf, IRCD_BUFSIZE, pattern, args);
+ vsnprintf(nbuf, sizeof(nbuf), pattern, args);
va_end(args);
- DLINK_FOREACH(ptr, oper_list.head)
+ switch (type)
{
- struct Client *client_p = ptr->data;
- assert(HasUMode(client_p, UMODE_OPER));
-
- /* If we're sending it to opers and theyre an admin, skip.
- * If we're sending it to admins, and theyre not, skip.
- */
- if (((level == L_ADMIN) && !HasUMode(client_p, UMODE_ADMIN)) ||
- ((level == L_OPER) && HasUMode(client_p, UMODE_ADMIN)))
- continue;
-
- if (HasUMode(client_p, flags))
- sendto_one(client_p, ":%s NOTICE %s :*** Notice -- %s",
- me.name, client_p->name, nbuf);
+ case SEND_NOTICE:
+ ntype = "Notice";
+ break;
+ case SEND_GLOBAL:
+ ntype = "Global";
+ break;
+ case SEND_LOCOPS:
+ ntype = "LocOps";
+ break;
+ default:
+ assert(0);
}
-}
-
-void
-sendto_globops_flags(unsigned int flags, int level, const char *pattern, ...)
-{
- dlink_node *ptr = NULL;
- char nbuf[IRCD_BUFSIZE];
- va_list args;
-
- va_start(args, pattern);
- vsnprintf(nbuf, IRCD_BUFSIZE, pattern, args);
- va_end(args);
DLINK_FOREACH(ptr, oper_list.head)
{
struct Client *client_p = ptr->data;
- assert(client_p->umodes & UMODE_OPER);
+ assert(HasUMode(client_p, UMODE_OPER));
- /* If we're sending it to opers and theyre an admin, skip.
- * If we're sending it to admins, and theyre not, skip.
+ /*
+ * If we're sending it to opers and they're an admin, skip.
+ * If we're sending it to admins, and they're not, skip.
*/
if (((level == L_ADMIN) && !HasUMode(client_p, UMODE_ADMIN)) ||
- ((level == L_OPER) && HasUMode(client_p, UMODE_ADMIN)))
+ ((level == L_OPER) && HasUMode(client_p, UMODE_ADMIN)))
continue;
if (HasUMode(client_p, flags))
- sendto_one(client_p, ":%s NOTICE %s :*** Global -- %s",
- me.name, client_p->name, nbuf);
+ sendto_one(client_p, ":%s NOTICE %s :*** %s -- %s",
+ me.name, client_p->name, ntype, nbuf);
}
}
@@ -1023,7 +1011,7 @@ ts_warn(const char *pattern, ...)
vsnprintf(buffer, sizeof(buffer), pattern, args);
va_end(args);
- sendto_realops_flags(UMODE_ALL, L_ALL, "%s", buffer);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, "%s", buffer);
ilog(LOG_TYPE_IRCD, "%s", buffer);
}