botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 09-09-2007, 14:41   #1 (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 dr.tcl

Am si eu dr.tcl a lu edu si imi da o eroare cand dau simplu .dr , ar trebui sa zica USAGE: .dr <nick> ..... dar imi da eroarea:
Code:
[13:37:18] <(TheBest-> [10:31] Tcl error [pub:dr]: can't read "mask": no such variable
[13:37:25] <aNormaLu-> .set errorInfo
Code:
[13:37:25] <(TheBest-> [10:31] #aNormaLu# set errorInfo
[13:37:25] <(TheBest-> Currently: can't read "mask": no such variable
[13:37:25] <(TheBest-> Currently:     while executing
[13:37:25] <(TheBest-> Currently: "if {$mask == ""} {
[13:37:25] <(TheBest-> Currently:       	puthelp "NOTICE $nick :USAGE: .dr <nick>"
[13:37:25] <(TheBest-> Currently:     	}"
[13:37:25] <(TheBest-> Currently:     (procedure "pub:dr" line 15)
[13:37:25] <(TheBest-> Currently:     invoked from within
[13:37:25] <(TheBest-> Currently: "pub:dr $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
TCLul este urmatorul:
Code:
proc pub:dr {nick host hand chan text} {
  	global botnick edu
  	set bnick [lindex [split $text] 0]
  	if {[isbotnick $bnick]} {
   	 	putquick "NOTICE $nick :$edu(dontban)"
    		return 0
  	}
  	if {![botisop $chan]} {
    		putquick "NOTICE $nick :$edu(noop)"
    		return 0
  	}
  	if {[onchan $bnick $chan] || [channel get $chan tools] } {
    		set mask *!*@[lindex [split [getchanhost $bnick $chan] "@"] 1] 
	}
    	if {$mask == ""} {
      	puthelp "NOTICE $nick :USAGE: .dr <nick>"
    	}
    	newchanban $chan $mask $hand $edu(dr) [expr $edu(drtime) * 60]
}
ma puteti ajuta ?! k nu`i dau d cap

Last edited by UniversaliA; 21-05-2008 at 01:26.
Normal is offline   Reply With Quote
Old 09-09-2007, 18:53   #2 (permalink)
Junior Member
 
Join Date: Aug 2007
Age: 22
Posts: 1
Rep Power: 0
EvaLuaTe is an unknown quantity at this point
Default

Pentru ca scriptul sa dea reply-ul acela cand dai .dr simplu, va trebui sa faci urmatoarele:
stergi chestia asta:
Code:
    	if {$mask == ""} {
      	puthelp "NOTICE $nick :USAGE: .dr <nick>"
    	}
si inainte de linia asta:
Code:
  	if {[isbotnick $bnick]} {
adaugi codul acesta:
Code:
if {$bnick == ""} {
puthelp "NOTICE $nick :USAGE: .dr <nick>"
return 0
}
si atunci ar trebui sa functioneze.
EvaLuaTe 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


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


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