diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:25 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:25 +0000 |
commit | 6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58 (patch) | |
tree | e0c89ed36b00f4c2925d7f39c32a835657b0fa6e /src/commands | |
parent | 7eea21b8d43b0d5993e88b62d9d4894c2af49303 (diff) |
Change Extensible to use strongly typed entries
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7
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) |