Thread: [Request script] Silence On/Off
View Single Post
Old 21-07-2007, 14:39   #14 (permalink)
arcade
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 218
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

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
__________________
Fuck oFF!
arcade is offline   Reply With Quote