summaryrefslogtreecommitdiff
path: root/src/commands/cmd_who.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 01:52:59 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 01:52:59 +0000
commitde25d946733f774e3a5b53a58438a9c92af0acbe (patch)
tree459ccc3b0c2423f1592afec4b458615968a1176d /src/commands/cmd_who.cpp
parente57ed15735a3f23d6451845c7cf96758e6909d8c (diff)
Get rid of a bunch of memory-wasting C-style strings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_who.cpp')
-rw-r--r--src/commands/cmd_who.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp
index 89ca60d02..49fb26a2f 100644
--- a/src/commands/cmd_who.cpp
+++ b/src/commands/cmd_who.cpp
@@ -148,7 +148,7 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext)
match = InspIRCd::Match(user->nick, matchtext);
/* Don't allow server name matches if HideWhoisServer is enabled, unless the command user has the priv */
- if (!match && (!*ServerInstance->Config->HideWhoisServer || cuser->HasPrivPermission("users/auspex")))
+ if (!match && (ServerInstance->Config->HideWhoisServer.empty() || cuser->HasPrivPermission("users/auspex")))
match = InspIRCd::Match(user->server, matchtext);
return match;
@@ -183,7 +183,7 @@ void CommandWho::SendWhoLine(User* user, const std::string &initial, Channel* ch
Channel* chlast = ServerInstance->FindChan(lcn);
std::string wholine = initial + (ch ? ch->name : lcn) + " " + u->ident + " " + (opt_showrealhost ? u->host : u->dhost) + " " +
- ((*ServerInstance->Config->HideWhoisServer && !user->HasPrivPermission("servers/auspex")) ? ServerInstance->Config->HideWhoisServer : u->server) +
+ ((!ServerInstance->Config->HideWhoisServer.empty() && !user->HasPrivPermission("servers/auspex")) ? ServerInstance->Config->HideWhoisServer : u->server) +
" " + u->nick + " ";
/* away? */
@@ -255,9 +255,6 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
}
}
- if (ServerInstance->FindServerName(matchtext))
- usingwildcards = true;
-
if (parameters.size() > 1)
{
/* Fix for bug #444, WHO flags count as a wildcard */
@@ -300,11 +297,11 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
opt_away = true;
break;
case 'l':
- if (user->HasPrivPermission("users/auspex") || !*ServerInstance->Config->HideWhoisServer)
+ if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideWhoisServer.empty())
opt_local = true;
break;
case 'f':
- if (user->HasPrivPermission("users/auspex") || !*ServerInstance->Config->HideWhoisServer)
+ if (user->HasPrivPermission("users/auspex") || ServerInstance->Config->HideWhoisServer.empty())
opt_far = true;
break;
case 't':