Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace eval ::autov {
- setudef flag VV
- # Ici on mets le temp en seconde pour que le bot voice.
- variable voicejoin 10
- #Ici ont mets le message de join ceci et en forme de /me
- variable msgme "Le mode voice (+v) vous sera attribué dans quelques secondes, en attendant le silence vous est imposé, merci de bien vouloir patienter."
- proc ::autov::verif {nick chan} {
- putserv "mode $chan +v $nick"
- }
- bind pub o "!von" [namespace current]::von
- proc von { nick host hand chan arg } {
- if {[channel get $chan VV] == 0} {
- channel set $chan +VV
- putquick "PRIVMSG $chan :Auto-Voice Activé !"
- foreach von [chanlist $chan] { if [isop $von $chan] continue; pushmode $chan +v $von }
- } else {
- putquick "PRIVMSG $chan :Auto-Voice déjà Activé !"
- }
- }
- bind pub o "!voff" [namespace current]::voff
- proc voff { nick host hand chan arg } {
- if {[channel get $chan VV] != 0} {
- channel set $chan -VV
- putquick "PRIVMSG $chan :Auto-Voice Désactivé !"
- foreach voff [chanlist $chan] { if [isop $voff $chan] continue; pushmode $chan -v $voff }
- } else {
- putquick "PRIVMSG $chan :Auto-Voice déjà Désactivé !"
- }
- }
- bind join - "*" [namespace current]::autovoice
- proc autovoice { nick uhost handle args } {
- set chan [lindex $args 0]
- if {[channel get $chan VV]==0} { return; }
- puthelp "PRIVMSG $chan :\001ACTION $autov::msgme\001"
- utimer $autov::voicejoin [list ::autov::verif $nick $chan]
- }
- }
Add Comment
Please, Sign In to add comment