*/
class CommandWallops : public Command
{
- UserModeReference wallopsmode;
+ SimpleUserModeHandler wallopsmode;
public:
/** Constructor for wallops.
*/
CommandWallops(Module* parent)
: Command(parent, "WALLOPS", 1, 1)
- , wallopsmode(parent, "wallops")
+ , wallopsmode(parent, "wallops", 'w')
{
flags_needed = 'o';
syntax = "<any-text>";
std::string wallop("WALLOPS :");
wallop.append(parameters[0]);
- for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
+ const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
{
User* t = *i;
if (t->IsModeSet(wallopsmode))
- user->WriteTo(t,wallop);
+ t->WriteFrom(user, wallop);
}
return CMD_SUCCESS;