botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 02-09-2008, 16:28   #1 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 26
Rep Power: 0
zappu is an unknown quantity at this point
Question Spam Script

Salutare! As avea si eu o problema, legat despre acest script, problema ar fi ca eu atunci cand dau pe canal .spam nick merge, dar daca dau .spam *!ident@host nu mai merge imi da eroarea urmatoare: Tcl error [pub:spam]: can't read "mask": no such variable . Poate-mi spuneti voi cam ce nu este corect aici de-mi da asa.

proc pub:spam {nickname hostname handle channel text} {
global botnick edu
set bnick [lindex [split $text] 0]
if {[isbotnick $bnick]} {
putquick "NOTICE $nickname :$edu(dontban)"
return 0
}
if {![botisop $channel]} {
putquick "NOTICE $nickname :$edu(noop)"
return 0
}
if {[onchan $bnick $channel]} {
set mask *!*@[lindex [split [getchanhost $bnick $channel] "@"] 1]
}
if {$mask == ""} {
putquick "NOTICE $nickname :SYNTAX: spam <nick>"
return 0
}
if {![onchan $bnick $channel]} {
set mask [lindex $text 1]
}

newchanban $channel $mask $handle $edu(spam) [expr $edu(spamtime) * 60]
putserv "MODE $channel +b $mask"
putserv "KICK $channel $bnick :$edu(spam)"
putquick "PRIVMSG #canal :$nickname banned $mask for 14 days (spamming without our consent)"
}
zappu is offline   Reply With Quote
Old 02-09-2008, 16:45   #2 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 218
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

inlocuieste asta:
Code:
if {$mask == ""} {
cu asta:
Code:
 if {!$mask} {
__________________
Fuck oFF!
arcade is offline   Reply With Quote
Old 02-09-2008, 16:56   #3 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 26
Rep Power: 0
zappu is an unknown quantity at this point
Question

Este o problema ca am modificat la ceea ce mi-ai scris tu s-amu imi da cand dau: [15:55] <Zale> .spam *!*@87.3.4.5 , imi da acelasi lucru: Tcl error [pub:spam]: can't read "mask": no such variable , ce poate fi?
zappu is offline   Reply With Quote
Old 07-09-2008, 01:55   #4 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 38
lsn will become famous soon enough
Default

Code:
proc pub:spam {nickname hostname handle channel text} {
         global botnick edu
         set bnick [lindex [split $text] 0]
         if {[isbotnick $bnick]} {
                putquick "NOTICE $nickname :$edu(dontban)"
                return 0
         }
         if {![botisop $channel]} {
                putquick "NOTICE $nickname :$edu(noop)"
                return 0
         }
        if {[onchan $bnick $channel]} {
                set mask *!*@[lindex [split [getchanhost $bnick $channel] "@"] 1] 
       } else { set mask $bnick }
           if {![llength $mask]} {
              putquick "NOTICE $nickname :SYNTAX: spam <nick>"
            return 0
          }
    
  
       newchanban $channel $mask $handle $edu(spam) [expr $edu(spamtime) * 60]
       putserv "MODE $channel +b $mask"
       putserv "KICK $channel $bnick :$edu(spam)"
       putquick "PRIVMSG #canal :$nickname banned $mask for 14 days (spamming without our consent)"
}
__________________
RESTRICTED AREA
lsn is offline   Reply With Quote
Old 07-09-2008, 11:39   #5 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 26
Rep Power: 0
zappu is an unknown quantity at this point
Thumbs up

Mersi mult pentru corectare, asta a mers perfect .
zappu is offline   Reply With Quote
Old 07-09-2008, 12:53   #6 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 26
Rep Power: 0
zappu is an unknown quantity at this point
Question

Gata l-am facut, merg amandoua amu .
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
Anti Drone Spam Script arcade Tcl scripting 16 13-09-2006 18:38


All times are GMT +3. The time now is 07:16.


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