diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 7 | ||||
-rw-r--r-- | src/coremods/core_channel/cmd_names.cpp | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 485ffd4c9..089b6927e 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -626,7 +626,7 @@ const char* Channel::ChanModes(bool showkey) /* compile a userlist of a channel into a string, each nick seperated by * spaces and op, voice etc status shown as @ and +, and send it to 'user' */ -void Channel::UserList(User *user) +void Channel::UserList(User* user, bool has_user) { bool has_privs = user->HasPrivPermission("channels/auspex"); std::string list; @@ -635,11 +635,6 @@ void Channel::UserList(User *user) list.append(this->name).append(" :"); std::string::size_type pos = list.size(); - /* Improvement by Brain - this doesnt change in value, so why was it inside - * the loop? - */ - bool has_user = this->HasUser(user); - const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size(); std::string prefixlist; std::string nick; diff --git a/src/coremods/core_channel/cmd_names.cpp b/src/coremods/core_channel/cmd_names.cpp index 558ad8407..20faae774 100644 --- a/src/coremods/core_channel/cmd_names.cpp +++ b/src/coremods/core_channel/cmd_names.cpp @@ -54,7 +54,7 @@ CmdResult CommandNames::Handle (const std::vector<std::string>& parameters, User bool has_user = c->HasUser(user); if ((!c->IsModeSet(secretmode)) || (has_user) || (user->HasPrivPermission("channels/auspex"))) { - c->UserList(user); + c->UserList(user, has_user); return CMD_SUCCESS; } } |