Pai stai hwk ca tu n-ai inteles ceva, eu vreau sa fac pentru ceea ce am, ca tu mi-ai dat pentru altceva dupa cum vad acolo :|.
antiswearul facut de mine:
pentru dictionar
Code:set say(lang.1.1719) "FAILED: The %r«%% bad word already exists in the channel's swear database" set say(lang.1.1720) "Added %r«%% word in the channel's swear database" set say(lang.1.1721) "USAGE: «antiswear <-add|-rem|-list> -all «" set say(lang.1.1722) "The %r«%% word doesn't exist in the channel's bad words database" set say(lang.1.1723) "Removed all words from channel's bad words database" set say(lang.1.1724) "Removed %r«%% word from channel's bad words database" set say(lang.1.1725) "Channel's bad word list (%r«%%): %b«%%" set say(lang.1.1726) "The word %r«%% %b«%% in the channel's database" set say(lang.1.1727) "FAILED: You already have 6 bad words in the channel's database" set say(lang.1.1730) "FAILED: Channel's badword database is empty"
[/code]
antiswear.tcl
pt anticore.tclCode:a:command -add antiswear pub:antiswear 1721 1721 |n proc pub:antiswear {hand chan args x mix} { global swear set opt [lindex $args 0] set words [lindex $args 1] switch -exact -- $opt { -add { if {[string equal none $words] || $words == ""} {a:usage $x antiswear ; return "Nothing"} elseif { [a:words -number swear $chan] >= 6} {a:tell $x 1727; return "FAILED: maximum reached"} elseif { [a:words -check swear $chan $words]} {a:tell $x 1719 "$words" ; return "FAILE: Word exists"} a:words -add swear $chan $words a:tell $x 1720 "$words" return "ADDED $words" } -del { if {[string equal none $words] || $words == ""} {a:usage $x antiswear ; return "Nothing"} elseif { [string equal -nocase $words -all]} {words -clean swear $chan ; a:tell $x 1723 ; return "$chan -clean"} elseif { ![a:words -check swear $chan $words]} {a:tell $x 1722 "$words"; return "NO SUCH WORD"} a:words -remove swear $chan $words a:tell $x 1724 "$words" return "REMOVED $words" } -list { if {![a:words -number swear $chan]} {a:tell $x 1730; return "NO SWEARS FOR $chan"} a:tell $x 1725 "[a:words -number swear $chan] [a:words -list swear $chan]" return "$opt" } default {a:usage $x antiswear ; return "FAILED: Not all parameters specified"} } }
iar pentru a&a_40_a_stats.tcl urmatoarele linii de codCode:proc a:anti:swear {nick uhost hand chan text args} { global swear username if {![validchan $chan] || ![botisop $chan] || [check:fo:ch $hand $chan $nick]} {return} set text [string tolower $text] set reason "" if {[channel get $chan antiswear]} { if {[string match ****** $text] || [string match ****** $text] || [string match *fuck* $text] || [string match *mata* $text] || [string match ******* $text] || [string match *dick* $text] || [string match *bitch* $text] || [string match *slut* $text] || [string match *whore* $text]} {set reason "channel antiswear protection enabled"} elseif { [a:words -number swear $chan]} { foreach s $swear($chan) {if {[string match *$s* $text]} {set reason "channel antiswear protection enabled"}} } if {$reason != ""} { newchanban $chan [a:maskhost -host $uhost] $username $reason [channel get $chan ban-time] sticky putcmdlog "<<${username}>> antiswear protection -- $chan ${nick}!${uhost}"} else {return}} } proc a:words {cmd opt {chan ""} {c ""}} { global [subst $opt] set chan [string tolower $chan] set c [string tolower $c] set wordstring [join [lrange [array get $opt $chan] 1 end]] switch -exact -- $cmd { -check { if {[string match *$c* $wordstring]} {return 1} {return 0}} -list { return $wordstring} -number { set number 0 ; foreach w $wordstring {incr number} ; return $number} -add { lappend [subst $opt]($chan) $c} -array { return [list array set $opt [array get $opt]]} -remove { regsub -all -nocase -- $c $wordstring "" [subst $opt]($chan)} -clean { catch {unset [subst $opt]($chan)}} default { return 0 } } }
dupa:Code:puts $file "\n#Swears for channels" puts $file "[a:words -array swear]"
Code:puts $file "\n#Disabled local & global commands" puts $file "[a:command -array]"
Pai stai hwk ca tu n-ai inteles ceva, eu vreau sa fac pentru ceea ce am, ca tu mi-ai dat pentru altceva dupa cum vad acolo :|.
inlocuiesti
cuCode:newchanban $chan [a:maskhost -host $uhost] $username "$why" [channel get $chan ban-time] sticky
Code:newchanban $chan [a:maskhost -none $uhost] $username "$why" [channel get $chan ban-time] sticky
Eh...amu vine o alta problema dragii mei, ca atunci cand dau BAN nu da BAN pe 3 zile sau 30 de zile, ci-mi arata BAN-ul setat de la ban-time care l-am pus pe 2 ore:
[00:13] <@Zappu> .ban *!*@89.136.137.88 30d OP OFENCE!
[00:13] * andreea_deea_love2001 was kicked by Bot (Banned: (by Zappu/Zappu) [120m] 30d OP OFENCE!)
Crezi ca la asta ma poti ajuta sa-l pot face sa dea si BAN ca lumea :|?
la scriptul lui hwk nu-mi executa banul eggdropul , de ce ? si imi da si
ok , am facut ce-am facut , nu imi da eroare . dar e aceeasi chestie nu executa ban-ul .Code:[20:10] <(Artemis> [17:10] <<xlmpq>> xlmpq!steaua@xlmpq.users.undernet.org #testing SWEAR invalid command name "pub:antiswear"
si cand scrie cineva **** , nu da banCode:[23:09] <@xlmpq> !antiswear -add **** [23:09] <@Orez> xlmpq Added **** word in the channel's swear database
Asta trebuie adaugat in binds ca sa fie scriptul perfect . thanks _madalin_Code:bind pubm -|- * a:anti:swear
o alta problema la antiswear-ul lui hwk. DA BAN LA ORICE Cuvant scris din partea unui non @ daca este +antiswear
Last edited by UniversaliA; 30-08-2009 at 22:41. Reason: am unit ultimele toate posturile in unul singur
Arata scriptul final, modificat de tine (daca mai ai nevoie de raspuns).
gata , am modificat ceva pe acolo , am scossi am lasat doar alea cu f-ck , etc etc etcCode:string match ****** $text] |... am adaugat bind-ul si merge bine acuma .
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks