From e6fa614ad27cd68aa61605ca0884eee9c44384eb Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 12 May 2007 16:22:35 +0000 Subject: We've had an IS_OPER macro for a long time. About time we started using it, maybe? :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6990 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_stats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd_stats.cpp') diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp index 7a232e033..24fa7e7ec 100644 --- a/src/cmd_stats.cpp +++ b/src/cmd_stats.cpp @@ -43,7 +43,7 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis { std::string sn = ServerInstance->Config->ServerName; - if ((*ServerInstance->Config->UserStats) && (!*user->oper) && (!strchr(ServerInstance->Config->UserStats,statschar))) + if ((*ServerInstance->Config->UserStats) && !IS_OPER(user) && !strchr(ServerInstance->Config->UserStats,statschar)) { results.push_back(sn+std::string(" 481 ")+user->nick+" :Permission denied - STATS "+statschar+" is oper-only"); return; @@ -125,7 +125,7 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis int idx = 0; for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) { - if ((*i->second->oper) && (!ServerInstance->ULine(i->second->server))) + if (IS_OPER(i->second) && !ServerInstance->ULine(i->second->server)) { results.push_back(sn+" 249 "+user->nick+" :"+i->second->nick+" ("+i->second->ident+"@"+i->second->dhost+") Idle: "+ (IS_LOCAL(i->second) ? ConvToStr(ServerInstance->Time() - i->second->idle_lastmsg) + " secs" : "unavailable")); -- cgit v1.2.3