# reglage de toute la tcl
source "[file dirname [info script]]/dav.conf"
########################
### ###
### AuToVoIcE ###
### ###
### ours_en_pluche ###
### ours_en_pluche@hotmail.fr ###
### ###
########################
#########
# reglages
#########
putlog "autovoice par ours_en_pluche v1.0"
##############
# fin des reglages
##############
#######
# bind
#######
bind join - * autovoice
bind pub m-m !avactif pub_avactif
bind pub m-m !avhelp pub_avhelp
############
# fin des binds
############
#######
# proc
#######
proc pub_avhelp {
global autovoiceactif
putserv "notice $nick : hello $nick, bienvenue dans l'help de l autovoice"
putserv "notice $nick : les divers reglages sont : "
putserv "notice $nick : 1 pour actif, 0 pour inactif "
putserv "notice $nick : pour changer l état tape !avactif"
putserv "notice $nick : le reglage actuel de l autovoice est de $autovoiceactif"
}
proc pub_avactif {
global autovoiceactif
# verification de l état de autovoiceactif
if { $autovoiceactif == "1" } {
# inversion d état
set autovoiceactif "0"
}
# verification de l état de autovoiceactif
if { $autovoiceactif == "0" } {
# inversion d état
set autovoiceactif "1"
}
}
proc autovoice {nick uhost hand chan} {
global autovoicechannel autovoiceactif
# vérification que la fonction est active
if { $autovoiceactif == "1"} {
# si le bot est op et si la liste des chans est vide
if {$autovoicechannel == "" && [botisop $chan]} {
# mettre le grade voice
putserv "mode $chan +v $nick"
# arreter le script
return 0
}
# verification que le chan est dans la liste des chans autovoicé
foreach channellist [$autovoicechannel] {
# si le chan est bien dans la liste, et si le bot est bien op
if {$channellist == $autovoicechannel && [botisop $chan]} {
# mettre le grade voice
putserv "mode $chan +v $nick"
# arreter le script
return 0
}
}
}
}
# fin des procs
##############
### ###
### AuToVoIcE ###
### ###
### fin ###
### ###
##############
########################
### ###
### WeLcOmE ###
### ###
### ours_en_pluche ###
### ours_en_pluche@hotmail.fr ###
### ###
########################
#########
# reglages
#########
putlog "welcome par ours_en_pluche v1.0"
##############
# fin des reglages
##############
#######
# bind
#######
bind join - * welcomeproc
bind pub m-m !wactif pub_wactif
bind pub m-m !wchannel pub_wchannel
bind pub m-m !wtype pub_wtype
bind pub m-m !wmess pub_wmess
bind pub m-m !whelp pub_whelp
############
# fin des binds
############
#######
# proc
#######
proc pub_whelp {
global welcomechannel welcomeactif welcometype welcomemess
# envoie en notice l help
putserv "notice $nick : hello $nick, bienvenue dans l'help de l autovoice"
putserv "notice $nick : les divers reglages sont : "
putserv "notice $nick : 1 pour actif, 0 pour inactif état actuel : $welcomeactif trigger !wactif"
putserv "notice $nick : les channels : $welcomechannel trigger !wchannel <channel>"
putserv "notice $nick : rien pour aucun chan \/ pour tout ou liste des chans"
putserv "notice $nick : 1 pour notice 0 pour message état actuel : $welcometype trigger !wtype"
putserv "notice $nick : message actuel $welcomemess trigger !wmess <message>"
}
proc pub_wactif {
global welcomeactif
# verification de l état de autovoiceactif
if { $welcomeactif == "1" } {
# inversion d état
set welcomeactif "0"
}
# verification de l état de autovoiceactif
if { $welcomeactif == "0" } {
# inversion d état
set welcomeactif "1"
}
}
proc pub_wchannel {
set arg [charfilter $arg]
set welcomechannel "$arg"
}
proc pub_wtype {
global welcometype
# verification de l état de autovoiceactif
if { $welcometype == "1" } {
# inversion d état
set welcometype "0"
}
# verification de l état de autovoiceactif
if { $welcometype == "0" } {
# inversion d état
set welcometype "1"
}
}
proc pub_wmess {
set arg [charfilter $arg]
set welcomemess "$arg"
}
proc welcomeproc {nick uhost hand chan} {
global welcomechannel welcomeactif welcometype welcomemess
# vérification que la fonction est active
if { $welcomeactif == "1"} {
# si la liste des chans est vide
if {$welcomechannel == "\/" } {
# si le type de mess est notice
if {$ welcometype == "1" } {
# envoi du mess en notice
putserv "notice $nick : $welcomemess "
} else {
# envoi du mess en message sur le chan
putserv "privmsg $chan : $nick , $welcomemess "
}
# arreter le script
return 0
}
# verification que le chan est dans la liste des chans autovoicé
foreach channellist [$welcomechannel] {
# si le chan est bien dans la liste
if {$channellist == $welcomechannel} {
# si le type de mess est notice
if {$ welcometype == "1" } {
# envoi du mess en notice
putserv "notice $nick : $welcomemess "
} else {
# envoi du mess en message sur le chan
putserv "privmsg $chan : $nick , $welcomemess "
}
# arreter le script
return 0
}
}
}
}
########################
### ###
### AuToVoIcE ###
### ###
### ours_en_pluche ###
### ours_en_pluche@hotmail.fr ###
### ###
########################
#########
# reglages
#########
# pour activer l autovoice
# mettre à 1
# sinon mettre à 0
set $autovoiceactif "1"
# sur quel chan
# "" pour tout
# "#chan1 #chan2"
set autovoicechannel ""
##############
# fin des reglages
##############
##############
### ###
### AuToVoIcE ###
### ###
### fin ###
### ###
##############
########################
### ###
### WeLcOmE ###
### ###
### ours_en_pluche ###
### ours_en_pluche@hotmail.fr ###
### ###
########################
#########
# reglages
#########
# pour activer le welcome
# mettre à 1
# sinon mettre à 0
set $welcomeactif "1"
# sur quel chan
# "" pour rien
# "\/" pour tout
# "#chan1 #chan2"
set welcomechannel ""
# format des messages
# 1 en notice
# 0 en message sur le chan
set welcometype "1"
# message a envoyer
set welcomemess "bienvenue ici (^_^), respecte els gens, et il te respecteront"
##############
# fin des reglages
##############