diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-05 14:17:12 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-05 14:17:12 +0100 |
commit | d736eba00b274c87662bd73a3acf8288135643d6 (patch) | |
tree | 7a23e24f95e6f5b26610d83957a4198bf5f16ed0 /src/commands/cmd_quit.cpp | |
parent | a500ec70bb82151c8fcf7443b4645640233952e8 (diff) |
Improve UserManager::QuitUser() and related code
- Make operreason optional; NULL means same as quitreason
- Remove User::quietquit, it is now handled internally in spanningtree
- Send snotice about quitting remote users from spanningtree
Diffstat (limited to 'src/commands/cmd_quit.cpp')
-rw-r--r-- | src/commands/cmd_quit.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/commands/cmd_quit.cpp b/src/commands/cmd_quit.cpp index 61a88e2b5..144f4675b 100644 --- a/src/commands/cmd_quit.cpp +++ b/src/commands/cmd_quit.cpp @@ -56,21 +56,14 @@ CmdResult CommandQuit::Handle (const std::vector<std::string>& parameters, User quitmsg = ServerInstance->Config->FixedQuit; else quitmsg = parameters.size() ? - ServerInstance->Config->PrefixQuit + std::string(parameters[0]) + ServerInstance->Config->SuffixQuit + ServerInstance->Config->PrefixQuit + parameters[0] + ServerInstance->Config->SuffixQuit : "Client exited"; } else quitmsg = parameters.size() ? parameters[0] : "Client exited"; std::string* operquit = ServerInstance->OperQuit.get(user); - if (operquit) - { - ServerInstance->Users->QuitUser(user, quitmsg, operquit->c_str()); - } - else - { - ServerInstance->Users->QuitUser(user, quitmsg); - } + ServerInstance->Users->QuitUser(user, quitmsg, operquit); return CMD_SUCCESS; } |