Guest User

Untitled

a guest
Dec 5th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.40 KB | None | 0 0
  1. namespace eval ::autov {
  2. setudef flag VV
  3.  
  4. # Ici on mets le temp en seconde pour que le bot voice.
  5. variable voicejoin 10
  6.  
  7. proc ::autov::verif {nick chan} {
  8.         putserv "mode $chan +v $nick"
  9. }
  10.  
  11. bind pub o "!von" [namespace current]::von
  12. proc von { nick host hand chan arg } {
  13.     if {[channel get $chan VV] == 0} {
  14.          channel set $chan +VV
  15.          putquick "PRIVMSG $chan :Auto-Voice Activé !"
  16.          foreach von [chanlist $chan] { if [isop $von $chan] continue; pushmode $chan +v $von }
  17.     } else {
  18.          putquick "PRIVMSG $chan :Auto-Voice déjà Activé !"
  19.     }
  20. }
  21.  
  22. bind pub o "!voff" [namespace current]::voff
  23. proc voff { nick host hand chan arg } {
  24.     if {[channel get $chan VV] != 0} {
  25.          channel set $chan -VV
  26.          putquick "PRIVMSG $chan :Auto-Voice Désactivé !"
  27.          foreach voff [chanlist $chan] { if [isop $voff $chan] continue; pushmode $chan -v $voff }
  28.     } else {
  29.          putquick "PRIVMSG $chan :Auto-Voice déjà Désactivé !"
  30.     }
  31. }
  32.  
  33. bind join - "*" [namespace current]::autovoice
  34. proc autovoice { nick uhost handle args } {
  35. set chan [lindex $args 0]
  36. if {[channel get $chan VV]==0} { return; }
  37.       puthelp "NOTICE $nick :> Le mode voice (+v) vous sera attribué dans quelques secondes, en attendant le silence vous est imposé, merci de bien vouloir patienter."
  38.       utimer $autov::voicejoin [list ::autov::verif $nick $chan]
  39.     }
  40. }
Add Comment
Please, Sign In to add comment