autovoice
#1
Bonjour,

On ma demander un autovoice activable sur salon
Donc qui nécessite pas de mettre #salon dans un (set salon blabla "#chan")

Alors je le mets ici des fois qu'il pourrait être utile à des personnes qui cherchent ce type de code.

PS : sur salon pour l'activé suffit de tapez : !von
Pour le désactivé tapez : !voff

Voici le code :

tcl
namespace eval ::autov {
setudef flag VV
 
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 chan } {
if {[channel get $chan VV]==0} { return; }
      pushmode $chan +v $nick
    }
}


Répondre Avertir


Messages dans ce sujet
autovoice - par aliasangelius - 24/05/2011, 18:04
RE: autovoice - par CrazyCat - 25/05/2011, 10:09
RE: autovoice - par aliasangelius - 25/05/2011, 15:48
RE: autovoice - par djkenny - 01/06/2011, 06:36
RE: autovoice - par aliasangelius - 20/09/2011, 16:54

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté