Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: [Request script] antiswear

  1. #11
    Junior Member
    Join Date
    Jul 2008
    Age
    39
    Posts
    5
    Rep Power
    0

    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]"

  2. #12
    Junior Member
    Join Date
    Jul 2008
    Posts
    24
    Rep Power
    0

    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 :|.

  3. #13
    Junior Member aNormaLu's Avatar
    Join Date
    Feb 2007
    Location
    BANAT, Capitala: TIMISOARA
    Age
    25
    Posts
    37
    Rep Power
    0

    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

  4. #14
    Junior Member
    Join Date
    Jul 2008
    Posts
    24
    Rep Power
    0

    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 :|?

  5. #15
    Junior Member
    Join Date
    Jun 2007
    Posts
    41
    Rep Power
    0

    Default

    la scriptul lui hwk nu-mi executa banul eggdropul , de ce ? si imi da si

    Code:
    [20:10] <(Artemis> [17:10] <<xlmpq>> xlmpq!steaua@xlmpq.users.undernet.org #testing SWEAR invalid command name "pub:antiswear"
    ok , am facut ce-am facut , nu imi da eroare . dar e aceeasi chestie nu executa ban-ul .

    Code:
    [23:09] <@xlmpq> !antiswear -add ****
    [23:09] <@Orez> xlmpq Added **** word in the channel's swear database
    si cand scrie cineva **** , nu da ban

    Code:
    bind pubm -|- * a:anti:swear
    Asta trebuie adaugat in binds ca sa fie scriptul perfect . thanks _madalin_

    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

  6. #16
    Administrator

    aka aqwzsx

    Join Date
    Jun 2004
    Posts
    853
    Blog Entries
    130
    Rep Power
    3

    Default

    Arata scriptul final, modificat de tine (daca mai ai nevoie de raspuns).

  7. #17
    Junior Member
    Join Date
    Jun 2007
    Posts
    41
    Rep Power
    0

    Default

    gata , am modificat ceva pe acolo , am scos
    Code:
    string match ****** $text] |
    si am lasat doar alea cu f-ck , etc etc etc ... am adaugat bind-ul si merge bine acuma .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Modify script] antiswear problem
    By xlmpq in forum Tcl scripting
    Replies: 3
    Last Post: 17-08-2009, 23:08
  2. Request Bot
    By JohnyWalker in forum #a&a
    Replies: 29
    Last Post: 10-06-2004, 20:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •