IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  vaybe sohbet

>
+
Etiketlenen Kullanıcılar

 
 
LinkBack Seçenekler Stil
Prev önceki Mesaj   sonraki Mesaj Next
Alt 26 Aralık 2010, 15:10   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Kanal/Ozel sureli mesaj yasaklama.




İlk halindeki bilgiler;

Alıntı:
static int sure = 60;



süreyi buradan değişebilirsiniz. Kullanici giriş yaptiktan 60 saniye önce kanala veya özele 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.


Ve modulun suanki bilgileri;

Ozel ve Kanali tek modulde birleştirdim. Yani kanal ve özel icin tek bir modulde tek bir koruma olucak.
Bunlar disinda kanala veya özele yazilan yazilar belirlenen süre cercevesince engellenecek.
Birbaska olarakta, kullanici bu süre çerçevesi içerisinde /KALAN komutunu kullanarak mesaj yazmak icin ne kadar süresi kaldiğini öğrenebilecek..

Alıntı:
#define tox "#BotKontrol"

Buraya o anlardaki yazilan yazilar loglanir. Log kanalidir isterseniz buradan değiştirebilirsiniz.

Alıntı:
#define SUNUCU "toXic.NET"

Buraya kendi sunucunuzun adini yaziniz.


Kod:   Kodu kopyalamak için üzerine çift tıklayın!
/* *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 <time.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef _WIN32 #include <io.h> #endif #include <fcntl.h> #include "h.h" #ifdef STRIPBADWORDS #include "badwords.h" #endif #ifdef _WIN32 #include "version.h" #endif aChannel *chptr; #define tox "#BotKontrol" #define SUNUCU "toXic.NET" #define RPL_OPERS 337 #define MSG_knowledges "knowledges" #define TOK_knowledges "BL" #define MSG_kalan "kalan" #define TOK_kalan "KL" DLLFUNC char *m_notext(aClient *, aClient *, aClient *, char *, int); DLLFUNC char *m_noptext(aClient *, aClient *, aClient *, char *, int); DLLFUNC int m_knowledges(aClient *sptr); DLLFUNC int m_kalan(aClient *sptr); //seconds static int sure = 60; #define modulismi "m_notext" #define aciklama "Forbiddin text to channels/private 1 min. v3 (toXic)" #define aciklama2 "Forbiddin text to channels/private 1 min. v3(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); add_Command(MSG_kalan, TOK_kalan, m_kalan, 1); HookAddPCharEx(modinfo->handle, HOOKTYPE_USERMSG, m_noptext); 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 NOTICE %s :Kanalda, \2Mesaj\2 Kullanabilmen icin \2%d\2 Saniye Daha Beklemelisiniz.", sptr->name, sure - (TStime() - sptr->firsttime)); sendto_one(sptr, ":%s PRIVMSG %s :Kanala Mesaj atabilmeniz icin \2 bir sure \2 beklemelisiniz.. ", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :Bundan muaf olmak istiyorsaniz, nickinizi \2/ns register sifre email\2 komutu ile sifreleyiniz..", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :Kalan surenize gormek icin, \2/Kalan\2 yaziniz.", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :\2 Hos Sohbetler..", SUNUCU, 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; } DLLFUNC char *m_noptext(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)); } sendto_one(sptr, ":Uyari NOTICE %s :Ozelde, \2Mesaj\2 Kullanabilmen icin \2%d\2 Saniye Daha Beklemelisiniz.", sptr->name, sure - (TStime() - sptr->firsttime)); sendto_one(sptr, ":%s PRIVMSG %s :Ozele Mesaj atabilmeniz icin \2 bir sure \2 beklemelisiniz.. ", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :Bundan muaf olmak istiyorsaniz, nickinizi \2 /NS Register sifre email\2 komutu ile sifreleyiniz..", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :Mesaj yazmak icin kac saniyeniz kaldigini gormek istiyorsaniz, \2/Kalan\2 yaziniz.", SUNUCU, sptr->name); sendto_one(sptr, ":%s PRIVMSG %s :\2 Hos Sohbetler..", SUNUCU, 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); return NULL; } else return text; } DLLFUNC int m_kalan(aClient *sptr) { aClient *acptr; if(!IsARegNick(sptr) && !IsULine(acptr) && !IsServer(sptr) && !IsOper(sptr) && (sptr->firsttime + sure > TStime())) { sendto_one(sptr, ":Uyari PRIVMSG %s Kalan sureniz \2%d\2 saniyedir.", sptr->name, sure - (TStime() - sptr->firsttime)); sendto_one(sptr, ":Uyari PRIVMSG %s Bu sureden sonra mesaj yazabileceksiniz.", sptr->name); } else { sendto_one(sptr, ":Uyari PRIVMSG %s Mesaj yazabilirsiniz.", sptr->name); } }



Konu toXic tarafından (26 Aralık 2010 Saat 19:14 ) değiştirilmiştir.
 
Alıntı ile Cevapla

 

Etiketler
kánal or ozel, mesaj, sureli, yasaklama


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Çözüldü Kanala girene ozel mesaj yollama Unknown58 mIRC Scripting Sorunları 10 09 Şubat 2024 18:55
Güncel Belirtilen mesaj ozel kapatma Joop mIRC Scripting Sorunları 5 14 Ağustos 2021 17:57
ozel sesli mesaj Byzor mIRC Scripting Sorunları 2 21 Ağustos 2015 21:41
Ozel Kanal Basvuru Sistemi v2 :p ¿ Eggdrop, NeoStats, BNC 2 31 Ağustos 2013 22:20
Onlîne Kánal/Ozel log'u? SuNSeT mIRC Scripting Sorunları 10 07 Ocak 2008 16:10