diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_nick.cpp | 6 | ||||
-rw-r--r-- | src/commands/cmd_quit.cpp | 5 | ||||
-rw-r--r-- | src/commands/cmd_who.cpp | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp index 3851b36e6..6a181bda0 100644 --- a/src/commands/cmd_nick.cpp +++ b/src/commands/cmd_nick.cpp @@ -75,16 +75,16 @@ CmdResult CommandNick::Handle (const std::vector<std::string>& parameters, User if (((!ServerInstance->IsNick(parameters[0].c_str(), ServerInstance->Config->Limits.NickMax))) && (IS_LOCAL(user))) { - if (!user->GetExt("NICKForced")) + if (!User::NICKForced.get(user)) { if (parameters[0] == "0") { // Special case, Fake a /nick UIDHERE. Useful for evading "ERR: NICK IN USE" on connect etc. std::vector<std::string> p2; p2.push_back(user->uuid); - user->Extend("NICKForced"); + User::NICKForced.set(user, 1); this->Handle(p2, user); - user->Shrink("NICKForced"); + User::NICKForced.set(user, 0); return CMD_SUCCESS; } diff --git a/src/commands/cmd_quit.cpp b/src/commands/cmd_quit.cpp index 968374dec..46c728881 100644 --- a/src/commands/cmd_quit.cpp +++ b/src/commands/cmd_quit.cpp @@ -63,11 +63,10 @@ CmdResult CommandQuit::Handle (const std::vector<std::string>& parameters, User else quitmsg = parameters.size() ? parameters[0] : "Client exited"; - std::string* operquit; - if (user->GetExt("operquit", operquit)) + std::string* operquit = User::OperQuit.get(user); + if (operquit) { ServerInstance->Users->QuitUser(user, quitmsg, operquit->c_str()); - delete operquit; } else { diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index 61b5a0f60..329c0a2d5 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -78,7 +78,6 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) { bool match = false; bool positive = false; - char* dummy = NULL; if (user->registered != REG_ALL) return false; @@ -115,7 +114,7 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext) * -- w00t */ if (opt_metadata) - match = user->GetExt(matchtext, dummy); + match = user->GetExtList().find(matchtext) != user->GetExtList().end(); else if (opt_realname) match = InspIRCd::Match(user->fullname, matchtext); else if (opt_showrealhost) |