Kod: Kodu kopyalamak için üzerine çift tıklayın!
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#include "proto.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
static Cmdoverride *privmsg_override = NULL;
static ModuleInfo *privmsg_modinfo = NULL;
DLLFUNC int m_privmsg(Cmdoverride *anoverride, aClient *cptr, aClient *sptr, int parc, char *parv[]);
#define MSG_PRIVMSG "PRIVMSG"
ModuleHeader MOD_HEADER(privmsg)
= {
"privmsg", /* Name */
"v1", /* Ver */
"Ozel ve Kanal PRIVMSG Engelleme Sure 1dk EceLMeriC", /* Desc. */
"3.2-b8-1",
NULL
};
DLLFUNC int MOD_INIT(privmsg)(ModuleInfo *modinfo)
{
privmsg_modinfo = modinfo;
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(privmsg)(int module_load)
{
privmsg_override = CmdoverrideAdd(privmsg_modinfo->handle, MSG_PRIVMSG, m_privmsg);
if (!privmsg_override)
{
sendto_realops("privmsg: Hata: %s", ModuleGetErrorStr(privmsg_modinfo->handle));
return MOD_FAILED;
}
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(privmsg)(int module_unload)
{
CmdoverrideDel(privmsg_override);
return MOD_SUCCESS;
}
DLLFUNC int privmsg(Cmdoverride *anoverride, aClient *cptr, aClient *sptr, int parc, char *parv[])
{
if (!IsAnOper(sptr))
{
if (!IsARegNick(sptr))
{
if (sptr->firsttime + 60 > TStime())
sendto_one(sptr, ":%s PRIVMSG %s :2Lutfen ozel/kanal mesaj kullanabilmek icin7 %d 2saniye daha bekleyiniz.", me.name, sptr->name, 60 - (TStime() - sptr->firsttime));
return 0;
}
}
return CallCmdoverride(privmsg_override, cptr, sptr, parc, parv);
}