![]() |
|
|||||||
| Tcl scripting Tcl scripting related questions |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#13 (permalink) |
|
Junior Member
|
ok, cum zici tu
![]() #### EDIT #### oricum, sincer sa fiu, da niste errori, daca fac cum zic eu .. si sunt sigur 100% ca trebuie sa declari global settings, ca sa iti mearga $settings(silence), dar oricum primesc erroarea asta Code:
[ 22:06:00 ] [ mybotnick ] [20:06] Tcl error [s:silence]: invalid command name "0" [ 22:06:02 ] [ mybotnick ] [20:06] Tcl error [s:silence]: invalid command name "0" Code:
[ 22:08:30 ] [ mybotnick ] [20:08] Tcl error [s:silence]: can't read "settings(silence)": no such variable
Last edited by ReaL|DoG; 18-07-2007 at 00:10. Reason: am completat cu niste argumente :) |
|
|
|
|
|
#14 (permalink) |
|
TCB & Ratings projects Member, #Mythic representative
|
nu va mai certati atata, lasati off topicul si daca tot postati, postati scripte corecte.
Code:
bind pub N !silence pub:silence
proc pub:silence {nick host hand chan txt} {
global silenced
set opt1 [lindex $txt 0]
set opt2 [lindex $txt 1]
switch -exact $opt1 {
-on {if {[info exists silenced]} { puthelp "PRIVMSG $chan :Silence is already on."; return }
putserv "SILENCE +*"
set silenced 1
puthelp "PRIVMSG $chan :Silence is now on"
}
-off {if {![info exists silenced]} { puthelp "PRIVMSG $chan :Silence is already off."; return }
putserv "SILENCE -*"
unset silenced
puthelp "PRIVMSG $chan :Silence is now off"
}
-host {if {![string match "+*!*@*" $opt2] || ![string match "-*!*@*" $opt2]} { puthelp "PRIVMSG $chan :Invalid host: $opt2"; return }
putserv "SILENCE $opt2
puthelp "PRIVMSG $chan :Added silence for host: $opt2"
}
default { puthelp "PRIVMSG $chan :USAGE: !silence <-on|-off|-host> [+/-host]" }
}
__________________
Fuck oFF! |
|
|
|
|
|
#15 (permalink) | |
|
Junior Member
Join Date: Mar 2006
Location: Somewhere
Posts: 14
Rep Power: 0 ![]() |
-on -off -host , nu merg..imi da asa la debug..
Quote:
|
|
|
|
|
|
|
#17 (permalink) | |
|
Junior Member
Join Date: Mar 2006
Location: Somewhere
Posts: 14
Rep Power: 0 ![]() |
da merge perfect ms mult de tot AdrianK deci varianta finala ar fi:
Quote:
|
|
|
|
|