Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
Lots of snotes made global. Let's see how this list works out.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Bennett committed Aug 25, 2008
1 parent 6119246 commit 0e160ba
Show file tree
Hide file tree
Showing 30 changed files with 161 additions and 139 deletions.
4 changes: 2 additions & 2 deletions modules/core/m_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ m_error(struct Client *client_p, struct Client *source_p, int parc, const char *
if(IsAnyServer(client_p))
{
if (hideit < 2)
sendto_realops_snomask(SNO_GENERAL, hideit ? L_ADMIN : (is_remote_connect(client_p) ? L_NETWIDE : L_ALL),
sendto_realops_snomask(SNO_GENERAL, (hideit ? L_ADMIN : L_ALL) | L_NETWIDE,
"ERROR :from %s -- %s",
client_p->name, para);
if (hideit > 0)
sendto_realops_snomask(SNO_GENERAL, (hideit == 1 ? L_OPER : L_ALL) | (is_remote_connect(client_p) ? L_NETWIDE : L_ALL),
sendto_realops_snomask(SNO_GENERAL, (hideit == 1 ? L_OPER : L_ALL) | L_NETWIDE,
"ERROR :from %s -- <hidden>",
client_p->name);
}
Expand Down
4 changes: 2 additions & 2 deletions modules/core/m_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
#ifdef IGNORE_BOGUS_TS
if(newts < 800000000)
{
sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"*** Bogus TS %ld on %s ignored from %s",
(long) newts, chptr->chname, client_p->name);
newts = (oldts == 0) ? oldts : 800000000;
Expand Down Expand Up @@ -626,7 +626,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
#ifdef IGNORE_BOGUS_TS
if(newts < 800000000)
{
sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"*** Bogus TS %ld on %s ignored from %s",
(long) newts, chptr->chname, client_p->name);

Expand Down
2 changes: 1 addition & 1 deletion modules/core/m_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ msg_client(int p_or_n, const char *command,
}
else if(source_p->from == target_p->from)
{
sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"Send message to %s[%s] dropped from %s(Fake Dir)",
target_p->name, target_p->from->name, source_p->name);
return;
Expand Down
40 changes: 18 additions & 22 deletions modules/core/m_nick.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ ms_nick(struct Client *client_p, struct Client *source_p, int parc, const char *
if(!clean_username(parv[5]) || !clean_host(parv[6]))
{
ServerStats.is_kill++;
sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"Bad user@host: %s@%s From: %s(via %s)",
parv[5], parv[6], parv[7], client_p->name);
sendto_one(client_p, ":%s KILL %s :%s (Bad user@host)", me.name, parv[1], me.name);
Expand All @@ -353,7 +353,7 @@ ms_nick(struct Client *client_p, struct Client *source_p, int parc, const char *
{
char *s = LOCAL_COPY(parv[8]);
/* why exactly do we care? --fl */
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"Long realname from server %s for %s", parv[7], parv[1]);

s[REALLEN] = '\0';
Expand Down Expand Up @@ -449,7 +449,7 @@ ms_uid(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(strlen(parv[9]) > REALLEN)
{
char *s = LOCAL_COPY(parv[9]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Long realname from server %s for %s",
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Long realname from server %s for %s",
parv[0], parv[1]);
s[REALLEN] = '\0';
parv[9] = s;
Expand Down Expand Up @@ -547,7 +547,7 @@ ms_euid(struct Client *client_p, struct Client *source_p, int parc, const char *
if(strlen(parv[11]) > REALLEN)
{
char *s = LOCAL_COPY(parv[11]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Long realname from server %s for %s",
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Long realname from server %s for %s",
parv[0], parv[1]);
s[REALLEN] = '\0';
parv[11] = s;
Expand Down Expand Up @@ -585,7 +585,7 @@ ms_save(struct Client *client_p, struct Client *source_p, int parc, const char *
if (target_p == NULL)
return 0;
if (!IsPerson(target_p))
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Ignored SAVE message for non-person %s from %s",
target_p->name, source_p->name);
else if (IsDigit(target_p->name[0]))
Expand All @@ -595,7 +595,7 @@ ms_save(struct Client *client_p, struct Client *source_p, int parc, const char *
else if (target_p->tsinfo == atol(parv[2]))
save_user(client_p, source_p, target_p);
else
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Ignored SAVE message for %s from %s",
target_p->name, source_p->name);
return 0;
Expand Down Expand Up @@ -897,7 +897,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_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick collision on %s(%s <- %s)(both %s)",
target_p->name, target_p->from->name, client_p->name, action);

Expand Down Expand Up @@ -960,12 +960,12 @@ perform_nick_collides(struct Client *source_p, struct Client *client_p,
else
{
if(sameuser)
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick collision on %s(%s <- %s)(older %s)",
target_p->name, target_p->from->name,
client_p->name, action);
else
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick collision on %s(%s <- %s)(newer %s)",
target_p->name, target_p->from->name,
client_p->name, action);
Expand Down Expand Up @@ -1014,7 +1014,7 @@ perform_nickchange_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) || !source_p->user)
{
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick change collision from %s to %s(%s <- %s)(both %s)",
source_p->name, target_p->name, target_p->from->name,
client_p->name, action);
Expand Down Expand Up @@ -1057,12 +1057,12 @@ perform_nickchange_collides(struct Client *source_p, struct Client *client_p,
(!sameuser && newts > target_p->tsinfo))
{
if(sameuser)
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick change collision from %s to %s(%s <- %s)(older %s)",
source_p->name, target_p->name,
target_p->from->name, client_p->name, action);
else
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick change collision from %s to %s(%s <- %s)(newer %s)",
source_p->name, target_p->name,
target_p->from->name, client_p->name, action);
Expand Down Expand Up @@ -1102,12 +1102,12 @@ perform_nickchange_collides(struct Client *source_p, struct Client *client_p,
else
{
if(sameuser)
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick collision on %s(%s <- %s)(older %s)",
target_p->name, target_p->from->name,
client_p->name, action);
else
sendto_realops_snomask(SNO_SKILL, L_ALL,
sendto_realops_snomask(SNO_SKILL, L_NETWIDE,
"Nick collision on %s(%s <- %s)(newer %s)",
target_p->name, target_p->from->name,
client_p->name, action);
Expand Down Expand Up @@ -1152,7 +1152,7 @@ register_client(struct Client *client_p, struct Client *server,
{
if((server = find_server(NULL, parv[7])) == NULL)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Ghost killed: %s on invalid server %s",
nick, parv[7]);
sendto_one(client_p, ":%s KILL %s :%s (Server doesn't exist)",
Expand Down Expand Up @@ -1263,7 +1263,7 @@ register_client(struct Client *client_p, struct Client *server,
{
struct Client *target_p = source_p->servptr->from;

sendto_realops_snomask(SNO_DEBUG, L_ALL,
sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
"Bad User [%s] :%s USER %s@%s %s, != %s[%s]",
client_p->name, source_p->name,
source_p->username, source_p->host,
Expand Down Expand Up @@ -1309,7 +1309,7 @@ save_user(struct Client *client_p, struct Client *source_p,
{
/* This shouldn't happen */
/* Note we only need SAVE support in this direction */
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Killed %s!%s@%s for nick collision detected by %s (%s does not support SAVE)",
target_p->name, target_p->username, target_p->host, source_p->name, target_p->from->name);
kill_client_serv_butone(NULL, target_p, "%s (Nick collision (no SAVE support))", me.name);
Expand Down Expand Up @@ -1342,12 +1342,8 @@ static void bad_nickname(struct Client *client_p, const char *nick)
{
char squitreason[100];

sendto_wallops_flags(UMODE_WALLOP, &me,
"Squitting %s because of bad nickname %s (NICKLEN mismatch?)",
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Squitting %s because of bad nickname %s (NICKLEN mismatch?)",
client_p->name, nick);
sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
":%s WALLOPS :Squitting %s because of bad nickname %s (NICKLEN mismatch?)",
me.id, client_p->name, nick);

rb_snprintf(squitreason, sizeof squitreason,
"Bad nickname introduced [%s]", nick);
Expand Down
18 changes: 9 additions & 9 deletions modules/core/m_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
* Definitely don't do that here. This is from an unregistered
* connect - A1kmm.
*/
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Attempt to re-introduce server %s from %s",
name, client_p->name);
ilog(L_SERVER, "Attempt to re-introduce server %s from %s",
Expand All @@ -219,7 +219,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char

if(has_id(client_p) && (target_p = find_id(client_p->id)) != NULL)
{
sendto_realops_snomask(SNO_GENERAL, is_remote_connect(client_p) ? L_NETWIDE : L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Attempt to re-introduce SID %s from %s%s",
client_p->id,
EmptyString(client_p->name) ? name : "",
Expand Down Expand Up @@ -300,7 +300,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char

sendto_one(client_p, "ERROR :Server %s already exists", name);

sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled, server %s already exists",
client_p->name, name);
ilog(L_SERVER, "Link %s cancelled, server %s already exists",
Expand All @@ -322,7 +322,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
* for a while and servers to send stuff to the wrong place.
*/
sendto_one(client_p, "ERROR :Nickname %s already exists!", name);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled: Server/nick collision on %s",
client_p->name, name);
ilog(L_SERVER, "Link %s cancelled: Server/nick collision on %s",
Expand Down Expand Up @@ -416,7 +416,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char

if(strlen(name) > HOSTLEN)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s introduced server with invalid servername %s",
client_p->name, name);
ilog(L_SERVER, "Link %s introduced server with invalid servername %s",
Expand Down Expand Up @@ -480,7 +480,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
if((target_p = find_server(NULL, parv[1])) != NULL)
{
sendto_one(client_p, "ERROR :Server %s already exists", parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled, server %s already exists",
client_p->name, parv[1]);
ilog(L_SERVER, "Link %s cancelled, server %s already exists",
Expand All @@ -494,7 +494,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
if((target_p = find_id(parv[3])) != NULL)
{
sendto_one(client_p, "ERROR :SID %s already exists", parv[3]);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled, SID %s already exists",
client_p->name, parv[3]);
ilog(L_SERVER, "Link %s cancelled, SID %s already exists",
Expand All @@ -507,7 +507,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(bogus_host(parv[1]) || strlen(parv[1]) > HOSTLEN)
{
sendto_one(client_p, "ERROR :Invalid servername");
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled, servername %s invalid",
client_p->name, parv[1]);
ilog(L_SERVER, "Link %s cancelled, servername %s invalid",
Expand All @@ -521,7 +521,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
!IsIdChar(parv[3][2]) || parv[3][3] != '\0')
{
sendto_one(client_p, "ERROR :Invalid SID");
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Link %s cancelled, SID %s invalid",
client_p->name, parv[3]);
ilog(L_SERVER, "Link %s cancelled, SID %s invalid",
Expand Down
7 changes: 1 addition & 6 deletions modules/core/m_squit.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,9 @@ ms_squit(struct Client *client_p, struct Client *source_p, int parc, const char
*/
else if(MyConnect(target_p))
{
sendto_wallops_flags(UMODE_WALLOP, &me,
"Remote SQUIT %s from %s (%s)",
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Remote SQUIT %s from %s (%s)",
target_p->name, source_p->name, comment);

sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
":%s WALLOPS :Remote SQUIT %s from %s (%s)",
me.id, target_p->name, source_p->name, comment);

ilog(L_SERVER, "SQUIT From %s : %s (%s)", parv[0], target_p->name, comment);
}
exit_client(client_p, target_p, source_p, comment);
Expand Down
2 changes: 1 addition & 1 deletion modules/m_challenge.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
static int challenge_load(void)
{
#ifndef STATIC_MODULES
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Challenge module not loaded because OpenSSL is not available.");
ilog(L_MAIN, "Challenge module not loaded because OpenSSL is not available.");
return -1;
Expand Down
8 changes: 4 additions & 4 deletions modules/m_dline.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *

if(EmptyString(oper_reason))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s added temporary %d min. D-Line for [%s] [%s]",
get_oper_name(source_p), tdline_time / 60,
aconf->host, reason);
Expand All @@ -323,7 +323,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
}
else
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s added temporary %d min. D-Line for [%s] [%s|%s]",
get_oper_name(source_p), tdline_time / 60,
aconf->host, reason, oper_reason);
Expand Down Expand Up @@ -379,7 +379,7 @@ apply_undline(struct Client *source_p, const char *cidr)
sendto_one(source_p,
":%s NOTICE %s :Un-dlined [%s] from temporary D-lines",
me.name, source_p->name, buf);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s has removed the temporary D-Line for: [%s]",
get_oper_name(source_p), buf);
ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), buf);
Expand Down Expand Up @@ -467,7 +467,7 @@ apply_undline(struct Client *source_p, const char *cidr)
}

sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed", me.name, source_p->name, aconf->host);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"%s has removed the D-Line for: [%s]", get_oper_name(source_p), aconf->host);
ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), aconf->host);
delete_one_address_conf(aconf->host, aconf);
Expand Down
Loading

0 comments on commit 0e160ba

Please sign in to comment.