summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd_stats.cpp11
-rw-r--r--src/command_parse.cpp2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 5a78bd9e9..2185b325e 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -53,7 +53,11 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user,
if ((*ServerInstance->Config->UserStats) && !IS_OPER(user) && !ServerInstance->ULine(user->server) && !strchr(ServerInstance->Config->UserStats,statschar))
{
- results.push_back(sn+std::string(" 481 ")+user->nick+" :Permission denied - STATS "+statschar+" is oper-only");
+ ServerInstance->SNO->WriteToSnoMask('t',
+ "%s '%c' denied for %s (%s@%s)",
+ (IS_LOCAL(user) ? "Stats" : "Remote stats"),
+ statschar, user->nick, user->ident, user->host);
+ results.push_back(sn + " 481 " + user->nick + " :Permission denied - STATS " + statschar + " is oper-only");
return;
}
@@ -311,8 +315,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user,
}
results.push_back(sn+" 219 "+user->nick+" "+statschar+" :End of /STATS report");
- ServerInstance->SNO->WriteToSnoMask('t',"%s '%c' requested by %s (%s@%s)",(!strcmp(user->server,ServerInstance->Config->ServerName) ? "Stats" : "Remote stats"),statschar,user->nick,user->ident,user->host);
-
+ ServerInstance->SNO->WriteToSnoMask('t',"%s '%c' requested by %s (%s@%s)",
+ (IS_LOCAL(user) ? "Stats" : "Remote stats"), statschar, user->nick, user->ident, user->host);
return;
}
-
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 10421a346..b333084e7 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -325,6 +325,8 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
{
/* command is disabled! */
user->WriteServ("421 %s %s :This command has been disabled.",user->nick,command.c_str());
+ ServerInstance->SNO->WriteToSnoMask('d', "%s denied for %s (%s@%s)",
+ command.c_str(), user->nick, user->ident, user->host);
return;
}
if (items < cm->second->min_params)