![]() |
|
|||||||
| Tcl scripting Tcl scripting related questions |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Feb 2007
Age: 16
Posts: 27
Rep Power: 0 ![]() |
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 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"
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]
}
Last edited by UniversaliA; 21-05-2008 at 01:26. |
|
|
|
|
|
#2 (permalink) |
|
Junior Member
Join Date: Aug 2007
Age: 22
Posts: 1
Rep Power: 0 ![]() |
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>"
}
Code:
if {[isbotnick $bnick]} {
Code:
if {$bnick == ""} {
puthelp "NOTICE $nick :USAGE: .dr <nick>"
return 0
}
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|