Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


[Résolu] Badreal channel
#1
Bonjour!

J'ai trouvé sur le net un tcl de "Badreal" d’après la configuration il faut crée un fichier nommé "badfullname.txt" sous cette forme:

#Salon *badword1* *badword2* etc...
Ce que j'ai fait... mais le script ne réagit pas aucuns Kick/Ban.
Savez -vous de quoi peut venir l'erreur ?


tcl
#Put the TCL rehash, then edit badfullname.txt from the main directory
#put in the text file like that :
# #channel1 *word1* *word2*..
# #channel2 *word3 *word4..
#And then rehash.
#You can put as many channels and words as you want.
#
 
set bad(reason) "Votre situation ne vous autorise pas à entré sur ce salon!"
 
#Here you can set the time for the ban (minutes)
 
set bad(time) "20"
 
#Here you can set the flags that are excepted
 
set bad(flags) "o|o"
 
 
setudef flag badfullname
set Autor "BLaCkShaDoW"
set vers "1.1"
 
if {[file exists badfullname.txt] == 0} {
set afile [open badfullname.txt a]
close $afile
}
 
bind join -|- "* *" badrealname
 
proc badrealname {nickname hostname handle channel} {
global botnick
set dir "badfullname.txt"
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
set file [open $dir "r"]
set data [read -nonewline $file]
close $file
if {$data == ""} { return 0 }
set split [split $data "\n"]
foreach line $split {
set chanentry [lindex [split $line] 0]
if {[string match -nocase $channel $chanentry]} {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}
}
 
proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set dir "badfullname.txt"
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
set file [open $dir "r"]
set data [read -nonewline $file]
close $file
if {$data == ""} { return 0 }
set split [split $data "\n"]
foreach line $split {
set chanentry [lindex [split $line] 0]
if {[string match -nocase $channel $chanentry]} {
set fullnameentry [lrange [split $line] 1 end]
  foreach realname [string tolower $fullnameentry] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time)]
}
}
}
}
unbind RAW - 311 badfullnames
}
 
putlog "Bad Fullname $vers by $Autor Loaded !"


Merci de votre aide
Cordialement,
BlueIRC.fr - Serveur de t'Chat IRC Wink
http://www.BlueIRC.fr


Messages In This Thread
[Résolu] Badreal channel - by IluZi0n - 11/05/2012, 20:13

Possibly Related Threads…
Thread Author Replies Views Last Post
  eggdrop ne réagis pas au channel spoks 20 9,387 03/04/2011, 10:44
Last Post: aliasangelius

Forum Jump:


Users browsing this thread: 1 Guest(s)