/* $ModDesc: Provides more advanced UnrealIRCd SAMODE command */
#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
/** Handle /SAMODE
*/
-class cmd_samode : public command_t
+class cmd_samode : public Command
{
public:
- cmd_samode (InspIRCd* Instance) : command_t(Instance,"SAMODE", 'o', 2)
+ cmd_samode (InspIRCd* Instance) : Command(Instance,"SAMODE", 'o', 2)
{
this->source = "m_samode.so";
syntax = "<target> <modes> {<mode-parameters>}";
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
/*
* Handles an SAMODE request. Notifies all +s users.
*/
-
- userrec* n = new userrec(ServerInstance);
- n->SetFd(FD_MAGIC_NUMBER);
- ServerInstance->SendMode(parameters,pcnt,n);
- delete n;
+ ServerInstance->SendMode(parameters, pcnt, ServerInstance->FakeClient);
if (ServerInstance->Modes->GetLastParse().length())
{
Event rmode2((char *)&n, NULL, "send_opers");
rmode2.Send(ServerInstance);
- /* XXX: Yes, this is right. We dont want to propogate the
+ /* XXX: Yes, this is right. We dont want to propagate the
* actual SAMODE command, just the MODE command generated
* by the send_mode
*/