da merge perfect ms mult de tot AdrianK deci varianta finala ar fi:
Quote:
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 -- $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]" }
}
|
harry potter 7 rules .. da stai ca inca nu la`m vazut =)) , btw cer inchiderea acestui thread