botlending forum  

Go Back   botlending forum > Eggdrop & TCL > a&a light script

a&a light script a&a light script support, suggestions & discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 28-07-2008, 02:30   #11 (permalink)
hwk
Junior Member
 
Join Date: Jul 2008
Age: 30
Posts: 5
Rep Power: 0
hwk is an unknown quantity at this point
Post my antiswear

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"}
			}
}
pt anticore.tcl

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 }
}
}
iar pentru a&a_40_a_stats.tcl urmatoarele linii de cod

Code:
	            puts $file "\n#Swears for channels"
	            puts $file "[a:words -array swear]"
dupa:

Code:
			puts $file "\n#Disabled local & global commands"
			puts $file "[a:command -array]"
hwk is offline   Reply With Quote
Old 28-07-2008, 02:45   #12 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 25
Rep Power: 0
zappu is an unknown quantity at this point
Default

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 :|.
zappu is offline   Reply With Quote
Old 28-07-2008, 13:56   #13 (permalink)
Junior Member
 
Normal's Avatar
 
Join Date: Feb 2007
Age: 16
Posts: 27
Rep Power: 0
Normal is an unknown quantity at this point
Default

inlocuiesti
Code:
newchanban $chan [a:maskhost -host $uhost] $username "$why" [channel get $chan ban-time] sticky
cu
Code:
newchanban $chan [a:maskhost -none $uhost] $username "$why" [channel get $chan ban-time] sticky
Normal is offline   Reply With Quote
Old 29-07-2008, 01:28   #14 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 25
Rep Power: 0
zappu is an unknown quantity at this point
Default

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 :|?
zappu is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request Bot JohnyWalker #a&a 29 10-06-2004 20:59


All times are GMT +3. The time now is 14:39.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.