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
#include
#include
#include
#include
#ifdef _WIN32
#include
#endif
#include
#include "h.h"
#include "proto.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
ModuleHeader MOD_HEADER(nocolorumode)
= {
"nocolorumode",
"Kanal icin",
"3.2-b8-1",
NULL
};
long UMODE_STRIPCOLOR = 0L;
char *h_nocolor_CHANMSG(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice);
DLLFUNC int MOD_INIT(nocolorumode)(ModuleInfo *modinfo)
{
UmodeAdd(modinfo->handle, ''''''''K'''''''', UMODE_GLOBAL, umode_allow_all, &UMODE_STRIPCOLOR);
HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, h_nocolor_CHANMSG);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(nocolorumode)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(nocolorumode)(int module_unload)
{
return MOD_SUCCESS;
}
char *h_nocolor_CHANMSG(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice)
{
if (IsULine(sptr) || IsServer(sptr))
return text;
if (*text == ''''''''\003'''''''') {
sendto_one(sptr, ":%s NOTICE %s : Bu sunucuda renkli yazi kullanimi yasaktir.", me.name, sptr->name);
}
else {
return text;
} // else
}// Function
Kanal icinde söyle değiştirdim ama deneyebilirseniz bi bakında haber verirsiniz.
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir. +K ilem kanal renkliye kapatiliyor.