1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
15 #include "commands/cmd_quit.h"
19 extern "C" DllExport Command* init_command(InspIRCd* Instance)
21 return new CommandQuit(Instance);
24 CmdResult CommandQuit::Handle (const std::vector<std::string>& parameters, User *user)
31 if (*ServerInstance->Config->FixedQuit)
32 quitmsg = ServerInstance->Config->FixedQuit;
34 quitmsg = parameters.size() ?
35 ServerInstance->Config->PrefixQuit + std::string(parameters[0]) + ServerInstance->Config->SuffixQuit
39 quitmsg = parameters.size() ? parameters[0] : "Client exited";
41 ServerInstance->Users->QuitUser(user, quitmsg);