![]() |
|
|||||||
| a&a light script a&a light script support, suggestions & discussions |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#11 (permalink) |
|
Junior Member
Join Date: Jul 2008
Age: 30
Posts: 5
Rep Power: 0 ![]() |
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 Code:
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"}
}
}
Code:
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 }
}
}
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]" |
|
|
|
|
|
#13 (permalink) |
|
Junior Member
Join Date: Feb 2007
Age: 16
Posts: 27
Rep Power: 0 ![]() |
inlocuiesti
Code:
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 |
|
|
|
|
|
#14 (permalink) |
|
Junior Member
Join Date: Jul 2008
Posts: 25
Rep Power: 0 ![]() |
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 :|? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Request Bot | JohnyWalker | #a&a | 29 | 10-06-2004 20:59 |