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]" }
}
ar trebui sa functioneze perfect, also am adaugat si posibilitatea de a adauga/scoate silence numai la anumite hosturi cu comanda !silence -host +/-host. Exemplu: !silence -host +*!*@arcadel.users.undernet.org