summaryrefslogtreecommitdiff
path: root/src/cmd_stats.cpp
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 /src/cmd_stats.cpp
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
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r--src/cmd_stats.cpp11
1 files changed, 7 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;
}
-