/** Spool the NAMES list for this channel to the given user
* @param user The user to spool the NAMES list to
+ * @param isinside If true, the user is inside the channel, if not then false
*/
- void UserList(User *user);
+ void UserList(User* user, bool isinside = true);
/** Get the value of a users prefix on this channel.
* @param user The user to look up
/* 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;
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;
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;
}
}