hello guys i am developing a module but i got stuck somewhere
#include "unrealircd.h"
int chansno_hook_chanmode(aClient *cptr, aClient *sptr, aChannel *chptr, char *modebuf, char *parabuf, time_t sendts, int samode);
ModuleHeader MOD_HEADER() = {
"JRodix Kanal Bilgilendirme Modulu",
"v1",
"UnrealIRCd-JRodix",
"3.2-b8-1",
NULL,
};
MOD_TEST()
{
return MOD_SUCCESS;
}
MOD_INIT()
{
HookAdd(modinfo->handle, HOOKTYPE_LOCAL_CHANMODE, 0, chansno_hook_chanmode);
return MOD_SUCCESS;
}
MOD_LOAD()
{
return MOD_SUCCESS;
}
MOD_UNLOAD()
{
return MOD_SUCCESS;
}
int chansno_hook_chanmode(aClient *cptr, aClient *sptr, aChannel *chptr, char *modebuf, char *parabuf, time_t sendts, int samode) {
if (stricmp(sptr->name,"ChanServ"))
if (!strcmp(modebuf,"+o")) {
sendto_channel_butserv(chptr, &me, ":%s PRIVMSG %s :4Kanal Operator Moduna Gectiniz 2%s (10Seviye.3) Yetkilendiren:2 %s", MESAJNICK, chptr->chname, BadPtr(parabuf) ? "" : parabuf, sptr->name);
}
else {
if (!strcmp(modebuf,"-o"))
sendto_channel_butserv(chptr, &me, ":%s PRIVMSG %s :4Kanal Operator Modun'dan Alindiniz 2%s ", MESAJNICK, chptr->chname, BadPtr(parabuf) ? "" : parabuf);
}
return HOOK_CONTINUE;
}
when i add chanserv +o it doesn't react what i did but i want chanserv +o to react even if it does?
Unreal4* Modul Kodu
Moderators: Gottem, Supporters
Re: Unreal4* Modul Kodu
I guess this is a problem because you showed it from local
HookAdd(modinfo->handle, HOOKTYPE_REMOTE_CHANMODE, 0, chansno_hook_chanmode);
If you change it, use the code as it is, no problem
HookAdd(modinfo->handle, HOOKTYPE_REMOTE_CHANMODE, 0, chansno_hook_chanmode);
If you change it, use the code as it is, no problem