summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-13 12:17:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-13 12:17:00 +0000
commit901a29507856b30d8995efb3ab132ba68eb35837 (patch)
treecdabf02315c420928fe9abfe656e9a7c9aec88d9
parent670247683cae887bd2420762bf39b6d17e73c3ff (diff)
Commit some changes from third party patch. Thanks Avenger and HiroP. Patch review is not finished, there may be more changes to come.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7715 e03df62e-2008-0410-955e-edbf42e46eb7
-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)