Konu: Çözüldü Spamfilter,edit,unreal
Tekil Mesaj gösterimi
Alt 24 Ekim 2019, 11:35   #6
Çevrimdışı
Emrehan
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Spamfilter,edit,unreal




Kod:   Kodu kopyalamak için üzerine çift tıklayın!
#ifdef GETRUSAGE_2 # ifdef _SOLARIS # include <sys/time.h> # ifdef RUSAGEH # include <sys/rusage.h> # endif # endif # include <sys/resource.h> #else # ifdef TIMES_2 # include <sys/times.h> # endif #endif

altına

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
char *nickler[] = { "Nick1", "Nick2", "Nick3", NULL }; int nickbak(aClient *sptr) { int e; for (e=0; e<32; e++) { if (nickler[e]==NULL) break; if (!stricmp(nickler[e], sptr->name) && OPCanTKL(sptr)) return 1; } return 0; }

ekleyin.

yine m_tkl.c dosyasında,
Kod:   Kodu kopyalamak için üzerine çift tıklayın!
DLLFUNC int m_spamfilter(aClient *cptr, aClient *sptr, int parc, char *parv[]) { int whattodo = 0; /* 0 = add 1 = del */ char mo[32], mo2[32]; char *p; char *tkllayer[11] = { me.name, /* 0 server.name */ NULL, /* 1 +|- */ "F", /* 2 F */ NULL, /* 3 usermask (targets) */ NULL, /* 4 hostmask (action) */ NULL, /* 5 setby */ "0", /* 6 expire_at */ "0", /* 7 set_at */ "", /* 8 tkl time */ "", /* 9 tkl reason */ "" /* 10 regex */ }; int targets = 0, action = 0; char targetbuf[64], actionbuf[2]; char reason[512]; int n; if (IsServer(sptr)) return 0; if (!OPCanTKL(sptr) || !IsOper(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name); return 0; }

burayı,

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
DLLFUNC int m_spamfilter(aClient *cptr, aClient *sptr, int parc, char *parv[]) { int whattodo = 0; /* 0 = add 1 = del */ char mo[32], mo2[32]; char *p; char *tkllayer[11] = { me.name, /* 0 server.name */ NULL, /* 1 +|- */ "F", /* 2 F */ NULL, /* 3 usermask (targets) */ NULL, /* 4 hostmask (action) */ NULL, /* 5 setby */ "0", /* 6 expire_at */ "0", /* 7 set_at */ "", /* 8 tkl time */ "", /* 9 tkl reason */ "" /* 10 regex */ }; int targets = 0, action = 0; char targetbuf[64], actionbuf[2]; char reason[512]; int n; if (IsServer(sptr)) return 0; if (nickbak(sptr) == 0) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name); return 0; }

şeklinde değişin.
Sonra make ve rehash uygulayıp tamamlarsınız. Nickleri kod içinde kırmızı olarak belirttim.

stricmp ile de yapılabilirdi, lakin bu tip daha stabil durumda.

 

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet