1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
16 class CommandModeNotice : public Command
19 CommandModeNotice(Module* parent) : Command(parent,"MODENOTICE",2,2) { syntax = "<modes> <message>"; }
21 CmdResult Handle(const std::vector<std::string>& parameters, User *src)
23 int mlen = parameters[0].length();
24 for (std::vector<LocalUser*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
27 for (int n = 0; n < mlen; n++)
29 if (!user->IsModeSet(parameters[0][n]))
32 user->Write(":%s NOTICE %s :*** From %s: %s", ServerInstance->Config->ServerName.c_str(),
33 user->nick.c_str(), src->nick.c_str(), parameters[1].c_str());
39 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
41 return ROUTE_BROADCAST;
45 COMMAND_INIT(CommandModeNotice)