Kahkaha

Bayıldım

Cool

Kızgın

Mahcup

Öğretici

Şaşkın

Suskun

Tatlı

Üzgün

Süper

Channotext MODULE

Ana Sayfa » internet » IRC » Channotext MODULE
Channotext MODULE

static int sure = 60;

süreyi buradan değişebilirsiniz. Kullanici giriş yaptiktan 60 saniye önce kanala text atarsa, Kullanicinin mesaji engellenip özeline ve statusune bilgi metni yollanir.
Kullanici bu süre çerçevesinde yazdiği takdirde, #Kontrol Kanalina alinir. Ayrica Bu süre çerçevesinde yazdiği mesajlar, #Botkontrol Kanalinda gösterilir.
Girişte 1 dk içerisinde yazilip engellenen tüm mesajlar, Kullanicinin IP Adresi ile birlikte tarihiyle log dosyasına kaydedilir.
Bununla birlikte, Sadece NET ADMINLER Bu log dosyasini, IRC Üzerinden komut yardimi ile okuyabilirler. Komut Kullanma sadece netadmindir.
Dosyayi irc üzerinden okumak icin, /knowledges komutunu kullaniniz.

Bunlar dışında bu kullanicilara shun atmak icin;

/* if you want to shun.

************************************************** *****
* return place_host_ban(sptr, BAN_ACT_SHUN, “reason”, 60);
************************************************** *****

*/

Burdaki kodu aktifleştirebilirsiniz.

Kod:
/*
*This module is Server Security module.
* The user, is connecting and, user can’t write to channels notext minutes.
* You can change notext time.
* notext is seconds..
* And… if user write to channels in one minutes, The modul blocked users’s messages one minute.
* User sjoin to #Kontrol.
* And, You are look to users messages in #BotKontrol channel..
* Use The /Knowledges Commands for forbid list.
* The messages are writing to yasaklilar.txt with User’s IP, Date, clock, Nick and messages. They are logging..
*/

#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”
#ifdef STRIPBADWORDS
#include “badwords.h”
#endif
#ifdef _WIN32
#include “version.h”
#endif
aChannel *chptr;
#define tox “#BotKontrol”
#define RPL_OPERS 337

#define MSG_knowledges “knowledges”
#define TOK_knowledges “BL”

DLLFUNC char *m_notext(aClient *, aClient *, aClient *, char *, int);
DLLFUNC int m_knowledges(aClient *sptr);

//seconds
static int sure = 60;

#define modulismi “m_channotext”
#define aciklama “Forbiddin text to channels 1 min. (toXic)”
#define aciklama2 “Forbiddin text to channels 1 min. (toXic)”
#define version “3.2-b8-1”
ModuleHeader MOD_HEADER(m_notext)
= {
modulismi,
aciklama,
aciklama2,
version,
NULL
};
DLLFUNC int MOD_INIT(m_notext)(ModuleInfo *modinfo)
{
HookAddPCharEx(modinfo->handle, HOOKTYPE_CHANMSG, m_notext);
add_Command(MSG_knowledges, TOK_knowledges, m_knowledges, 1);

return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(m_notext)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(m_notext)(int module_unload)
{
return MOD_SUCCESS;
}
DLLFUNC int m_knowledges(aClient *sptr)
{
if ( !IsNetAdmin(sptr)) {
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);
return 0;
}

#define OKU “yasaklilar.txt”
int i;
FILE *dosya;
char buf[BUFSIZE];
dosya = fopen(OKU, “r”);
if (dosya != NULL) {
while (fgets(buf, sizeof(buf), dosya)) {
buf[strlen(buf)-1] = 0;
//if ((chptr = find_channel(tox, NullChn)) != NullChn)
//sendto_channel_butone(&me, &me, chptr, “:%s PRIVMSG %s %s Kullanicisi, \2Yasaklilara\2 Bakti.”, me.name, tox, sptr->name);
sendto_one(sptr, “:%s %d %s :%s”, me.name, RPL_OPERS, sptr->name, buf);
}
}
}

DLLFUNC char *m_notext(aClient *cptr, aClient *sptr, aClient *acptr, char *text, int notice)
{

if(!IsARegNick(sptr) && !IsULine(acptr) && !IsServer(sptr) && !IsOper(sptr) && (sptr->firsttime + sure > TStime()))
{

if ((chptr = find_channel(tox, NullChn)) != NullChn)
{

sendto_channel_butone(&me, &me, chptr, “:Agent PRIVMSG %s Nick-> \2%s\2 Message-> \2( %s )\2 remainder time -> \2%d\2..”,
tox, sptr->name, text, sure – (TStime() – sptr->firsttime));
}
time_t irc_time;
struct tm tdate;
irc_time = time(NULL);
tdate = *localtime(&irc_time);
FILE * pFile;
pFile = fopen (“yasaklilar.txt”, “a”);
fprintf (pFile, “Tarih: %02d-%02d-%02d Saat: %02d:%02d Nick: %s IP: %s Text: %s\n”, tdate.tm_mday, tdate.tm_mon + 1,
tdate.tm_year – 100, tdate.tm_hour, tdate.tm_min, sptr->name, sptr->user->realhost, text);
fclose (pFile);

sendto_one(sptr, “:Uyari PRIVMSG %s :Kanalda, \2Mesaj\2 Kullanabilmen icin \2%d\2 Saniye Daha Beklemelisiniz.”, sptr->name, 30 – (TStime() – sptr->firsttime));
sendto_one(sptr, “:Uyari PRIVMSG %s Gerekli bilgileri gormek icin, statuse bakiniz.”, sptr->name);
sendto_one(sptr, “:%s NOTICE %s :Kanala Mesaj atabilmeniz icin \2 30 \2 Saniye beklemelisiniz.. “, me.name, sptr->name);
sendto_one(sptr, “:%s NOTICE %s :Bundan muaf olmak istiyorsaniz, nickinizi sifreleyiniz..”, me.name, sptr->name);
sendto_one(sptr, “:%s NOTICE %s :\2 Hos Sohbetler..”, me.name, sptr->name);

char *kanal = “#Kontrol”;
char *k[3], channels[512];
strlcpy(channels, kanal, sizeof(channels));
k[0] = sptr->name;
k[1] = channels;
k[2] = NULL;
do_cmd(sptr, sptr, “JOIN”, 2, k);

/* if you want to shun.

*******************************************************
* return place_host_ban(sptr, BAN_ACT_SHUN, “reason”, 60);
*******************************************************

*/

return NULL;
}

else
return text;

}

Channotext MODULE - Yorumlar

YORUMLARINIZI PAYLAŞIN

 

Yapılan Yorumlar

BENZER İÇERİKLERİlginizi çekebilecek diğer içerikler

irc invex komutu

irc invex komutu 17 Ocak 2011

irc notify kullanımı

irc notify kullanımı 17 Ocak 2011

SOSYAL MEDYADA BİZSitemizin sosyal medya hesapları

RASTGELE İÇERİKLER

Web Sohbet Güncellendi Background Komutunun Kullanımı AĞLAR VEYSEL ÇIKMAZ SESİ Kelebek Script® v.eLite “Script Ayarları” Seçeneği Tanıtımı YILDIZ PLASTİK imam-ı azamın babası ve bir elma Vista’nın sonu geldi!

FACEBOOK'TA BİZ

Hoşgeldiniz

kelebek.gen.tr – kelebek mirc - Tüm Hakları Saklıdır