- /*
- * Handles an SAMODE request. Notifies all +s users.
- */
- int n=0;
- std::string result;
- Srv->Log(DEBUG,"SAMODE: Being handled");
- Srv->SendMode(parameters,pcnt,user);
- Srv->Log(DEBUG,"SAMODE: Modechange handled");
- result = std::string(user->nick) + std::string(" used SAMODE ");
- while (n<pcnt)
- {
- result=result + std::string(" ") + std::string(parameters[n]);
- n++;
- }
- Srv->SendOpers(result);
+ this->active = true;
+ ServerInstance->Parser->CallHandler("MODE", parameters, user);
+ if (ServerInstance->Modes->GetLastParse().length())
+ ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick) + " used SAMODE: " +ServerInstance->Modes->GetLastParse());
+ this->active = false;
+ return CMD_SUCCESS;