i have a public command script who use the format cmd char ( !) then the command like !op !deop etc..
i`d like to replace the command char wich is ! for the botnick so instead of typing !op on a channel, i`d type botnick op
here`s the code
Code: Select all
###########################################################
# #
# #### #### ### #### #### ## # ##### ### #### # #
# # # # # # # # # # # # # # # # # # #
# # ## # # # # # # # # # # # ## # # # #
# #### #### ### #### #### # ## # # # #### #### #
# #
###########################################################
# Ce TCL est entièrement fait par oUr0sTucK et il est #
# fait pour tout faire (le TCL la) :) #
###########################################################
#################
# Configuration #
#################
# Votre channel principale
set god(home) "#loving #poetes #pitchat"
# Choisissez le caractere devant les commandes Ex.: ! @ ? $
set god(prefix) "!"
# Message de bienvenue aux joins (par défault) ? OUI ou NON
set god(welcome) "NON"
set god(welcome.text) "Bienvenue sur #loving amusez-vous bien dans notre canal :-)"
# PS: Si vous mettez la commande [userlist |n $chan] dans le texte, il dira les owners du chan.
# Détecteur de clone ? OUI ou NON
set god(clonedetect) "NON"
############
# Services #
############
# Est-ce que votre eggdrop est pour un service (Ex.: EggRawz Service) ? OUI ou NON
set god(service) "NON"
set god(service.chan) "#Channel"
# Voulez-vous un message spécial lorsque quelqu'un join votre channel ? OUI ou NON
set god(service.welcome) "NON"
set god(service.welcome.text) "Vous venez d`entrer dans un canal privé A vos risques et perils !!! :-)"
# Mentionner lorsque le eggdrop est opé ou déopé ? OUI ou NON
set god(service.opdeop) "NON"
###################################
# Commandes #
# recommendé de pas toucher #
# Risque: faire planté le eggdrop #
###################################
### Op, Deop, Voice, Devoice, Kick, Ban, Unban, Topic, Addowner, Addmaster,
### Addop, Addvoice, Addauto-op, Delauto-op, Deluser, Delowner, Delmaster, Delop,
### Delvoice, Join, Cycle, Remove, Mode, Addbot, Delbot, Help, List.
# Op #
bind pub o|o [string trim $god(prefix)]op pub_op
proc pub_op {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 1} {
return 0
}
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {![botisop $chan]} {
puthelp "NOTICE $nick :Euh j'ai tu l'air d'un dieu ?"
return 0
}
if {[lindex $text 0]!=""} {
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
pushmode $chan +o [lindex $text 0]
return 0
}
pushmode $chan +o $nick
}
# Deop #
bind pub o|o [string trim $god(prefix)]deop pub_deop
proc pub_deop {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
putserv "KICK $chan $nick Oups... me suis tromper :P"
return 0
}
if {[lindex $text 0]!=""} {
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
pushmode $chan -o [lindex $text 0]
return 0
}
pushmode $chan -o $nick
}
# Voice #
bind pub o|o [string trim $god(prefix)]voice pub_voice
proc pub_voice {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]!=""} {
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
pushmode $chan -o [lindex $text 0]
pushmode $chan +v [lindex $text 0]
return 0
}
pushmode $chan -o $nick
pushmode $chan +v $nick
}
# Devoice #
bind pub o|o [string trim $god(prefix)]devoice pub_devoice
proc pub_devoice {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]!=""} {
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
pushmode $chan -v [lindex $text 0]
return 0
}
pushmode $chan -v $nick
}
# Kick #
bind pub o|o [string trim $god(prefix)]kick pub_kick
proc pub_kick {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
putserv "KICK $chan $nick Oups... me suis tromper :P"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]kick <nick> \[message\]"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 0]!=""} {
if {[matchattr [lindex $text 0] |m $chan] == 0} {
putserv "kick $chan [lindex $text 0] [lrange $text 1 end]"
return 0
}
if {[matchattr [lindex $text 0] |m $chan] == 1} {
if {[matchattr $hand |m $chan] == 0} {
if {[matchattr $hand o] != 1} {
puthelp "NOTICE $nick :Tu ne peux pas kicker un superieur !"
return 0
}
}
putserv "kick $chan [lindex $text 0] [lrange $text 1 end]"
}
}
}
# Ban #
bind pub o|o [string trim $god(prefix)]ban pub_ban
proc pub_ban {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
putserv "KICK $chan $nick Oups... me suis tromper :P"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]ban <nick> \[message\]"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
putserv "MODE $chan +b [lindex $text 0]"
return 0
}
if {[lindex $text 0]!=""} {
append userhost [lindex $text 0] "!*" [getchanhost [lindex $text 0] $chan]
set hostmask [maskhost $userhost]
if {[matchattr [lindex $text 0] |m $chan] == 0} {
putserv "mode $chan +b $hostmask"
putserv "kick $chan [lindex $text 0] [lrange $text 1 end]"
return 0
}
if {[matchattr [lindex $text 0] |m $chan] == 1} {
if {[matchattr $hand |m $chan] == 0} {
if {[matchattr $hand o] != 1} {
puthelp "NOTICE $nick :Tu ne peux pas bannir un superieur !"
return 0
}
}
putserv "mode $chan +b $hostmask"
putserv "kick $chan [lindex $text 0] [lrange $text 1 end]"
}
}
}
# Unban #
bind pub o|o [string trim $god(prefix)]unban pub_unban
proc pub_unban {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]unban <hostmask>"
return 0
}
if {[lindex $text 0]!=""} {
putserv "mode $chan -b [lindex $test 0]
}
}
# Topic #
bind pub o|o [string trim $god(prefix)]topic pub_topic
proc pub_topic {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]topic <texte>"
return 0
}
putserv "TOPIC $chan [lrange $text 0 end]"
}
# Addowner #
bind pub n| [string trim $god(prefix)]addowner pub_addowner
proc pub_addowner {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
if {[matchattr $hand n] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addowner <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addowner <nick>"
return 0
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand n] == 1} {
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +n
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global owner."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global owner."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] +n
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global owner."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global owner."
return 0
}
}
}
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] |+n $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant owner de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant owner de $chan."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
putserv "MODE $chan +o [lindex $text 0]"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] |+n $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant owner de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant owner de $chan."
putserv "MODE $chan +o [lindex $text 0]"
}
}
# Addmaster #
bind pub n|n [string trim $god(prefix)]addmaster pub_addmaster
proc pub_addmaster {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
if {[matchattr $hand n] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addmaster <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addmaster <nick>"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand n] == 1} {
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +m
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global master."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global master."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] +m
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global master."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global master."
return 0
}
}
}
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] |+m $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant master de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant master de $chan."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
putserv "MODE $chan +o [lindex $text 0]"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] -|+m $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant master de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant master de $chan."
putserv "MODE $chan +o [lindex $text 0]"
}
}
# Addop #
bind pub m|m [string trim $god(prefix)]addop pub_addop
proc pub_addop {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
if {[matchattr $hand m] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addop <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addop <nick>"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand m] == 1} {
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +o
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global operateur."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global operateur."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] +o
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global operateur."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global operateur."
return 0
}
}
}
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] |+o $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant operateur de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant operateur de $chan."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
putserv "MODE $chan +o [lindex $text 0]"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] |+o $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant operateur de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant operateur de $chan."
putserv "MODE $chan +o [lindex $text 0]"
}
}
# Addvoice #
bind pub o|o [string trim $god(prefix)]addvoice pub_addvoice
proc pub_addvoice {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
if {[matchattr $hand o] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addvoice <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addvoice <nick>"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand o] == 1} {
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +v
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global voice."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global voice."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] +v
puthelp "NOTICE $nick :[lindex $text 0] est maintenant global voice."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant global voice."
return 0
}
}
}
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] |+v $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant voice de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant voice de $chan."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
putserv "MODE $chan +v [lindex $text 0]"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] |+v $chan
puthelp "NOTICE $nick :[lindex $text 0] est maintenant voice de $chan."
puthelp "NOTICE [lindex $text 0] :Tu es maintenant voice de $chan."
putserv "MODE $chan +v [lindex $text 0]"
}
}
# Addauto-op #
bind pub m|m [string trim $god(prefix)]addauto-op pub_addauto-op
proc pub_addauto-op {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
if {[matchattr $hand m] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addauto-op <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addauto-op <nick>"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand m] == 1} {
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +a
puthelp "NOTICE $nick :[lindex $text 0] a maintenant un global auto-op."
puthelp "NOTICE [lindex $text 0] :Tu as maintenant un global auto-op."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] +a
puthelp "NOTICE $nick :[lindex $text 0] a maintenant un global auto-op."
puthelp "NOTICE [lindex $text 0] :Tu as maintenant un global auto-op."
return 0
}
}
}
if {[validuser [lindex $text 0]] == 0} {
adduser [lindex $text 0] [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] |+a $chan
puthelp "NOTICE $nick :[lindex $text 0] a maintenant un auto-op sur $chan."
puthelp "NOTICE [lindex $text 0] :Tu as maintenant un auto-op sur $chan."
puthelp "NOTICE [lindex $text 0] :Tu dois setter ton pass (/msg $botnick pass <password_voulu>)"
putserv "MODE $chan +o [lindex $text 0]"
return 0
}
if {[validuser [lindex $text 0]] == 1} {
chattr [lindex $text 0] |+a $chan
puthelp "NOTICE $nick :[lindex $text 0] a maintenant un auto-op sur $chan."
puthelp "NOTICE [lindex $text 0] :Tu as maintenant un auto-op sur $chan."
putserv "MODE $chan +o [lindex $text 0]"
}
}
# Delauto-op #
bind pub m|m [string trim $god(prefix)]delauto-op pub_delauto-op
proc pub_delauto-op {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delauto-op <nick>"
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand m] == 1} {
if {[matchattr [lindex $text 0] a] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas de global auto-op."
return 0
}
chattr [lindex $text 0] -a
puthelp "NOTICE $nick :[lindex $text 0] n'a plus de global auto-op."
puthelp "NOTICE [lindex $text 0] :Tu n'as plus de global auto-op."
return 0
}
}
if {[matchattr [lindex $text 0] |a $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'auto-op sur $chan."
return 0
}
chattr [lindex $text 0] |-a $chan
puthelp "NOTICE $nick :[lindex $text 0] n'a plus d'auto-op sur $chan."
puthelp "NOTICE [lindex $text 0] :Tu n'as plus d'auto-op sur $chan."
}
# Deluser #
bind pub n|n [string trim $god(prefix)]deluser pub_deluser
proc pub_deluser {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
if {[matchattr $hand n] == 1} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]deluser <nick> \[all\]"
return 0
}
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]deluser <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'access"
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand n] == 1} {
deluser [lindex $text 0]
puthelp "NOTICE $nick :[lindex $text 0] est enlever de ma userlist."
puthelp "NOTICE [lindex $text 0] :Tu est enlever de ma userlist."
return 0
}
}
chattr [lindex $text 0] |-nmofv $chan
puthelp "NOTICE $nick :[lindex $text 0] est enlever de ma userlist de $chan."
puthelp "NOTICE [lindex $text 0] :Tu est enlever de ma userlist de $chan."
}
# Delowner #
bind pub n| [string trim $god(prefix)]delowner pub_delowner
proc pub_delowner {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delowner <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'access"
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand n] == 1} {
if {[matchattr [lindex $text 0] n] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas global owner."
return 0
}
chattr [lindex $text 0] -n
puthelp "NOTICE $nick :[lindex $text 0] n'est plus global owner."
puthelp "NOTICE [lindex $text 0] :Tu n'est plus global owner."
return 0
}
}
if {[matchattr [lindex $text 0] |n $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas owner de $chan."
return 0
}
chattr [lindex $text 0] |-n $chan
puthelp "NOTICE $nick :[lindex $text 0] n'est plus owner de $chan."
putserv "MODE $chan -o [lindex $text 0]"
}
# Delmaster #
bind pub n|n [string trim $god(prefix)]delmaster pub_delmaster
proc pub_delmaster {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delmaster <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'access"
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand n] == 1} {
if {[matchattr [lindex $text 0] m] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas global master."
return 0
}
chattr [lindex $text 0] -m
puthelp "NOTICE $nick :[lindex $text 0] n'est plus global master."
puthelp "NOTICE [lindex $text 0] :Tu n'est plus global master."
return 0
}
}
if {[matchattr [lindex $text 0] |m $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas master de $chan."
return 0
}
chattr [lindex $text 0] |-m $chan
puthelp "NOTICE $nick :[lindex $text 0] n'est plus master de $chan."
putserv "MODE $chan -o [lindex $text 0]"
}
# Delop #
bind pub m|m [string trim $god(prefix)]delop pub_delop
proc pub_delop {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delop <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'access"
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand m] == 1} {
if {[matchattr [lindex $text 0] o] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas global operateur."
return 0
}
chattr [lindex $text 0] -o
puthelp "NOTICE $nick :[lindex $text 0] n'est plus global operateur."
puthelp "NOTICE [lindex $text 0] :Tu n'est plus global operateur."
return 0
}
}
if {[matchattr [lindex $text 0] |o $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas operateur de $chan."
return 0
}
chattr [lindex $text 0] |-o $chan
puthelp "NOTICE $nick :[lindex $text 0] n'est plus operateur de $chan."
putserv "MODE $chan -o [lindex $text 0]"
}
# Delvoice #
bind pub o|o [string trim $god(prefix)]delvoice pub_delvoice
proc pub_delvoice {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delvoice <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'a pas d'access."
return 0
}
if {[lindex $text 1] == "all"} {
if {[matchattr $hand o] == 1} {
if {[matchattr [lindex $text 0] v] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas global voice."
return 0
}
chattr [lindex $text 0] -v
puthelp "NOTICE $nick :[lindex $text 0] n'est plus global voice."
puthelp "NOTICE [lindex $text 0] :Tu n'est plus global voice."
return 0
}
}
if {[matchattr [lindex $text 0] |v $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas voice de $chan."
return 0
}
chattr [lindex $text 0] |-v $chan
puthelp "NOTICE $nick :[lindex $text 0] n'est plus voice de $chan."
putserv "MODE $chan -v [lindex $text 0]"
}
# Join #
bind pub n| [string trim $god(prefix)]join pub_join
proc pub_join {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]join <#channel>"
return 0
}
if {[validchan [lindex $text 0]]} {
puthelp "NOTICE $nick :Je suis deja sur [lindex $text 0]."
return 0
}
puthelp "NOTICE $nick :Je garde maintenant [lindex $text 0]."
channel add [lindex $text 0]
putserv "JOIN [lindex $text 0]"
}
# Cycle #
bind pub n|n [string trim $god(prefix)]cycle pub_cycle
proc pub_cycle {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]cycle <#channel>"
return 0
}
if {[validchan [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :Je ne suis pas sur [lindex $text 0]."
return 0
}
puthelp "NOTICE $nick :Je fait un cycle sur [lindex $text 0]."
putserv "PART [lindex $text 0]"
}
# Remove #
bind pub n| [string trim $god(prefix)]remove pub_remove
proc pub_remove {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]remove <#channel>"
return 0
}
if {[validchan [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :Je ne suis pas sur [lindex $text 0]."
return 0
}
puthelp "NOTICE $nick :Je ne protege plus [lindex $text 0]."
channel remove [lindex $text 0]
putserv "PART [lindex $text 0]"
}
# Mode #
bind pub o|o [string trim $god(prefix)]mode pub_mode
proc pub_mode {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]mode <modes>"
return 0
}
putserv "MODE $chan [lrange $text 0 end]"
}
# Addbot #
bind pub n| [string trim $god(prefix)]addbot pub_addbot
proc pub_addbot {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]=="" || [lindex $text 1]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]addbot <nick> <port>"
return 0
}
if {[onchan [lindex $text 0] $chan] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas sur $chan."
return 0
}
if {[validuser [lindex $text 0]] == 1} {
puthelp "NOTICE $nick :Ce bot existe deja !"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
addbot [lindex $text 0] [lindex [split [getchanhost [lindex $text 0] $chan] "@"] 1]:[lindex $text 1]
setuser [lindex $text 0] hosts [maskhost [getchanhost [lindex $text 0] $chan]]
chattr [lindex $text 0] +o
puthelp "NOTICE $nick :Ce bot est bien ajouter."
}
}
# Delbot #
bind pub n| [string trim $god(prefix)]delbot pub_delbot
proc pub_delbot {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand S] == 0} {
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Vous devez vous identifier (/msg $botnick id <password>)"
return 0
}
}
if {[lindex $text 0] == $botnick} {
puthelp "NOTICE $nick :lol ! t un ti rigolo toi ?"
return 0
}
if {[lindex $text 0]==""} {
puthelp "NOTICE $nick :\002Quick HELP: [string trim $god(prefix)]delbot <nick>"
return 0
}
if {[validuser [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :[lindex $text 0] n'est pas un bot valid."
return 0
}
deluser [lindex $text 0]
puthelp "NOTICE $nick :Ce bot est bien enlever."
}
# List #
bind pub f|f [string trim $god(prefix)]list pub_list
proc pub_list {nick uhost hand chan rest} {
if {[lindex $rest 0] == ""} {
puthelp "NOTICE $nick :Voici la liste des \002GLOBALS\002 utilisateurs:"
puthelp "NOTICE $nick :\002OWNER:\002 [userlist n] ([llength [userlist +n]]) \002MASTER:\002 [userlist m] ([llength [userlist +m]]) \002OP:\002 [userlist o] ([llength [userlist +o]]) \002Auto-op:\002 [userlist a] ([llength [userlist +a]]) \002VOICE:\002 [userlist v] ([llength [userlist +v]])"
}
if {[lindex $rest 0] != ""} {
if {[validchan [lindex $rest 0]] == 0} {
puthelp "NOTICE $nick :Je ne suis pas sur [lindex $rest 0]."
return 0
}
puthelp "NOTICE $nick :Voici la liste des utilisateurs du channel \002[lindex $rest 0]\002:"
puthelp "NOTICE $nick :\002OWNER:\002 [userlist |n [lindex $rest 0]] ([llength [userlist |n [lindex $rest 0]]]) \002MASTER:\002 [userlist |m [lindex $rest 0]] ([llength [userlist |m [lindex $rest 0]]]) \002OP:\002 [userlist |o [lindex $rest 0]] ([llength [userlist |o [lindex $rest 0]]]) \002Auto-op:\002 [userlist |a [lindex $rest 0]] ([llength [userlist |a [lindex $rest 0]]]) \002VOICE:\002 [userlist |v [lindex $rest 0]] ([llength [userlist |v [lindex $rest 0]]])"
}
}
# Help #
bind pub o|o [string trim $god(prefix)]help pub_help
proc pub_help {nick uhost hand chan text} {
global botnick god
if {[matchattr $hand n] == 1} {
puthelp "NOTICE $nick :\002¤-¤-¤ OWNER ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addowner <nick> \[all\], [string trim $god(prefix)]addmaster <nick> \[all\], [string trim $god(prefix)]addop <nick> \[all\], [string trim $god(prefix)]addvoice <nick> \[all\], [string trim $god(prefix)]addauto-op <nick> \[all\], [string trim $god(prefix)]delowner <nick> \[all\]"
puthelp "NOTICE $nick :[string trim $god(prefix)]delmaster <nick> \[all\], [string trim $god(prefix)]delop <nick> \[all\], [string trim $god(prefix)]delauto-op <nick> \[all\], [string trim $god(prefix)]delvoice <nick> \[all\], [string trim $god(prefix)]deluser <nick> \[all\], [string trim $god(prefix)]join <#channel>, [string trim $god(prefix)]cycle <#channel>, [string trim $god(prefix)]remove <#channel>, [string trim $god(prefix)]mode <mode>, [string trim $god(prefix)]addbot <nick> <port>, [string trim $god(prefix)]delbot <nick>, [string trim $god(prefix)]list \[#channel\]"
}
if {([matchattr $hand n] == 0) && ([matchattr $hand m] == 1)} {
puthelp "NOTICE $nick :\002¤-¤-¤ MASTER ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addop <nick> \[all\], [string trim $god(prefix)]addvoice <nick> \[all\], [string trim $god(prefix)]addauto-op <nick> \[all\], [string trim $god(prefix)]delop <nick> \[all\], [string trim $god(prefix)]delauto-op <nick> \[all\], [string trim $god(prefix)]delvoice <nick> \[all\], [string trim $god(prefix)]list \[#channel\]"
}
if {([matchattr $hand n] == 0) && ([matchattr $hand o] == 1)} {
puthelp "NOTICE $nick :\002¤-¤-¤ OP ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addvoice <nick> \[all\], [string trim $god(prefix)]delvoice <nick> \[all\], [string trim $god(prefix)]list \[#channel\]"
}
if {[matchattr $hand |n $chan] == 1} {
puthelp "NOTICE $nick :\002¤-¤-¤ CHAN OWNER ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addmaster <nick>, [string trim $god(prefix)]addop <nick>, [string trim $god(prefix)]addvoice <nick>, [string trim $god(prefix)]addauto-op <nick>"
puthelp "NOTICE $nick :[string trim $god(prefix)]delmaster <nick>, [string trim $god(prefix)]delop <nick>, [string trim $god(prefix)]delauto-op <nick>, [string trim $god(prefix)]delvoice <nick>, [string trim $god(prefix)]deluser <nick>, [string trim $god(prefix)]cycle <#channel>, [string trim $god(prefix)]mode <mode>, [string trim $god(prefix)]list \[#channel\]"
}
if {([matchattr $hand |n $chan] == 0) && ([matchattr $hand |m $chan] == 1)} {
puthelp "NOTICE $nick :\002¤-¤-¤ CHAN MASTER ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addop <nick>, [string trim $god(prefix)]addvoice <nick>, [string trim $god(prefix)]addauto-op <nick>, [string trim $god(prefix)]delop <nick>, [string trim $god(prefix)]delauto-op <nick>, [string trim $god(prefix)]delvoice <nick>, [string trim $god(prefix)]list \[#channel\]"
}
if {([matchattr $hand |n $chan] == 0) && ([matchattr $hand |o $chan] == 1)} {
puthelp "NOTICE $nick :\002¤-¤-¤ CHAN OP ¤-¤-¤"
puthelp "NOTICE $nick :[string trim $god(prefix)]op \[nick\], [string trim $god(prefix)]deop \[nick\], [string trim $god(prefix)]voice \[nick\], [string trim $god(prefix)]devoice \[nick\], [string trim $god(prefix)]kick <nick> \[reason\], [string trim $god(prefix)]ban <nick> \[reason\], [string trim $god(prefix)]unban <nick ou host>, [string trim $god(prefix)]topic <texte>, [string trim $god(prefix)]addvoice <nick>, [string trim $god(prefix)]delvoice <nick>, [string trim $god(prefix)]list \[#channel\]"
}
}
###################################
# Fonctions #
# recommendé de pas toucher #
# Risque: faire planté le eggdrop #
###################################
### Identification, Shutup, Auto-op, Désidentification,
### Unshutup, Détecteur de clone, Message de bienvenue.
# Identification #
bind msg | id msg_ident
proc msg_ident {nick uhost hand text} {
global botnick
if {[matchattr $hand Q] == 1} {
puthelp "NOTICE $nick :Tu es deja identifier."
return 0
}
if {[passwdok $hand ""] == 1} {
puthelp "NOTICE $nick :Tu n'as pas de password. Fait /msg $botnick pass <password_voulu>"
return 0
}
if {[passwdok $hand [lindex $text 0]] == 1} {
chattr $hand +Q
putcmdlog "#$hand# id..."
puthelp "NOTICE $nick :Vous êtes maintenant identifier, pour vous désidentifier: /msg $botnick unident <password>"
}
if {[passwdok $hand [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :Votre identification a fouarrer :P \002Password incorrect\002"
}
}
# Désidentification #
bind sign | * sign_delogin
proc sign_delogin {nick uhost hand chan text} {
if {[matchattr $hand Q] == 1} {
chattr $hand -Q
}
if {[matchattr $hand Q] == 0} {
return 0
}
}
bind msg | unident msg_unident
proc msg_unident {nick uhost hand text} {
global botnick
if {$text == ""} {
puthelp "NOTICE $nick :\002Quick HELP: /msg $botnick unident <password>"
return 0
}
if {[matchattr $hand Q] == 0} {
puthelp "NOTICE $nick :Tu ne t'es jamais identifier."
return 0
}
if {[passwdok $hand $text] == 1} {
chattr $hand -Q
puthelp "NOTICE $nick :Tu n'es plus identifier."
}
if {[passwdok $hand $text] == 0} {
puthelp "NOTICE $nick :Votre désidentification a fouarrer :P \002Password incorrect\002"
}
}
# Shutup #
bind msg | shutup msg_shutup
proc msg_shutup {nick uhost hand text} {
global botnick
if {[matchattr $hand S] == 1} {
puthelp "NOTICE $nick :Le mode shutup est deja activer."
return 0
}
if {[lindex $text 0] == ""} {
puthelp "NOTICE $nick :\002Quick HELP: /msg $botnick shutup <password>"
}
if {[passwdok $hand ""] == 1} {
puthelp "NOTICE $nick :Tu n'as pas de password. Fait /msg $botnick pass <password_voulu>"
return 0
}
if {[passwdok $hand [lindex $text 0]] == 1} {
chattr $hand +S
putcmdlog "#$hand# shutup..."
puthelp "NOTICE $nick :Le mode shutup est maintenant activer. Pour le désactiver: /msg $botnick unshutup <password>"
}
if {[passwdok $hand [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :Le mode shutup n'est pas activer. \002Password incorrect\002"
}
}
# Unshutup #
bind msg | unshutup msg_unshutup
proc msg_unshutup {nick uhost hand text} {
global botnick
if {[matchattr $hand S] == 0} {
puthelp "NOTICE $nick :Le mode shutup n'est pas activer."
return 0
}
if {[lindex $text 0] == ""} {
puthelp "NOTICE $nick :\002Quick HELP: /msg $botnick unshutup <password>"
}
if {[passwdok $hand ""] == 1} {
puthelp "NOTICE $nick :Tu n'as pas de password. Fait /msg $botnick pass <password_voulu>"
return 0
}
if {[passwdok $hand [lindex $text 0]] == 1} {
chattr $hand -S
putcmdlog "#$hand# unshutup..."
puthelp "NOTICE $nick :Le mode shutup est maintenant desactiver. Pour l'activer: /msg $botnick shutup <password>"
}
if {[passwdok $hand [lindex $text 0]] == 0} {
puthelp "NOTICE $nick :Le mode shutup n'est pas desactiver. \002Password incorrect\002"
}
}
# Auto-op #
bind join a|a * pubcommand_auto-op
proc pubcommand_auto-op {nick uhost hand chan} {
putserv "MODE $chan +o $nick"
}
# Message de bienvenue #
bind join - * join_welcome
proc join_welcome {nick uhost hand chan} {
global botnick owner god
if {$god(welcome) == "OUI"} {
if {$chan == $god(service.chan)} {
if {$god(service) == "OUI"} {
if {$god(service.welcome) == "OUI"} {
puthelp "NOTICE $nick :$god(service.welcome.text)"
return 0
}
}
}
if {$nick != $botnick} {
putserv "NOTICE $nick :$god(welcome.text)"
}
}
}
# Détecteur de clone #
bind join - * join_clone
proc join_clone {nick uhost hand chan} {
global clone_chans botnick owner god
if {$god(clonedetect) == "OUI"} {
if {(([lsearch -exact [string tolower $chan] [string tolower $chan]] != -1) || ($chan == "*")) && ($nick != $botnick) && ($nick != $owner)} {
foreach i [chanlist $chan] {
set clone_temp [lindex [split [getchanhost $i $chan] @] 1]
if {($clone_temp == [lindex [split $uhost @] 1]) && ($i != $nick) && ($i != $botnick) && ($i != $owner)} {
putserv "PRIVMSG $chan :Hum... ya des clones: $nick & $i (*!*@$clone_temp)"
return 1
}
}
}
}
}
# Mentionner les op, deop #
bind mode -o "% -o" got_deoped
proc got_deoped {nick uhost hand chan -o victim} {
global botnick god
if {$god(service) == "OUI"} {
if {$god(service.opdeop) == "OUI"} {
if {$chan==$god(service.chan)} {
return 0
}
if {$victim==$botnick} {
putserv "PRIVMSG $god(service.chan) :ALERTE: $nick ($uhost) m'a deop de $chan"
flushmode $chan
putserv "PRIVMSG $chan :ALERTE: $nick ($uhost) m'a deop de $chan, pour pouvoir me garder, vous devez me op maintenant, ce message est envoyer sur $god(service.chan), et quelqu'un va venir, et si je ne suis pas op, votre channel sera enlever de ma liste..."
return 0
}
}
}
}
bind mode +o "% +o" got_oped
proc got_oped {nick uhost hand chan +o victim} {
global botnick god
if {$god(service) == "OUI"} {
if {$god(service.opdeop) == "OUI"} {
if {$victim==$botnick} {
putserv "PRIVMSG $chan :Merci $nick. Je suis maintenant fonctionnel."
return 0
}
}
}
}
###################################### Fin #######################################
putlog "GodControl v1.0 by oUr0sTucK LOADED Released: 13/05/2001"
putchan #loving"Rotation des fichiers de configurations completer Pitchat:-)"
