Unreal4* Modul Kodu

These are old archives. They are kept for historic purposes only.

Moderators: Gottem, Supporters

Post Reply
AdmiraL8544
Posts: 3
Joined: Wed Nov 27, 2019 1:15 pm

Unreal4* Modul Kodu

Post by AdmiraL8544 »

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?
OmerAti
Posts: 1
Joined: Fri Sep 04, 2020 1:38 pm

Re: Unreal4* Modul Kodu

Post by OmerAti »

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
Post Reply