Vous êtes sur la page 1sur 152

###################

## Configuration ##
###################
###########
# Le Link #
###########
#---Nom du serveur du service---#
set eva(serv) "Eva.BlueIRC.com"
#---Pass du link---#
set eva(pass) "evapassword"
#---Nom du serveur link---#
set eva(rserv) "Eva.BlueIRC.com"
#---Ip du serveur link---#
set eva(link) "87.106.206.76"
#---Port du link---#
set eva(port) "4400"
#---Info sur le link---#
set eva(info) "Eva Service"
#######
# Eva #
#######
#---Nick De Eva---#
set eva(nick) "Eva"
#---Ident De Eva---#
set eva(ident) "01Eva"
#---Host De Eva---#
set eva(host) "765908765.net"
#---Real Name De Eva---#
set eva(name) "Evangelion"
###########
# Welcome #
###########
#---Nick De Welcome---#
set welcome(nick) "Global"
#---Ident De Welcome---#
set welcome(ident) "01Eva"
#---Host De Welcome---#
set welcome(host) "786540927.net"
#---Real Name De Welcome---#
set welcome(name) "Global Service"
###########################

# Socket d'aide aux users #


###########################
#---Nick De La Socket---#
set socket(nick) "HelpServ"
#---Ident De La Socket---#
set socket(ident) "01Help"
#---Host De La Socket---#
set socket(host) "654987122.net"
#---Real Name De La Socket---#
set socket(name) "Service d'aides"
###########
# Eggdrop #
###########
#---Identification au serveur en tant que oper---#
set ircop(onick) "Eva"
set ircop(opass) "evapassword"
set ircop(modes) "+iwbgsdpAo"
#---Identification diverse---#
set ircop(ident) {
"SETHOST 547856955.net"
}
###########
# Options #
###########
#---Salon de logue---#
set eva(chan) "#Eva"
#---Salon des robots---#
set eva(chanbot) "#Eva"
#---Salon de l'quipe---#
set eva(soho) "#Eva"
#---Notice aux IRCops lorsque qu'un client se connecte---#
set eva(onotcon) "1"
#---Topic lors d'un xclose---#
set eva(topic) "Channel ferm!"
#---Temps d'un xclose (en minutes)---#
set eva(txclose) "1440"
#---Debug en party-line---#
set eva(debug) "0"
#---Etes vous Coder de Diogene (0 est conseill sinon certain bugs pourrait tre ren
contr)---#
set eva(coderz) "0"
#---Activer la detection de clones (0 pour dsactiv)---#

set eva(detectclone) "1"


#---Nombre maximum de clones (0 pour dsactiv)---#
set eva(clonelimit) "5"
#---Nombre de clones avant avertissement---#
set eva(cloneavert) "3"
#---Raison Gline des clones---#
set eva(rglineclones) "Veuillez faire attention vos clones!"
#---Temps de Gline des clones---#
set eva(tglineclones) "3600"
#---Port des dcc---#
set eva(dccport) ""
############################################################################
# Fin de la configuration ##################################################
############################################################################
set eva(vers) "v2.0 - By IluZi0n"
###########
# Level 0 #
###########
###############
#---Xaccess---#
###############
# Dcc
bind dcc - xaccess dcc:xaccess
proc dcc:xaccess {nick idx arg} {
putdcc $idx "1,1### 0Level A 13- 0Les
foreach user [userlist -B+A] {
putdcc $idx "$user"
}
putdcc $idx "1,1### 0Level B 13- 0Les
foreach user [userlist -C+B] {
putdcc $idx "$user"
}
putdcc $idx "1,1### 0Level C 13- 0Les
foreach user [userlist -n+C] {
putdcc $idx "$user"
}
putdcc $idx "1,1### 0Level n 13- 0Les
foreach user [userlist n] {
putdcc $idx "$user"
}
putdcc $idx "1,1### 0Level D 13- 0Les
foreach user [userlist D] {
putdcc $idx "$user"
}
}

Gofrontistes. 1###"

IRCops. 1###"

Responsables Gofrontistes. 1###"

Serveurs Admins. 1###"

Services Admins. 1###"

# Msg
bind msg - xaccess msg:xaccess
proc msg:xaccess {nick uhost hand arg} {
global eva
send ":$eva(nick) NOTICE $nick :1,1### 0Level A 13- 0Les Gofrontistes. 1###"

foreach user [userlist


send ":$eva(nick) NOTICE $nick
}
send ":$eva(nick) NOTICE $nick
foreach user [userlist
send ":$eva(nick) NOTICE $nick
}
send ":$eva(nick) NOTICE $nick
"
foreach user [userlist
send ":$eva(nick) NOTICE $nick
}
send ":$eva(nick) NOTICE $nick
foreach user [userlist
send ":$eva(nick) NOTICE $nick
}
send ":$eva(nick) NOTICE $nick
foreach user [userlist
send ":$eva(nick) NOTICE $nick
}
}

-B+A] {
:$user"
:1,1### 0Level B 13- 0Les IRCops. 1###"
-C+B] {
:$user"
:1,1### 0Level C 13- 0Les Responsables Gofrontistes. 1###
-n+C] {
:$user"
:1,1### 0Level n 13- 0Les Serveurs Admins. 1###"
n] {
:$user"
:1,1### 0Level D 13- 0Les Services Admins. 1###"
D] {
:$user"

# Pub
bind pub - .xaccess pub:xaccess
bind pub - !xaccess pub:xaccess
proc pub:xaccess {nick uhost hand chan
global eva
send ":$eva(nick) NOTICE $nick :1,1###
foreach user [userlist -B+A] {
send ":$eva(nick) NOTICE $nick :$user"
}
send ":$eva(nick) NOTICE $nick :1,1###
foreach user [userlist -C+B] {
send ":$eva(nick) NOTICE $nick :$user"
}
send ":$eva(nick) NOTICE $nick :1,1###
"
foreach user [userlist -n+C] {
send ":$eva(nick) NOTICE $nick :$user"
}
send ":$eva(nick) NOTICE $nick :1,1###
foreach user [userlist n] {
send ":$eva(nick) NOTICE $nick :$user"
}
send ":$eva(nick) NOTICE $nick :1,1###
foreach user [userlist D] {
send ":$eva(nick) NOTICE $nick :$user"
}
}

arg} {
0Level A 13- 0Les Gofrontistes. 1###"

0Level B 13- 0Les IRCops. 1###"

0Level C 13- 0Les Responsables Gofrontistes. 1###

0Level n 13- 0Les Serveurs Admins. 1###"

0Level D 13- 0Les Services Admins. 1###"

#############
#---Xhelp---#
#############
set intro "4ATTENTION: Nous vous rappelons que toutes les commandes sont enregistrs
- Afin d'viter les Abus!"
set levelnull(num) "8"
set levelnull(1) "1,1### 0Level 0 11- 0Tout les users. 1###"

set levelnull(2) ""


set levelnull(3) "xaccess - Utilisation: xaccess - 3Retourne la liste des personnes
ayant acces au service"
set levelnull(4) "operlist - Utilisation: operlist - 3Retourne la liste des IRCoprat
eurs prsents"
set levelnull(5) "geolist - Utilisation: geolist - 3Retourne la liste des gofrontist
es prsents"
set levelnull(6) "geosend - Utilisation: geosend <message> - 3Envoi un message aux
gofrontistes"
set levelnull(7) "login - Utilisation: login <hand> <pass> - 3Permet de s'identifie
r sur le service"
set levelnull(8) "5"
set levela(num) "49"
set levela(1) "1,1### 0Level A 13- 0Les Gofrontistes. 1###"
set levela(2) ""
set levela(3) "xop - Utilisation: xop <salon> <nick> - 3Permet de donner le status
d'oprateur a quelqu'un sur un salon"
set levela(4) "xdeop - Utilisation: xdeop <salon> <nick> - 3Permet de retirer le st
atus d'oprateur a quelqu'un sur un salon"
set levela(5) "xvoice - Utilisation: xvoice <salon> <nick> - 3Permet de donner le s
tatus de voice a quelqu'un sur un salon"
set levela(6) "xdevoice - Utilisation: xdevoice <salon> <nick> - 3Permet de retirer
le status de voice a quelqu'un sur un salon"
set levela(7) "xgline - Utilisation: xgline <pseudo/host> <duree> <raison> - 3Perme
t d'ajouter un gline sur le serveur"
set levela(8) "xungline - Utilisation: xungline <host> - 3Permet de retirer un glin
e sur le serveur"
set levela(9) "xmode - Utilisation: xmode <salon> <mode> - 3Permet de changer les m
odes d'un salon"
set levela(10) "xglist - Utilisation: xglist - 3Retourne la liste des glines sur le
serveur"
set levela(11) "xban - Utilisation: xban <salon> <host/nick> - 3Permet de bannir un
usager d'un salon"
set levela(12) "xunban - Utilisation: xunban <salon> <nick> - 3Permet de debannir u
n usager d'un salon"
set levela(13) "xtopic - Utilisation: xtopic <salon> <topic> - 3Permet de changer l
e topic d'un salon"
set levela(14) "xclearmodes - Utilisation: xclearmodes <salon> - 3Permet de retirer
tout les modes d'un salon"
set levela(15) "xhostkill - Utilisation: xhostkill <host> - 3Permet de killer tout
les utilisateurs utilisant un certain host"
set levela(16) "xkill - Utilisation: xkill <nick> <raison> - 3Permet de killer un u
tilisateur"
set levela(17) "xclose - Utilisation: xclose <salon> - 3Permet de fermer un salon"
set levela(18) "xchankill - Utilisation: xchankill <salon> - 3Permet de fermer un s
alon et killeur tout ses usagers"
set levela(19) "xwall - Utilisation: xwall <message> - 3Permet d'envoyer une notice
globale a tout le rseau"
set levela(20) "xwallops - Utilisation: xwallops <message> - 3Permet d'envoyer un W
ALLOPS"
set levela(21) "xkick - Utilisation: xkick <salon> <nick> <raison> - 3Permet de kic
ker un utilisateur d'un salon"
set levela(22) "xkickban - Utilisation: xkickban <salon> <nick> <raison> - 3Permet
de kicker et bannir un utilisateur d'un salon"
set levela(23) "xlistclose - Utilisation: xlistclose - 3Retourne la liste des salon
s ferms"
set levela(24) "xunclose - Utilisation: xunclose <salon> - 3Permet de rouvrir un sal
on ferm"
set levela(25) "xinviteme - Utilisation: xinviteme <nick> - 3Permet d'inviter usage

r sur $eva(chan)"
set levela(26) "xinvite - Utilisation: xinvite <nick> <salon> - 3Permet d'inviter u
n usager sur un salon"
set levela(27) "xopersend - Utilisation: xopersend <message> - 3Permet d'envoyer un
e notice a tous les IRCoprateurs connects"
set levela(28) "xsecu - Utilisation: xsecu <raison> - 3Permet de bloquer tout les s
alons officiels quelques temps"
set levela(29) "xnoconnect - Utilisation: xnoconnect - 3Permet de bloquer toutes co
nnections au serveur"
set levela(30) "xwho - Utilisation: xwho <nick/host> - 3Retourne des informations s
ur l'argument spcifi"
set levela(31) "xwhois - Utilisation: xwhois <nick> - 3Retourne des informations su
r le pseudo spcifi"
set levela(32) "badchan - Utilisation: badchan - 3Retourne la liste des badchans"
set levela(33) "excbadchan - Utilisation: excbadchan - 3Retourne la liste des excep
tions de badchans"
set levela(34) "xtrust - Utilisation: xtrust - 3Retourne la liste des hosts autoriss
a cloner"
set levela(35) "chanoff - Utilisation: chanoff - 3Retourne la liste des salons offi
ciels"
set levela(36) "xnoops - Utilisation: xnoops - 3Retourne la liste des salons en noo
ps"
set levela(37) "xnovoice - Utilisation: xnovoice - 3Retourne la liste des salons en
novoice"
set levela(38) "xallops - Utilisation: xallops - 3Retourne la liste des salons en a
utoop"
set levela(39) "xallvoice - Utilisation: xallvoice - 3Retourne la liste des salons
en autovoice"
set levela(40) "xnobans - Utilisation: xnobans - 3Retourne la liste des salons en n
obans"
set levela(41) "xnotopic - Utilisation: xnotopic - 3Retourne la liste des salons en
no topic"
set levela(42) "xpermclose - Utilisation: xpermclose - 3Retourne la liste des salon
s en fermeture permanente"
set levela(43) "xdefmodes - Utilisation: xdefmodes <salon> - 3Retourne la liste des
auto modes sur un salons"
set levela(44) "xdeftopic - Utilisation: xdeftopic <salon> - 3Retourne le topic dfin
i pour un salons"
set levela(45) "xwelcome - Utilisation: xwelcome <salon> - 3Retourne la notice d'en
tre dfinie pour un salons"
set levela(46) "xdefgline - Utilisation: xdefgline <arg> - 3Retourne la liste des a
uto gline sur un argument"
set levela(47) "xcollide - Utilisation: xcollide <nick> - 3Collide un utilisateur"
set levela(48) "xdefkill -Utilisation: xdefkill <arg> - 3Retourne la liste des auto
kill sur un argument"
set levela(49) "5"
set levelb(num) "29"
set levelb(1) "1,1### 0Level B 13- 0Les IRCoprateurs. 1###"
set levelb(2) ""
set levelb(3) "xjoin - Utilisation: xjoin <salon> - 3Fais joindre $eva(nick) sur un
salon"
set levelb(4) "xpart - Utilisation: xpart <salon> - 3Fais partir $eva(nick) d'un sa
lon"
set levelb(5) "xsvsnick - Utilisation: xsvsnick <nick> <nouveau-nick> - 3Permet de
changer le nick d'un usager"
set levelb(6) "xkickall - Utilisation: xkickall <salon> - 3Permet de kicker tout le
s usagers sur un salon"
set levelb(7) "xopall - Utilisation: xopall <salon> - 3Permet de mettre le status d
'oprateur a tout les usagers sur un salon"

set levelb(8) "xdeopall - Utilisation: xdeopall <salon> - 3Permet de retirer le sta


tus d'oprateur a tout les usagers sur un salon"
set levelb(9) "xvoiceall - Utilisation: xvoiceall <salon> - 3Permet de mettre le st
atus de voice a tout les usagers sur un salon"
set levelb(10) "xdevoiceall - Utilisation: xdevoiceall <salon> - 3Permet de retirer
le status de voice a tout les usagers sur un salon"
set levelb(11) "xcleargline - Utilisation: xcleargline - 3Permet de retirer toutes
les glines du rseau"
set levelb(12) "xsay - Utilisation: xsay <nick/salon> <message> - 3Permet de faire
parler $eva(nick)"
set levelb(13) "xact - Utilisation: xact <nick/salon> <message> - 3Permet de faire
agir $eva(nick)"
set levelb(14) "xnotice - Utilisation: xnotice <nick/salon> <message> - 3Permet d'e
nvoyer une notice avec $eva(nick)"
set levelb(15) "xsnotice - Utilisation: xsnotice <nick/salon> <message> - 3Permet d
'envoyer une serveur notice avec $eva(serv)"
set levelb(16) "xpurge - Utilisation: xpurge - 3Permet de rouvrir tout les salons fe
rms"
set levelb(17) "xsajoin - Utilisation: xsajoin <nick> <salon> - 3Permet de forc un u
sager a joindre un salon"
set levelb(18) "xsapart - Utilisation: xsapart <nick> <salon> - 3Permet de forc un u
sager a partir d'un salon"
set levelb(19) "xsajoinall - Utilisation: xsajoinall <salon> - 3Permet de forc tous
les usagers a joindre un salon"
set levelb(20) "xraw - Utilisation: xraw <raw> - 3Permet d'injecter une raw"
set levelb(21) "+xclone - Utilisation: +xclone <pseudo> <ident> <host> <realname>
- 3Permet de connect un xclone"
set levelb(22) "-xclone - Utilisation: -xclone <pseudo> - 3Permet de deconnect un xc
lone"
set levelb(23) "xclone - Utilisation: xclone - 3Retourne la liste des xclones conne
cts"
set levelb(24) "xmove - Utilisation: xmove <xclone> <salon> - 3Permet de faire join
dre un xclone sur un salon"
set levelb(25) "xsort - Utilisation: xsort <xclone> <salon> - 3Permet de faire part
ir un xclone d'un salon"
set levelb(26) "+autorise - Utilisation: +autorise <nick> - 3Ajoute une autorisatio
n pour un pseudo a rentrer sur $eva(chanbot)"
set levelb(27) "-autorise - Utilisation: -autorise <nick> - 3Retire une autorisatio
n pour un pseudo a rentrer sur $eva(chanbot)"
set levelb(28) "autorise - Utilisation: autorise - 3Retourne la liste de pseudos au
toriss a rentrer sur $eva(chanbot)"
set levelb(29) "5"
set levelc(num) "40"
set levelc(1) "1,1### 0Level C 13- 0Les Responsables Gofrontistes. 1###"
set levelc(2) ""
set levelc(3) "xconnect - Utilisation: xconnect - 3Permet de connect $eva(serv)"
set levelc(4) "xdebug - Utilisation: xdebug - 3Active ou Dsactive le mode debug"
set levelc(5) "welcome - Utilisation: welcome <message> - 3Dfini la notice de bienve
nue"
set levelc(6) "+badchan - Utilisation: +badchan <salon> - 3Ajoute un salon a la lis
te des badchans"
set levelc(7) "-badchan - Utilisation: -badchan <salon> - 3Retire un salon a la lis
te des badchans"
set levelc(8) "+excbadchan - Utilisation: +excbadchan <salon> - 3Ajoute un salon a
la liste des exceptions de badchans"
set levelc(9) "-excbadchan - Utilisation: -excbadchan <salon> - 3Retire un salon a
la liste des exceptions de badchans"
set levelc(10) "+xtrust - Utilisation: +xtrust <host> - 3Ajoute un host a la liste
des hosts autoriss a cloner"

set levelc(11) "-xtrust - Utilisation: -xtrust <host> - 3Retire un host a la liste


des hosts autoriss a cloner"
set levelc(12) "+chanoff - Utilisation: +chanoff <salon> - 3Ajoute un salon a la li
ste des salons officiels"
set levelc(13) "-chanoff - Utilisation: -chanoff <salon> - 3Retire un salon a la li
ste des salons officiels"
set levelc(14) "+xdefmodes - Utilisation: +xdefmodes <salon> <modes> - 3Dfini les au
tomodes d'un salon"
set levelc(15) "-xdefmodes - Utilisation: -xdefmodes <salon> <modes> - 3Supprime le
s automodes d'un salon"
set levelc(16) "xsuspend - Utilisation: xsuspend <hand> - 3Suspend un gofrontiste"
set levelc(17) "xunsuspend - Utilisation: xunsuspend <hand> - 3Retire le suspend d'
un gofrontiste"
set levelc(18) "+xnoops - Utilisation: +xnoops <#salon> - 3Ajoute un salon avec l'o
ption noops (pas d'oprateurs)"
set levelc(19) "-xnoops - Utilisation: -xnoops <#salon> - 3Retire un salon avec l'o
ption noops (pas d'oprateurs)"
set levelc(20) "+xnovoice - Utilisation: +xnovoice <#salon> - 3Ajoute un salon avec
l'option novoice (pas de voices)"
set levelc(21) "-xnovoice - Utilisation: -xnovoice <#salon> - 3Retire un salon avec
l'option novoice (pas de voices)"
set levelc(22) "+xallops - Utilisation: +xallops <#salon> - 3Ajoute un salon en aut
oop"
set levelc(23) "-xallops - Utilisation: -xallops <#salon> - 3Retire un salon en aut
oop"
set levelc(24) "+xallvoice - Utilisation: +xallvoice <#salon> - 3Ajoute un salon en
autovoice"
set levelc(25) "-xallvoice - Utilisation: -xallvoice <#salon> - 3Retire un salon en
autovoice"
set levelc(26) "+xnobans - Utilisation: +xnobans <#salon> - 3Ajoute un salon avec l
'option nobans (pas de bans)"
set levelc(27) "-xnobans - Utilisation: -xnobans <#salon> - 3Retire un salon avec l
'option nobans (pas de bans)"
set levelc(28) "+xnotopic - Utilisation: +xnotopic <#salon> - 3Ajoute un salon avec
l'option notopic (pas de topic)"
set levelc(29) "-xnotopic - Utilisation: -xnotopic <#salon> - 3Retire un salon avec
l'option notopic (pas de topic)"
set levelc(30) "+xpermclose - Utilisation: +xpermclose <#salon> - 3Ajoute un salon
en permclose (toujours fermer)"
set levelc(31) "-xpermclose - Utilisation: -xpermclose <#salon> - 3Retire un salon
en permclose (toujours fermer)"
set levelc(32) "+xdeftopic - Utilisation: +xdeftopic <#salon> <topic> - 3Ajoute l'a
uto topic d'un salon"
set levelc(33) "-xdeftopic - Utilisation: -xdeftopic <#salon> <topic> - 3Retire l'a
uto topic d'un salon"
set levelc(34) "+xwelcome - Utilisation: +xwelcome <#salon> <msg> - 3Ajoute la noti
ce d'accueil d'un salon"
set levelc(35) "-xwelcome - Utilisation: -xwelcome <#salon> <msg> - 3Retire la noti
ce d'accueil d'un salon"
set levelc(36) "+xdefgline - Utilisation: +xdefgline <arg> <type> <temps> <raison>
- 3Ajoute un auto gline"
set levelc(37) "-xdefgline - Utilisation: -xdefgline <arg> <type> - 3Ajoute un auto
gline"
set levelc(38) "+xdefkill - Utilisation: +xdefkill <arg> <type> <raison> - 3Retire
un auto kill"
set levelc(39) "-xdefkill - Utilisation: -xdefkill <arg> <type> - 3Retire un auto k
ill"
set levelc(40) "5"
set leveld(num) "7"

set leveld(1) "1,1### 0Level D 13- 0Les Services Adminsitrateurs. 1###"


set leveld(2) ""
set leveld(3) "aop - Utilisation: aop <#salon> <pseudo> - 3Permet de donner le stat
us d'oprateur a quelqu'un sur un salon"
set leveld(4) "adeop - Utilisation: adeop <#salon> <pseudo> - 3Permet de retir le st
atus d'oprateur a quelqu'un sur un salon"
set leveld(5) "akick - Utilisation: akick <#salon> <nick> <raison> - 3Permet de kic
ker un utilisateur d'un salon"
set leveld(6) "akill - Utilisation: akill <pseudo> <raison> - 3Permet de killer un
utilisateur"
set leveld(7) "5"
set leveln(num) "10"
set leveln(1) "1,1### 0Level n 13- 0Les Serveur Administrateurs. 1###"
set leveln(2) ""
set leveln(3) "addgeo - Utilisation: addgeo <pseudo> <pass> - 3Ajoute un Gofrontiste
"
set leveln(4) "addircop - Utilisation: addircop <pseudo> <pass> - 3Ajoute un IRCopr
ateur"
set leveln(5) "addrs - Utilisation: addrs <pseudo> <pass> - 3Ajoute un Responsable
Gofrontistes"
set leveln(6) "addsa - Utilisation: addsa <pseudo> <pass> - 3Ajoute un Services Adm
inistrateurs"
set leveln(7) "addadmin - Utilisation: addadmin <pseudo> <pass> - 3Ajoute un Serveu
r Administrateur"
set leveln(8) "delacces - Utilisation: delacces <pseudo> - 3Supprime un accss"
set leveln(9) "5"
set leveln(10) "8,1.:: 0Fin du module d'Aide -Eva Service- 8::."
bind dcc - xhelp dcc:xhelp
proc dcc:xhelp {nick idx arg} {
global intro levelnull levela levelb levelc leveld leveln
sendlog "XHelp par $nick"
putdcc $idx "$intro"
putdcc $idx "\2"
for {set x 1} {$x<=$levelnull(num)} {incr x 1} {
putdcc $idx "$levelnull($x)"
}
if {[matchattr $nick A]} {
for {set x 1} {$x<=$levela(num)} {incr x 1} {
putdcc $idx "$levela($x)"
}
}
if {[matchattr $nick B]} {
for {set x 1} {$x<=$levelb(num)} {incr x 1} {
putdcc $idx "$levelb($x)"
}
}
if {[matchattr $nick C]} {
for {set x 1} {$x<=$levelc(num)} {incr x 1} {
putdcc $idx "$levelc($x)"
}
}
if {[matchattr $nick D]} {
for {set x 1} {$x<=$leveld(num)} {incr x 1} {
putdcc $idx "$leveld($x)"
}
}
if {[matchattr $nick n]} {
for {set x 1} {$x<=$leveln(num)} {incr x 1} {

putdcc $idx "$leveln($x)"


}
}
}
bind msg - xhelp msg:xhelp
proc msg:xhelp {nick uhost hand arg} {
global intro levelnull levela levelb levelc leveld leveln eva
sendlog "XHelp par $nick"
send ":$eva(nick) NOTICE $nick :$intro"
send ":$eva(nick) NOTICE $nick :\2"
for {set x 1} {$x<=$levelnull(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelnull($x)"
}
if {[matchattr $hand A]} {
for {set x 1} {$x<=$levela(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levela($x)"
}
}
if {[matchattr $hand B]} {
for {set x 1} {$x<=$levelb(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelb($x)"
}
}
if {[matchattr $hand C]} {
for {set x 1} {$x<=$levelc(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelc($x)"
}
}
if {[matchattr $hand D]} {
for {set x 1} {$x<=$leveld(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$leveld($x)"
}
}
if {[matchattr $hand n]} {
for {set x 1} {$x<=$leveln(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$leveln($x)"
}
}
}
bind pub - !xhelp pub:xhelp
bind pub - .xhelp pub:xhelp
proc pub:xhelp {nick uhost hand chan arg} {
global intro levelnull levela levelb levelc leveld leveln eva
sendlog "XHelp par $nick"
send ":$eva(nick) NOTICE $nick :$intro"
send ":$eva(nick) NOTICE $nick :\2"
for {set x 1} {$x<=$levelnull(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelnull($x)"
}
if {[matchattr $hand A]} {
for {set x 1} {$x<=$levela(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levela($x)"
}
}
if {[matchattr $hand B]} {
for {set x 1} {$x<=$levelb(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelb($x)"
}

}
if {[matchattr $hand C]} {
for {set x 1} {$x<=$levelc(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$levelc($x)"
}
}
if {[matchattr $hand D]} {
for {set x 1} {$x<=$leveld(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$leveld($x)"
}
}
if {[matchattr $hand n]} {
for {set x 1} {$x<=$leveln(num)} {incr x 1} {
send ":$eva(nick) NOTICE $nick :$leveln($x)"
}
}
}
################
#---Operlist---#
################
# Dcc
bind dcc - operlist dcc:operlist
proc dcc:operlist {nick idx arg} {
global eva
sendlog "XOperlist par $nick"
if {![info exists eva(operlist)] || $eva(operlist)==""} {
putdcc $idx "\2Aucun opers prsents\2"
return 0
} else {
putdcc $idx "\2Liste des opers prsents:"
foreach x $eva(operlist) {
putdcc $idx "$x"
}
}
}
# Msg
bind msg - operlist msg:operlist
proc msg:operlist {nick uhost hand arg} {
global eva
if {![info exists eva(operlist)] || $eva(operlist)==""} {
send ":$eva(nick) NOTICE $nick :\2Aucun opers prsents\2"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\2Liste des opers prsents:"
sendlog "XOperlist par $nick"
foreach x $eva(operlist) {
send ":$eva(nick) NOTICE $nick :$x"
}
}
}
# Pub
bind pub - !operlist pub:operlist
bind pub - .operlist pub:operlist

proc pub:operlist {nick uhost hand chan arg} {


global eva
if {![info exists eva(operlist)] || $eva(operlist)==""} {
send ":$eva(nick) NOTICE $nick :\2Aucun opers prsents\2"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\2Liste des opers prsents:"
foreach x $eva(operlist) {
send ":$eva(nick) NOTICE $nick :$x"
}
}
}
###############
#---Geolist---#
###############
# Dcc
bind dcc - geolist dcc:geolist
proc dcc:geolist {nick idx arg} {
global eva
putdcc $idx "Voici la liste des gofrontistes loggu:"
sendlog "XGolist par $nick"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
putdcc $idx "\2Hand:\2 [lindex $c 0] - \2Nick\2: [lindex $c 1]"
}
}
# Msg
bind msg - geolist msg:geolist
proc msg:geolist {nick uhost hand arg} {
global eva
send ":$eva(nick) NOTICE $nick :Voici la liste des gofrontistes loggu:"
sendlog "XGolist par $nick"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
send ":$eva(nick) NOTICE $nick :\2Hand:\2 [lindex $c 0] - \2Nick
\2: [lindex $c 1]"
}
}
# Pub
bind pub - !geolist pub:geolist
bind pub - .geolist pub:geolist
proc pub:geolist {nick uhost hand chan arg} {
global eva
send ":$eva(nick) NOTICE $nick :Voici la liste des gofrontistes loggu:"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
send ":$eva(nick) NOTICE $nick :\2Hand:\2 [lindex $c 0] - \2Nick

\2: [lindex $c 1]"


}
}
###############
#---Geosend---#
###############
bind pub - .geosend pub:.geosend
proc pub:.geosend {nick uhost hand channel arg} {
global eva
if {$arg==""} {return 0}
dccbroadcast "\002MSG\002 \[\002$nick@$channel\] $arg"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
send ":$eva(nick) NOTICE [lindex $c 1] :\002MSG\002 \[\002$nick@
$channel\] $arg"
}
}
bind msg - geosend msg:geosend
proc msg:geosend {nick uhost hand arg} {
global eva
if {$arg==""} {return 0}
dccbroadcast "\002MSG\002 \[\002$nick\] $arg"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
send ":$eva(nick) NOTICE [lindex $c 1] :\002MSG\002 \[\002$nick\
] $arg"
}
}
#############
#---Login---#
#############
bind msg -|- login eva:login
proc eva:login {nick uhost hand arg} {
global eva
set login [lindex $arg 0]
set pass [lindex $arg 1]
if {$login=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 login <hand> <p
ass>"
return 0
}
if {![validuser $login]} {
send ":$eva(nick) NOTICE $nick :\2$login user inconnu!"
return 0
}
if {[passwdok $login ""]} {
send ":$eva(nick) NOTICE $nick :\2Votre mot de passe n'est pas df
ini!\2"
return 0
}
if {[isauth $nick]} {

send ":$eva(nick) NOTICE $nick :\2Vous tes dja identifi!"


return 0
}
if {[getuser $login XTRA suspend]=="1"} {
send ":$eva(nick) NOTICE $nick :\2Vous tes suspendu, vous ne pouv
ez plus utiliser le service pour le moment"
return 0
}
if {[passwdok $login $pass]} {
send ":$eva(nick) NOTICE $nick :\2Identification russie bienvenue
sur le Service Eva!"
sendlog "Login Par $nick - ($login)"
anonce $nick $login
auth $nick $login
send ":$eva(nick) INVITE $nick $eva(chan)"
send ":$eva(nick) SAJOIN $nick $eva(chan)"
send ":$eva(nick) INVITE $nick $eva(soho)"
send ":$eva(nick) SAJOIN $nick $eva(soho)"
send ":$eva(nick) MODE $eva(chan) +v $nick"
} else {
send ":$eva(nick) NOTICE $nick :\2Attention votre mot de pass es
t incorrect!"
rater $nick
}
return 0
}
#########################
# Level Geofrontiste: A #
#########################
##########
#---Xop--#
##########
# MSG
bind msg - xop msg:xop
proc msg:xop {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xop <salon> <pseudo>"
return 0
}
proc:xop $salon $pseudo $hand
}
# DCC
bind dcc - xop dcc:xop
proc dcc:xop {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![matchattr $nick A]} {

avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xop <salon> <pseudo>"
return 0
}
proc:xop $salon $pseudo $nick
}
# Proc
proc proc:xop {chan nick by} {
global eva
#putserv "MODE $chan +o $nick"
send ":$eva(serv) MODE $chan +o $nick"
sendlog "XOp sur $chan sur $nick par $by"
putlog2 "Xop par $by : $nick sur $chan"
}
############
#---Xdeop--#
############
# MSG
bind msg - xdeop msg:xdeop
proc msg:xdeop {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xdeop <salon> <pseudo>"
return 0
}
proc:xdeop $salon $pseudo $hand
}
# DCC
bind dcc - xdeop dcc:xdeop
proc dcc:xdeop {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xdeop <salon> <pseudo>"
return 0
}
proc:xdeop $salon $pseudo $nick
}

# Proc
proc proc:xdeop {chan nick by} {
global eva
send ":$eva(serv) MODE $chan -o $nick"
sendlog "XDeop sur $chan sur $nick par $by"
putlog2 "Xdeop par $by : $nick sur $chan"
}
#############
#---Xvoice--#
#############
# MSG
bind msg - xvoice msg:xvoice
proc msg:xvoice {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xvoice <salon> <pseudo>"
return 0
}
proc:xvoice $salon $pseudo $hand
}
# DCC
bind dcc - xvoice dcc:xvoice
proc dcc:xvoice {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xvoice <salon> <pseudo>"
return 0
}
proc:xvoice $salon $pseudo $nick
}
# Proc
proc proc:xvoice {chan nick by} {
global eva
#putserv "MODE $chan +v $nick"
send ":$eva(serv) MODE $chan +v $nick"
sendlog "XVoice sur $chan sur $nick par $by"
putlog2 "Xvoice par $by : $nick sur $chan"
}
###############

#---Xdevoice--#
###############
# MSG
bind msg - xdevoice msg:xdevoice
proc msg:xdevoice {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xdevoice <salon> <pseudo>"
return 0
}
proc:xdevoice $salon $pseudo $hand
}
# DCC
bind dcc - xdevoice dcc:xdevoice
proc dcc:xdevoice {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xdevoice <salon> <pseudo>"
return 0
}
proc:xdevoice $salon $pseudo $nick
}
# Proc
proc proc:xdevoice {chan nick by} {
global eva
send ":$eva(serv) MODE $chan -v $nick"
sendlog "XDevoice sur $chan sur $nick par $by"
putlog2 "Xdevoice par $by : $nick sur $chan"
}
##############
#---Xgline---#
##############
# MSG
bind msg - xgline msg:xgline
proc msg:xgline {nick uhost hand arg} {
global eva hostclone
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick

return 0
}
set arg [debug $arg]
set victime [lindex $arg 0]
set temps [lindex $arg 1]
set raison [lrange $arg 2 end]
set tueur "$hand"
if {$victime==""} {
send ":$eva(nick) NOTICE $nick :\002Utilisation:\002 xgline <pseudo/host
> <duree> <raison>"
return 0
}
if {$temps==""} {
set temps "3600"
}
if {$raison==""} {
set raison "Gros vilain!"
}
if [string match *@* $victime] {
send ":$eva(nick) NOTICE $nick :\2Merci de Gline un host, non un user@ho
st"
return 0
}
if [string match *:* $temps] {
set exp [string tolower [split $temps :]]
if {[lindex $exp 1] == "s"} {
set temps [lindex $exp 0]
} elseif {[lindex $exp 1] == "m"} {
set temps [expr [lindex $exp 0] * 60]
} elseif {[lindex $exp 1] == "h"} {
set temps [expr [lindex $exp 0] * 3600]
} elseif {[lindex $exp 1] == "j"} {
set temps [expr [lindex $exp 0] * 86400]
} else {
send ":$eva(nick) NOTICE $nick :Le format de la dure est
invalide. 'xhelp xgline' pour de l'aide"
return 0
}
}
if ![string match *.* $victime] {
if ![info exists hostclone($victime)] {
send ":$eva(nick) NOTICE $nick :Pseudo non connect! ($victime)"
return 0
}
}
proc:xgline $victime $temps $tueur $raison
}
# DCC
bind dcc - xgline dcc:xgline
proc dcc:xgline {nick idx arg} {
global eva hostclone
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set arg [debug $arg]
set victime [lindex $arg 0]
set temps [lindex $arg 1]

set raison [lrange $arg 2 end]


set tueur "$nick"
if {$victime==""} {
putdcc $idx "\002Utilisation:\002 xgline <pseudo/host> <duree> <raison>"
return 0
}
if {$temps==""} {
set temps "3600"
}
if {$raison==""} {
set raison "Gros vilain!"
}
if [string match *@* $victime] {
putdcc $idx "\2Merci de gline un host, non un user@host"
return 0
}
if [string match *:* $temps] {
set exp [string tolower [split $temps :]]
if {[lindex $exp 1] == "s"} {
set temps [lindex $exp 0]
} elseif {[lindex $exp 1] == "m"} {
set temps [expr [lindex $exp 0] * 60]
} elseif {[lindex $exp 1] == "h"} {
set temps [expr [lindex $exp 0] * 3600]
} elseif {[lindex $exp 1] == "j"} {
set temps [expr [lindex $exp 0] * 86400]
} else {
putdcc $idx "Le format de la dure est invalide. 'xhelp xg
line' pour de l'aide"
return 0
}
}
if ![string match *.* $victime] {
if ![info exists hostclone($victime)] {
putdcc $idx "Pseudo non connect! ($victime)"
return 0
}
}
proc:xgline $victime $temps $tueur $raison
}
# Proc
proc proc:xgline {victime time by raison} {
global eva hostclone clone
if [string match *.* $victime] {
if [info exists clone($victime)] {set nb "$clone($victime)"}
if ![info exists clone($victime)] {set nb "0"}
gline $victime $time $by "$raison"
sendlog "XGlined ($nb) *@$victime - Temps en secondes: $time  -Pour la raiso
n: $raison - par: $by"
putlog2 "Xgline par $by : $victime pendant $time secondes ($raison)"
return 0
}
if ![string match *.* $victime] {
set tmp "$hostclone($victime)"
if [info exists clone($tmp)] {set nb "$clone($tmp)"}
if ![info exists clone($tmp)] {set nb "0"}
gline $tmp $time $by "$raison"
sendlog "XGlined ($nb) *@$hostclone($victime) - Temps en secondes: $time - P

our la raison: $raison - par: $by"


putlog2 "Xgline par $by : $tmp pendant $time secondes ($raison)"
return 0
}
}
################
#---Xungline---#
################
# MSG
bind msg - xungline msg:xungline
proc msg:xungline {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set host [lindex $arg 0]
if {$host==""} {
send ":$eva(nick) NOTICE $nick :\002Utilisation:\002 xungline <host>"
return 0
}
proc:xungline $host $hand
}
# DCC
bind dcc - xungline dcc:xungline
proc dcc:xungline {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set host [lindex $arg 0]
if {$host==""} {
putdcc $idx "\002Utilisation:\002 xungline <host>"
return 0
}
proc:xungline $host $nick
}
# Proc
proc proc:xungline {host by} {
global eva
send ":$eva(serv) GLINE * -$host"
sendlog "XUnGlined sur $host par $by"
}
#############
#---Xmode---#
#############
# MSG
bind msg - xmode msg:xmode
proc msg:xmode {nick uhost hand arg} {

global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set mode [lrange $arg 1 end]
if {$salon=="" || $mode==""} {
send ":$eva(nick) NOTICE $nick :\002Utilisation:\002 xmode <salon> <mode
>"
return 0
}
proc:xmode $salon $hand $mode
}
# DCC
bind dcc - xmode dcc:xmode
proc dcc:xmode {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set mode [lrange $arg 1 end]
if {$salon=="" || $mode==""} {
putdcc $idx "\002Utilisation:\002 xmode <salon> <mode>"
return 0
}
proc:xmode $salon $nick $mode
}
# Proc
proc proc:xmode {salon by mode} {
global eva
send ":$eva(serv) MODE $salon $mode"
sendlog "XModes sur $salon - Mode(s): $mode - par $by"
putlog2 "Xmode par $by : $mode sur $salon"
}
##############
#---Xglist---#
##############
# MSG
bind msg - xglist msg:xglist
proc msg:xglist {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(act) "2"
set eva(nick2) "$nick"
send ":$eva(nick) STATS G"
sendlog "XGlist par $hand"

}
# DCC
bind dcc - xglist dcc:xglist
proc dcc:xglist {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(act) "2bis"
set eva(idx2) "$idx"
send ":$eva(nick) STATS G"
sendlog "XGlist par $nick"
}
############
#---Xban---#
############
# MSG
bind msg - xban msg:xban
proc msg:xban {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set victime [lindex $arg 1]
if {$salon=="" || $victime=="" || ![string match *#* $salon] } {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xban <#salon> <host/p
seudo>"
return 0
}
proc:xban $salon $victime $hand
}
# DCC
bind dcc - xban dcc:xban
proc dcc:xban {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set victime [lindex $arg 1]
if {$salon=="" || $victime=="" || ![string match *#* $salon] } {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xban <#salon> <host/p
seudo>"
return 0
}
proc:xban $salon $victime $nick
}
# Proc

proc proc:xban {salon victime by} {


global eva
if [string match *!*@*.* $victime] {
send ":$eva(serv) MODE $salon +b $victime"
sendlog "XBanned sur $salon sur $victime par $by"
putlog2 "Xban par $by : $victime sur $salon"
return 0
}
if [string match *@*.* $victime] {
send ":$eva(serv) MODE $salon +b *!$victime"
sendlog "XBanned sur $salon sur $victime par $by"
putlog2 "Xban par $by : $victime sur $salon"
return 0
}
if [string match *.* $victime] {
send ":$eva(serv) MODE $salon +b *!*@$victime"
sendlog "XBanned sur $salon sur $victime par $by"
putlog2 "Xban par $by : $victime sur $salon"
return 0
}
if ![string match *.* $victime] {
set eva(salonban) "$salon"
set eva(act) "3"
send ":$eva(nick) WHO $victime"
sendlog "XBanned sur $salon sur $victime par $by"
putlog2 "Xban par $by : $victime sur $salon"
return 0
}
if {$victime=="*"} {
set eva(salonban) "$salon"
sendlog "XBanned  $by  essay de bannir * (All) sur $salon - INTERDIT !"
putserv "NOTICE $by :Erreur: Vous n'tes pas autoris mettre ce ban !"
return 0
}
}
##############
#---Xunban---#
##############
# MSG
bind msg - xunban msg:xunban
proc msg:xunban {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set host [lindex $arg 1]
if {$salon=="" || $host=="" || ![string match *#* $salon] } {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xunban <#salon> <host>"
return 0
}
proc:xunban $salon $host $hand
}
# DCC

bind dcc - xunban dcc:xunban


proc dcc:xunban {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set host [lindex $arg 1]
if {$salon=="" || $host=="" || ![string match *#* $salon] } {
putdcc $idx "\2Utilisation:\2 xunban <#salon> <host>"
return 0
}
proc:xunban $salon $host $nick
}
# Proc
proc proc:xunban {salon host by} {
global eva
send ":$eva(serv) MODE $salon -b $host"
sendlog "XUnBanned sur $salon sur $host - par $by"
}
##############
#---Xtopic---#
##############
# MSG
bind msg - xtopic msg:xtopic
proc msg:xtopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set arg [debug $arg]
set salon [lindex $arg 0]
set topic [lrange $arg 1 end]
if {$salon=="" || $topic=="" || ![string match *#* $salon] } {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xtopic <#salon>
<topic>"
return 0
}
proc:xtopic $salon $hand $topic
}
# DCC
bind dcc - xtopic dcc:xtopic
proc dcc:xtopic {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set arg [debug $arg]
set salon [lindex $arg 0]

set topic [lrange $arg 1 end]


if {$salon=="" || $topic=="" || ![string match *#* $salon] } {
putdcc $idx "\2Utilisation:\2 xtopic <#salon> <topic>"
return 0
}
proc:xtopic $salon $nick $topic
}
# Proc
proc proc:xtopic {salon by topic} {
global eva
send ":$eva(nick) JOIN $salon"
send ":$eva(nick) MODE $salon x+o $eva(nick)"
send ":$eva(nick) TOPIC $salon :$topic"
sendlog "XTopic sur $salon - Topic: $topic - par $by"
putlog2 "Xtopic par $by : $salon ($topic)"
set eva(xpermclose) "[fread xpermclose.db]"
if {$salon!="$eva(chan)" && $salon!="$eva(chanbot)" && $salon!="$eva(soh
o)" && [isxclose $salon]!="1" && [isindb $eva(xpermclose) $salon]==-1} {send ":$
eva(nick) PART $salon"}
}
###################
#---Xclearmodes---#
###################
# MSG
bind msg - xclearmodes msg:xclearmodes
proc msg:xclearmodes {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon == "" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xclearmodes <#s
alon>"
return 0
}
proc:xclearmodes $salon $hand
}
# DCC
bind dcc - xclearmodes dcc:xclearmodes
proc dcc:xclearmodes {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon == "" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xclearmodes <#salon>"
return 0
}
proc:xclearmodes $salon $nick

}
# Proc
proc proc:xclearmodes {salon by} {
global eva
set eva(act) "4"
send ":$eva(serv) MODE $salon +b-imntsplkbcOCN *!*@* * *!*@*"
send ":$eva(nick) WHO $salon x"
sendlog "XClearModes sur $salon - par $by"
putlog2 "Xclearmodes par $by : $salon"
}
#################
#---Xhostkill---#
#################
# MSG
bind msg - xhostkill msg:xhostkill
proc msg:xhostkill {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set host [lindex $arg 0]
if {$host == ""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xhostkill <host
>"
return 0
}
if {[string match *@* $host]} {
send ":$eva(nick) NOTICE $nick :\2Merci de ne pas entrer d'Ident
"
return 0
}
proc:xhostkill $host $hand
}
# DCC
bind dcc - xhostkill dcc:xhostkill
proc dcc:xhostkill {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set host [lindex $arg 0]
if {$host == ""} {
putdcc $idx "\2Utilisation:\2 xhostkill <host>"
return 0
}
if {[string match *@* $host]} {
putdcc $idx "\2Merci de ne pas entrer d'ident"
return 0
}
proc:xhostkill $host $nick
}

# Proc
proc proc:xhostkill {host by} {
global eva
set eva(act) "5"
set eva(killeur) "$by"
send ":$eva(nick) WHO $host x"
sendlog "XHostKill sur $host - par $by"
putlog2 "XHostkill par $by : $host"
}
#############
#---Xkill---#
#############
# MSG
bind msg - xkill msg:xkill
proc msg:xkill {nick uhost hand arg} {
global eva hostclone
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set arg [debug $arg]
set pseudo [lindex $arg 0]
set raison [lrange $arg 1 end]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkill <pseudo>
<raison>"
return 0
}
if {$raison==""} { set raison "Gros vilain!" }
if ![info exists hostclone($pseudo)] {
send ":$eva(nick) NOTICE $nick :\2Nick non connect"
return 0
}
proc:xkill $pseudo $hand $raison
}
# DCC
bind dcc - xkill dcc:xkill
proc dcc:xkill {nick idx arg} {
global eva hostclone
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set arg [debug $arg]
set pseudo [lindex $arg 0]
set raison [lrange $arg 1 end]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xkill <pseudo> <raison>"
return 0
}
if {$raison==""} { set raison "Gros vilain!" }
if ![info exists hostclone($pseudo)] {
putdcc $idx "\2Nick non connect"

return 0
}
proc:xkill $pseudo $nick $raison
}
# Proc
proc proc:xkill {pseudo by raison} {
global eva hostclone xwho userserv
set pseudo [debug $pseudo]
set raison [debug $raison]
sendlog "XKilled sur $pseudo - Pour la raison: $raison - par $by"
kill $pseudo $by "$raison"
putlog2 "XKill par $by : $pseudo ($raison)"
}
##############
#---Xclose---#
##############
# MSG
bind msg - xclose msg:xclose
proc msg:xclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xclose <#salon>
"
return 0
}
proc:xclose $salon $hand
}
# DCC
bind dcc - xclose dcc:xclose
proc dcc:xclose {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xclose <#salon>"
return 0
}
proc:xclose $salon $nick
}
# Proc
proc proc:xclose {chan by} {
global eva
set eva(xpermclose) "[fread xpermclose.db]"

if {$chan=="$eva(chan)" || $chan=="$eva(chanbot)" || $chan=="$eva(soho)"


|| [isindb $eva(xpermclose) $chan]!=-1} {return 0}
set eva(act) "1"
send ":$eva(nick) JOIN $chan x"
sendlog "XClosed sur $chan - par $by"
send ":$eva(nick) MODE $chan +ov $eva(nick) $eva(nick)"
send ":$eva(nick) MODE $chan +ims"
send ":$eva(nick) TOPIC $chan :$eva(topic)"
send ":$eva(nick) WHO $chan"
xclose $chan
putlog2 "Xclose par $by : $chan"
}
#################
#---Xchankill---#
#################
# MSG
bind msg - xchankill msg:xchankill
proc msg:xchankill {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xchankill <#sal
on>"
return 0
}
proc:xchankill $salon $hand
}
# DCC
bind dcc - xchankill dcc:xchankill
proc dcc:xchankill {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xchankill <#salon>"
return 0
}
proc:xchankill $salon $nick
}
# Proc
proc proc:xchankill {chan by} {
global eva
set eva(xpermclose) "[fread xpermclose.db]"
if {$chan=="$eva(chan)" || $chan=="$eva(chanbot)" || $chan=="$eva(soho)"
|| [isindb $eva(xpermclose) $chan]!=-1} {return 0}
set eva(act) "6"

send ":$eva(nick) JOIN $chan"


sendlog "XChanKilled sur $chan - par $by"
send ":$eva(nick) MODE $chan +o $eva(nick)"
send ":$eva(nick) MODE $chan +ntsim"
send ":$eva(nick) TOPIC $chan :$eva(topic)"
send ":$eva(nick) WHO $chan"
xclose $chan
putlog2 "XChankill par $by : $chan"
}
#############
#---Xwall---#
#############
# MSG
bind msg - xwall msg:xwall
proc msg:xwall {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xwall <message>
"
return 0
}
proc:xwall $hand $msg
}
# DCC
bind dcc - xwall dcc:xwall
proc dcc:xwall {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
putdcc $idx "\2Utilisation:\2 xwall <message>"
return 0
}
proc:xwall $nick $msg
}
# Proc
proc proc:xwall {by msg} {
global eva
send ":$eva(nick) NOTICE $*.* :\2(Notice Global)\2 $msg - $by"
sendlog "XWall Message: $msg - par $by"
}
################
#---Xwallops---#
################

# MSG
bind msg - xwallops msg:xwallops
proc msg:xwallops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xwallops <messa
ge>"
return 0
}
proc:xwallops $hand $msg
}
# DCC
bind dcc - xwallops dcc:xwallops
proc dcc:xwallops {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
putdcc $idx "\2Utilisation:\2 xwallops <message>"
return 0
}
proc:xwallops $nick $msg
}
# Proc
proc proc:xwallops {by msg} {
global eva
send ":$eva(nick) WALLOPS :$msg - $by"
sendlog "XWallOps - Message: $msg - par $by"
}
#############
#---Xkick---#
#############
# MSG
bind msg - xkick msg:xkick
proc msg:xkick {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]

if {$salon=="" || $nick=="" || ![string match *#* $salon]} {


send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkick <#salon>
<nick> <raison>"
return 0
}
if {$raison==""} {set raison "Gros vilain!"}
proc:xkick $salon $pseudo $hand $raison
}
# DCC
bind dcc - xkick dcc:xkick
proc dcc:xkick {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$salon=="" || $nick=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkick <#salon>
<nick> <raison>"
return 0
}
if {$raison==""} {set raison "Gros vilain!"}
proc:xkick $salon $pseudo $nick $raison
}
# Proc
proc proc:xkick {chan nick by raison} {
global eva
send ":$eva(serv) KICK $chan $nick :$raison - $by"
sendlog "XKicked sur $chan sur $nick - Pour la raison: $raison - par $by"
putlog2 "XKick par $by : $nick sur $chan ($raison)"
}
################
#---Xkickban---#
################
# MSG
bind msg - xkickban msg:xkickban
proc msg:xkickban {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$salon=="" || $nick=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkickban <#salo
n> <nick> <raison>"
return 0

}
if {$raison==""} {set raison "Gros vilain!"}
proc:xkickban $salon $pseudo $hand $raison
}
# DCC
bind dcc - xkickban dcc:xkickban
proc dcc:xkickban {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$salon=="" || $nick=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkickban <#salo
n> <nick> <raison>"
return 0
}
if {$raison==""} {set raison "Gros vilain!"}
proc:xkickban $salon $pseudo $nick $raison
}
# Proc
proc proc:xkickban {salon
global eva
set eva(salonban)
set eva(act) "3"
send ":$eva(serv)
send ":$eva(nick)
sendlog "XKickBan
putlog2 "Xkickban
}

victime by raison} {
"$salon"
KICK $salon $victime :$raison - $by"
WHO $victime"
sur $salon sur $victime - Pour la raison: $raison - par $by"
par $by : $victime sur $salon ($raison)"

##################
#---Xlistclose---#
##################
# MSG
bind msg - xlistclose msg:xlistclose
proc msg:xlistclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {![info exists eva(closelist)] || $eva(closelist)==""} {
send ":$eva(nick) NOTICE $nick :\2Aucun salons ferm"
return 0
}
send ":$eva(nick) NOTICE $nick :\2Liste des salons ferm:"
foreach a $eva(closelist) {
send ":$eva(nick) NOTICE $nick :$a"
}
}

# DCC
bind dcc - xlistclose dcc:xlistclose
proc dcc:xlistclose {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
if {![info exists eva(closelist)] || $eva(closelist)==""} {
putdcc $idx "\2Aucun salons ferm!"
return 0
}
putdcc $idx "\2Liste des salons ferm:"
foreach a $eva(closelist) {
putdcc $idx "$a"
}
}
################
#---Xunclose---#
################
# MSG
bind msg - xunclose msg:xunclose
proc msg:xunclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xunclose <#salo
n>"
return 0
}
xopen $salon
sendlog "XUnClosed sur $salon - par $hand"
putlog2 "Xunclose par $hand : $salon"
}
# DCC
bind dcc - xunclose dcc:xunclose
proc dcc:xunclose {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xunclose <#salon>"
return 0
}
xopen $salon

sendlog "XUnClosed - Sur $salon par $nick"


putlog2 "Xunclose par $nick : $salon"
}
#################
#---Xinviteme---#
#################
# MSG
bind msg - xinviteme msg:xinviteme
proc msg:xinviteme {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {set pseudo "$nick"}
proc:xinviteme $pseudo $hand
}
# DCC
bind dcc - xinviteme dcc:xinviteme
proc dcc:xinviteme {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xinviteme <pseudo>"
return 0
}
proc:xinviteme $pseudo $nick
}
# Proc
proc proc:xinviteme {pseudo by} {
global eva
send ":$eva(nick) INVITE $pseudo $eva(chan)"
sendlog "XInviteMe sur $pseudo - par $by"
putlog2 "Xinviteme par $by : $pseudo"
}
###############
#---Xinvite---#
###############
# MSG
bind msg - xinvite msg:xinvite
proc msg:xinvite {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0

}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xinvite <nick>
<#salon>"
return 0
}
proc:xinvite $pseudo $salon $hand
}
# DCC
bind dcc - xinvite dcc:xinvite
proc dcc:xinvite {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xinvite <nick> <#salon>"
return 0
}
proc:xinvite $pseudo $salon $nick
}
# Proc
proc proc:xinvite {pseudo salon by} {
global eva
sendlog "XInvite sur $pseudo - Sur $salon - par $by"
send ":$eva(nick) INVITE $pseudo $salon"
putlog2 "Xinvite par $by : $pseudo sur $salon"
set eva(xpermclose) "[fread xpermclose.db]"
if {$salon!="$eva(chan)" && $salon!="$eva(chanbot)" && $salon!="$eva(soh
o)" && [isxclose $salon]!="1" && [isindb $eva(xpermclose) $salon]==-1} {send ":$
eva(nick) PART $salon"}
}
#################
#---Xopersend---#
#################
# MSG
bind msg - xopersend msg:xopersend
proc msg:xopersend {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xopersend <mess
age>"
return 0

}
proc:xopersend $hand $msg
}
# DCC
bind dcc - xopersend dcc:xopersend
proc dcc:xopersend {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
putdcc $idx "\2Utilisation:\2 xopersend <message>"
return 0
}
proc:xopersend $nick $msg
}
# Proc
proc proc:xopersend {by msg} {
global eva
if {![info exists eva(operlist)] || $eva(operlist)==""} {
return 0
}
foreach a $eva(operlist) {
send ":$eva(serv) NOTICE $a :$msg - $by"
}
sendlog "XOperSEND - Message: $msg - par $by"
}
#############
#---Xsecu---#
#############
# MSG
bind msg - xsecu msg:xsecu
proc msg:xsecu {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set raison [lrange $arg 0 end]
if {$raison==""} {set raison "inconnue"}
proc:xsecu $hand $raison
}
# DCC
bind dcc - xsecu dcc:xsecu
proc dcc:xsecu {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0

}
set raison [lrange $arg 0 end]
if {$raison==""} {set raison "inconnue"}
proc:xsecu $nick $raison
}
# Proc
proc proc:xsecu {by raison} {
global eva
sendlog "XScurit - Raison: $raison - par $by"
if {$eva(secu)=="on"} { return 0 }
set eva(secu) "on"
foreach a $eva(chanoff) {
send ":$eva(nick) JOIN $a"
send ":$eva(nick) MODE $a x+omis $eva(nick)"
send ":$eva(nick) PRIVMSG $a :4Les salons !Officiels! sont bloqus pour la r
aison: $raison - Par $by"
}
timer 1 secu2
timer 2 secuoff
}
proc secu2 {} {
global eva
foreach a $eva(chanoff) {
send ":$eva(nick) MODE $a -ms"
send ":$eva(nick) PRIVMSG $a :4Vous pouvez reprendre votre discution, le salon r
este partiellement bloqu aux utilisateurs!"
}
}
proc secuoff {} {
global eva
foreach a $eva(chanoff) {
send ":$eva(nick) PRIVMSG $a :4Fin de la Protection..."
send ":$eva(nick) MODE $a -i"
check_badchan $a
set eva(xpermclose) "[fread xpermclose.db]"
if {$a=="$eva(chan)" || $a=="$eva(chanbot)" || $a=="$eva(soho)" || [isxclose $
a]=="1" || [isindb $eva(xpermclose) $a]!=-1} {return 0}
send ":$eva(nick) PART $a"
}
set eva(secu) "off"
}
##################
#---Xnoconnect---#
##################
# MSG
bind msg - xnoconnect msg:xnoconnect
proc msg:xnoconnect {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
if {$eva(nocon)=="1"} {

set eva(nocon) "0"


putlog2 "Xnoconnect Dsactiv par $hand"
send ":$eva(nick) NOTICE $nick :\2No connect dsactiv!"
sendlog "XNoConnect --DESACTIVE-- par $hand"
return 0
}
if {$eva(nocon)=="0"} {
set eva(nocon) "1"
putlog2 "Xnoconnect Activ par $hand"
send ":$eva(nick) NOTICE $nick :\2No connect activ!"
sendlog "XNoConnect --ACTIVE-- par $hand"
return 0
}
}
# DCC
bind dcc - xnoconnect dcc:xnoconnect
proc dcc:xnoconnect {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
if {$eva(nocon)=="1"} {
set eva(nocon) "0"
putlog2 "Xnoconnect Dsactiv par $nick"
putdcc $idx "\2No connect Dsactiv!"
sendlog "XNoConnect --DESACTIVE-- par $nick"
return 0
}
if {$eva(nocon)=="0"} {
set eva(nocon) "1"
putdcc $idx "\2No connect Activ!"
putlog2 "Xnoconnect Activ par $nick"
sendlog "XNoConnect --ACTIVE-- par $nick"
return 0
}
}
############
#---Xwho---#
############
# MSG
bind msg - xwho msg:xwho
proc msg:xwho {nick uhost hand arg} {
global eva clone xwho
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set host [lindex $arg 0]
if {$host==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xwho <host/nick
>"
}
if {[string match *.* $host]} {
send ":$eva(nick) NOTICE $nick :Il y  $clone($host) de personne sur

$host ($xwho($host))"
sendlog "XWho sur $host - par $hand"
return 0
} else {
set eva(act) "7"
set eva(nick2) "$nick"
send ":$eva(nick) WHO $host x"
sendlog "XWho sur $host - par $hand"
}
}
# DCC
bind dcc - xwho dcc:xwho
proc dcc:xwho {nick idx arg} {
global eva clone xwho
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set host [lindex $arg 0]
if {$host==""} {
putdcc $idx "\2Utilisation:\2 xwho <host/nick>"
}
if {[string match *.* $host]} {
putdcc $idx "Il y  $clone($host) de personne sur $host - ($xwho($hos
t))"
sendlog "31 XWho 31 sur $host - par $nick"
return 0
} else {
set eva(act) "7bis"
set eva(idx2) "$idx"
send ":$eva(nick) WHO $host x"
sendlog "XWho sur $host - par $nick"
}
}
##############
#---Xwhois---#
##############
# MSG
bind msg - xwhois msg:xwhois
proc msg:xwhois {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xwhois <pseudo>
"
return 0
}
set eva(nick2) "$nick"
set eva(act) "8"
sendlog "XWhois sur $pseudo - par $hand"
send ":$eva(nick) WHOIS $pseudo"
}

# DCC
bind dcc - xwhois dcc:xwhois
proc dcc:xwhois {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xwhois <pseudo>"
return 0
}
set eva(idx2) "$idx"
set eva(act) "8bis"
sendlog "XWhois sur $pseudo - par $nick"
send ":$eva(nick) WHOIS $pseudo"
}
################
#---Xcollide---#
################
# MSG
bind msg - xcollide msg:xcollide
proc msg:xcollide {nick uhost hand arg} {
global eva hostclone
if {![isauth $nick] || ![matchattr $hand A]}
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick
o>"
return 0
}
if {![info exists hostclone($pseudo)]}
send ":$eva(nick) NOTICE $nick
connect"
return 0
}
proc:xcollide $pseudo $hand
}

:\2Utilisation:\2 xcollide <pseud

{
:\2Erreur:\2 Ce pseudo n'est pas

# DCC
bind dcc - xcollide dcc:xcollide
proc dcc:xcollide {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xcollide <pseudo>"

return 0
}
if {![info exists hostclone($pseudo)]} {
putdcc $idx "\2Erreur:\2 Ce pseudo n'est pas connect!"
return 0
}
proc:xcollide $pseudo $nick
}
# Proc
proc proc:xcollide {pseudo by} {
global eva
sendlog "XCollide sur $pseudo - par $by"
send ":$eva(serv) NICK $pseudo 1 1 xxx collide.diogene $eva(serv) :XColl
ider"
send ":$pseudo QUIT :Left IRC Server!"
putlog2 "Xcollide par $by : $pseudo"
}
##################
# Level IRCop: B #
##################
#############
#---Xjoin---#
#############
# MSG
bind msg - xjoin msg:xjoin
proc msg:xjoin {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xjoin <#salon>"
return 0
}
proc:xjoin $salon $hand
}
# DCC
bind dcc - xjoin dcc:xjoin
proc dcc:xjoin {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xjoin <#salon>"
return 0

}
proc:xjoin $salon $nick
}
# Proc
proc proc:xjoin {salon by} {
global eva
sendlog "XJoin - EVA sur $salon - par $by"
send ":$eva(nick) JOIN $salon"
send ":$eva(nick) MODE $salon +o $eva(nick)"
putlog2 "Xjoin par $by : sur $salon"
}
#############
#---Xpart---#
#############
# MSG
bind msg - xpart msg:xpart
proc msg:xpart {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xpart <#salon>"
return 0
}
if {[isxclose $salon]} {
send ":$eva(nick) NOTICE $nick :\2Erreur:\2 Salon XClose!"
return 0
}
proc:xpart $salon $hand
}
# DCC
bind dcc - xpart dcc:xpart
proc dcc:xpart {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xpart <#salon>"
return 0
}
if {[isxclose $salon]} {
putdcc $idx "\2Erreur:\2 Ce salon est xclose!"
return 0
}
proc:xpart $salon $nick

}
# Proc
proc proc:xpart {salon by} {
global eva
set eva(xpermclose) "[fread xpermclose.db]"
if {$salon!="$eva(chan)" && $salon!="$eva(chanbot)" && $salon!="$eva(soh
o)" && [isxclose $salon]!="1" && [isindb $eva(xpermclose) $salon]==-1} {send ":$
eva(nick) PART $salon"}
sendlog "XPart - EVA sur $salon - par $by"
putlog2 "XPart par $by : de $salon"
}
################
#---Xsvsnick---#
################
# MSG
bind msg - xsvsnick msg:xsvsnick
proc msg:xsvsnick {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
set newpseudo [lindex $arg 1]
if {$pseudo=="" || $newpseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsvsnick <nick>
<new-nick>"
return 0
}
proc:xsvsnick $pseudo $newpseudo $hand
}
# DCC
bind dcc - xsvsnick dcc:xsvsnick
proc dcc:xsvsnick {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set newpseudo [lindex $arg 1]
if {$pseudo=="" || $newpseudo==""} {
putdcc $idx "\2Utilisation:\2 xsvsnick <nick> <new-nick>"
return 0
}
proc:xsvsnick $pseudo $newpseudo $nick
}
# Proc
proc proc:xsvsnick {nick newnick by} {

global eva
sendlog "XSvsNick sur $nick - En: $newnick - par $by"
send ":$eva(nick) SVSNICK $nick $newnick"
putlog2 "Xsvsnick par $by : $nick en $newnick"
}
################
#---Xkickall---#
################
# MSG
bind msg - xkickall msg:xkickall
proc msg:xkickall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xkickall #salon
"
return 0
}
proc:xkickall $salon $hand
}
# DCC
bind dcc - xkickall dcc:xkickall
proc dcc:xkickall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xkickall #salon"
return 0
}
proc:xkickall $salon $nick
}
# Proc
proc proc:xkickall {salon
global eva
sendlog "XKickAll
set eva(act) "9"
send ":$eva(nick)
putlog2 "Xkickall
}
##############
#---Xopall---#
##############

by} {
sur $salon - par $by"
WHO $salon x"
par $by : sur $salon"

# MSG
bind msg - xopall msg:xopall
proc msg:xopall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xopall #salon"
return 0
}
proc:xopall $salon $hand
}
# DCC
bind dcc - xopall dcc:xopall
proc dcc:xopall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xopall #salon"
return 0
}
proc:xopall $salon $nick
}
# Proc
proc proc:xopall {salon by} {
global eva
set eva(act) "10"
sendlog "XOpAll sur $salon - par $by"
send ":$eva(nick) WHO $salon x"
putlog2 "Xopall par $by : sur $salon"
}
################
#---Xdeopall---#
################
# MSG
bind msg - xdeopall msg:xdeopall
proc msg:xdeopall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0

}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xdeopall #salon
"
return 0
}
proc:xdeopall $salon $hand
}
# DCC
bind dcc - xdeopall dcc:xdeopall
proc dcc:xdeopall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xdeopall #salon"
return 0
}
proc:xdeopall $salon $nick
}
# Proc
proc proc:xdeopall {salon
global eva
set eva(act) "11"
sendlog "XDeopAll
send ":$eva(nick)
putlog2 "Xdeopall
}

by} {
sur $salon - par $by"
WHO $salon"
par $by : sur $salon"

#################
#---Xvoiceall---#
#################
# MSG
bind msg - xvoiceall msg:xvoiceall
proc msg:xvoiceall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xvoiceall #salo
n"
return 0
}
proc:xvoiceall $salon $hand
}

# DCC
bind dcc - xvoiceall dcc:xvoiceall
proc dcc:xvoiceall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xvoiceall #salon"
return 0
}
proc:xvoiceall $salon $nick
}
# Proc
proc proc:xvoiceall {salon by} {
global eva
set eva(act) "12"
sendlog "XVoiceAll sur $salon - par $by"
send ":$eva(nick) WHO $salon"
putlog2 "Xvoiceall par $by : sur $salon"
}
###################
#---Xdevoiceall---#
###################
# MSG
bind msg - xdevoiceall msg:xdevoiceall
proc msg:xdevoiceall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xdevoiceall #sa
lon"
return 0
}
proc:xdevoiceall $salon $hand
}
# DCC
bind dcc - xdevoiceall dcc:xdevoiceall
proc dcc:xdevoiceall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick

return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xdevoiceall #salon"
return 0
}
proc:xdevoiceall $salon $nick
}
# Proc
proc proc:xdevoiceall {salon by} {
global eva
set eva(act) "13"
sendlog "XDevoiceAll sur $salon - par $by"
send ":$eva(nick) WHO $salon"
putlog2 "Xdevoiceall par $by : sur $salon"
}
######################################
#---Xcleargline---##---Xunglineall---#
######################################
# MSG
bind msg - xunglineall msg:xcleargline
bind msg - xcleargline msg:xcleargline
proc msg:xcleargline {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
proc:xcleargline $hand
}
# DCC
bind dcc - xunglineall dcc:xcleargline
bind dcc - xcleargline dcc:xcleargline
proc dcc:xcleargline {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
proc:xcleargline $nick
}
# Proc
proc proc:xcleargline {by} {
global eva
set eva(act) "14"
sendlog "XClearGlines par $by"
send ":$eva(nick) STATS G"
putlog2 "Xcleargline par $by"

}
###############
#---Xnotice---#
###############
# MSG
bind msg - xnotice msg:xnotice
proc msg:xnotice {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xnotice <nick/s
alon> <message>"
return 0
}
proc:xnotice $to $hand $msg
}
# DCC
bind dcc - xnotice dcc:xnotice
proc dcc:xnotice {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
putdcc $idx "\2Utilisation:\2 xnotice <nick/salon> <message>"
return 0
}
proc:xnotice $to $nick $msg
}
# Proc
proc proc:xnotice {to by msg} {
global eva
send ":$eva(nick) NOTICE $to :$msg"
sendlog "XNotice  $msg - A $to - par $by"
}
################
#---Xsnotice---#
################
# MSG
bind msg - xsnotice msg:xsnotice

proc msg:xsnotice {nick uhost hand arg} {


global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsnotice <nick/
salon> <message>"
return 0
}
proc:xsnotice $to $hand $msg
}
# DCC
bind dcc - xsnotice dcc:xsnotice
proc dcc:xsnotice {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
putdcc $idx "\2Utilisation:\2 xsnotice <nick/salon> <message>"
return 0
}
proc:xsnotice $to $nick $msg
}
# Proc
proc proc:xsnotice {to by msg} {
global eva
send ":$eva(serv) NOTICE $to :$msg"
sendlog "XNotice  $msg - A $to - par $by"
}
############
#---Xsay---#
############
# MSG
bind msg - xsay msg:xsay
proc msg:xsay {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]

if {$to=="" || $msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsay <nick/salo
n> <message>"
return 0
}
proc:xsay $to $hand $msg
}
# DCC
bind dcc - xsay dcc:xsay
proc dcc:xsay {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
putdcc $idx "\2Utilisation:\2 xsay <nick/salon> <message>"
return 0
}
proc:xsay $to $nick $msg
}
# Proc
proc proc:xsay {to by msg} {
global eva
send ":$eva(nick) PRIVMSG $to :$msg"
sendlog "XSays Message $msg - A $to - par $by"
}
############
#---Xact---#
############
# MSG
bind msg - xact msg:xact
proc msg:xact {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xact <nick/salo
n> <message>"
return 0
}
proc:xact $to $hand $msg
}
# DCC

bind dcc - xact dcc:xact


proc dcc:xact {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set to [lindex $arg 0]
set msg [lrange $arg 1 end]
if {$to=="" || $msg==""} {
putdcc $idx "\2Utilisation:\2 xact <nick/salon> <message>"
return 0
}
proc:xact $to $nick $msg
}
# Proc
proc proc:xact {to by msg} {
global eva
send ":$eva(nick) PRIVMSG $to :ACTION $msg"
sendlog "XActions - Message $msg - A $to - par $by"
}
##############
#---Xpurge---#
##############
# MSG
bind msg - xpurge msg:xpurge
proc msg:xpurge {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
proc:xpurge $hand
}
# DCC
bind dcc - xpurge dcc:xpurge
proc dcc:xpurge {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
proc:xpurge $nick
}
# Proc
proc proc:xpurge {by} {
global eva

sendlog "XPurge par $by"


foreach x $eva(closelist) {
send ":$eva(nick) PART $x :Rouverture du salon!"
}
set eva(closelist) ""
putlog2 "Xpurge par $by"
}
###############
#---Xsajoin---#
###############
# MSG
bind msg - xsajoin msg:xsajoin
proc msg:xsajoin {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || ![string match *#* $salon] || $pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsajoin <nick>
<#salon>"
return 0
}
proc:xsajoin $pseudo $salon $hand
}
# DCC
bind dcc - xsajoin dcc:xsajoin
proc dcc:xsajoin {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || ![string match *#* $salon] || $pseudo==""} {
putdcc $idx "\2Utilisation:\2 xsajoin <nick> <#salon>"
return 0
}
proc:xsajoin $pseudo $salon $nick
}
# Proc
proc proc:xsajoin {pseudo chan by} {
global eva
sendlog "XSvsJoin sur $pseudo - Sur $chan - par $by"
send ":$eva(nick) SAJOIN $pseudo $chan"
putlog2 "Xsajoin par $by : $pseudo sur $chan"
}

##################
#---Xsajoinall---#
##################
# MSG
bind msg - xsajoinall msg:xsajoinall
proc msg:xsajoinall {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsajoinall <#sa
lon>"
return 0
}
proc:xsajoinall $salon $hand
}
# DCC
bind dcc - xsajoinall dcc:xsajoinall
proc dcc:xsajoinall {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
if {$salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xsajoinall <#salon>"
return 0
}
proc:xsajoinall $salon $nick
}
# Proc
proc proc:xsajoinall {chan by} {
global eva
sendlog "XSvsJoinAll Sur $chan - par $by"
set eva(salonsajoin) "$chan"
set eva(act) "15"
send ":$eva(nick) WHO * x"
putlog2 "Xsajoinall par $by : sur $chan"
}
###############
#---Xsapart---#
###############
# MSG
bind msg - xsapart msg:xsapart
proc msg:xsapart {nick uhost hand arg} {

global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || ![string match *#* $salon] || $pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsapart <nick>
<#salon>"
return 0
}
proc:xsapart $pseudo $salon $hand
}
# DCC
bind dcc - xsapart dcc:xsapart
proc dcc:xsapart {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$salon=="" || ![string match *#* $salon] || $pseudo==""} {
putdcc $idx "\2Utilisation:\2 xsapart <nick> <#salon>"
return 0
}
proc:xsapart $pseudo $salon $nick
}
# Proc
proc proc:xsapart {pseudo chan by} {
global eva
sendlog "XSvsPart sur $pseudo - Sur $chan - par $by"
send ":$eva(nick) SAPART $pseudo $chan"
putlog2 "Xsapart par $by : $pseudo de $chan"
}
############
#---Xraw---#
############
# MSG
bind msg - xraw msg:xraw
proc msg:xraw {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set raw [lrange $arg 0 end]
if {$raw==""} {

send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xraw <raw>"


return 0
}
proc:xraw $hand $raw
}
# DCC
bind dcc - xraw dcc:xraw
proc dcc:xraw {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set raw [lrange $arg 0 end]
if {$raw==""} {
putdcc $idx "\2Utilisation:\2 xraw <raw>"
return 0
}
proc:xraw $nick $raw
}
# Proc
proc proc:xraw {by raw} {
global eva
if {$eva(coderz)=="0"} {return 0}
sendlog "XRaws - $raw - par $by"
send ":$raw"
putlog2 "Xraw par $by : $raw"
}
##############
#---Xclone---#
##############
# MSG
bind msg - +xclone msg:+xclone
proc msg:+xclone {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
set ident [lindex $arg 1]
set host [lindex $arg 2]
set realname [lrange $arg 3 end]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xclone <pseudo
> <ident> <host> <realname>"
return 0
}
if {$ident=="" || $ident=="-"} {
set randomident 0
while {$randomident<100} {

set randomident [rand 999]


}
set ident "v$randomident"
}
if {$host=="" || $host=="-"} {
set xclone(host) "abo.wanadoo.fr ipt.aol.com adsl.proxad.net ppp.tiscali
.fr adsl.skynet.be"
set xclone(fai) [lindex $xclone(host) [rand [llength $xclone(host)]]]
set randomhost 0
while {$randomhost<100} {
set randomhost [rand 999]
}
set host "$randomhost.$xclone(fai)"
}
if {$realname=="" || $realname=="-"} {
set realname "Mozilla/4.0 (compatible; MSIE 6.0; Window"
}
proc:+xclone $pseudo $ident $host $hand $realname
}
# DCC
bind dcc - +xclone dcc:+xclone
proc dcc:+xclone {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set ident [lindex $arg 1]
set host [lindex $arg 2]
set realname [lrange $arg 3 end]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 +xclone <pseudo> <ident> <host> <r
ealname>"
return 0
}
if {$ident=="" || $ident=="-"} {
set randomident 0
while {$randomident<100} {
set randomident [rand 999]
}
set ident "v$randomident"
}
if {$host=="" || $host=="-"} {
set xclone(host) "abo.wanadoo.fr ipt.aol.com adsl.proxad.net ppp.tiscali
.fr adsl.skynet.be"
set xclone(fai) [lindex $xclone(host) [rand [llength $xclone(host)]]]
set randomhost 0
while {$randomhost<100} {
set randomhost [rand 999]
}
set host "$randomhost.$xclone(fai)"
}
if {$realname=="" || $realname=="-"} {
set realname "Mozilla/4.0 (compatible; MSIE 6.0; Window"
}
proc:+xclone $pseudo $ident $host $nick $realname

}
# Proc
proc proc:+xclone {pseudo ident host by name} {
global eva
sendlog "+XClones sur $pseudo - Host $ident@$host - Realname $name - par $by"
lappend eva(listexclones) $pseudo
putdcc $eva(idx) ":$eva(serv) NICK $pseudo 1 1 $ident $host $eva(serv) :
$name"
putdcc $eva(idx) ":$pseudo MODE $pseudo +xi"
putdcc $eva(idx) ":$pseudo JOIN $eva(chan)"
return 0
}
# MSG
bind msg - -xclone msg:-xclone
proc msg:-xclone {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xclone <pseud
o>"
return 0
}
proc:-xclone $pseudo $hand
}
# DCC
bind dcc - -xclone dcc:-xclone
proc dcc:-xclone {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 -xclone <pseudo>"
return 0
}
proc:-xclone $pseudo $nick
}
# Proc
proc proc:-xclone {pseudo by} {
global eva
sendlog "-XClones sur $pseudo - par $by"
set eva(newlistexclones) ""
foreach prout $eva(listexclones) {
if {$prout != "$pseudo"} {lappend eva(newlistexclones) $prout}

}
set eva(listexclones) $eva(newlistexclones)
putdcc $eva(idx) ":$pseudo QUIT :Dconnexion forc par $by"
}
# MSG
bind msg - xclone msg:xclone
proc msg:xclone {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
if {$eva(listexclones)=="" || ![info exists eva(listexclones)]} {
send ":$eva(nick) NOTICE $nick :\2Aucun XClones connect"
return 0
} else {
send ":$eva(nick) NOTICE $nick \2Liste des XClones:"
foreach x $eva(listexclones) {
send ":$eva(nick) NOTICE $nick $x"
}
}
}
# DCC
bind dcc - xclone dcc:xclone
proc dcc:xclone {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
if {$eva(listexclones)=="" || ![info exists eva(listexclones)]} {
putdcc $idx "\002Aucun XClones connect!"
return 0
} else {
putdcc $idx "\002Liste des xclones:"
foreach x $eva(listexclones) {
putdcc $idx "$x"
}
}
}
#############
#---Xmove---#
#############
# MSG
bind msg - xmove msg:xmove
proc msg:xmove {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0

}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$pseudo=="" || $salon=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xmove <pseudo>
<#salon>"
return 0
}
if {[lsearch -exact "$eva(listexclones)" $pseudo] != -1} {
send ":$pseudo JOIN $salon"
sendlog "XMove sur $pseudo - Sur $salon - par $hand"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\2Pseudo XClone inexistant!"
return 0
}
}
# DCC
bind dcc - xmove dcc:xmove
proc dcc:xmove {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$pseudo=="" || $salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xmove <pseudo> <#salon>"
return 0
}
if {[lsearch -exact "$eva(listexclones)" $pseudo] != -1} {
send ":$pseudo JOIN $salon"
sendlog "XMove sur $pseudo - Sur $salon - par $nick"
return 0
} else {
putdcc $idx "\2Pseudo XClone inexistant!"
return 0
}
}
#############
#---Xsort---#
#############
# MSG
bind msg - xsort msg:xsort
proc msg:xsort {nick uhost hand arg} {
global eva
set arg [debug $arg]
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]

if {$pseudo=="" || $salon=="" || ![string match *#* $salon]} {


send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsort <pseudo>
<#salon>"
return 0
}
if {[lsearch -exact "$eva(listexclones)" $pseudo] != -1} {
send ":$pseudo PART $salon"
sendlog "XSort sur $pseudo - Sur $salon - par $hand"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\2Pseudo XClone inexistant"
return 0
}
}
# DCC
bind dcc - xsort dcc:xsort
proc dcc:xsort {nick idx arg} {
global eva
set arg [debug $arg]
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
set salon [lindex $arg 1]
if {$pseudo=="" || $salon=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 xsort <pseudo> <#salon>"
return 0
}
if {[lsearch -exact "$eva(listexclones)" $pseudo] != -1} {
send ":$pseudo PART $salon"
sendlog "XSort sur $pseudo - Sur $salon - par $nick"
return 0
} else {
putdcc $idx "\2Pseudo XClone inexistant"
return 0
}
}
################
#---Autorise---#
################
# Dcc
bind dcc - +autorise dcc:+autorise
proc dcc:+autorise {nick idx arg} {
global eva
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+autorise <nick>"
return 0
}
set eva(autorise) "[fread autorise.db]"

if {[lsearch -exact "x $eva(autorise)" "$temp"] == -1 } {


lappend eva(autorise) $temp
fwrite autorise.db $eva(autorise)
putdcc $idx "\002$temp ajout a la liste des autorises"
sendlog "+XAutorise sur $temp - par $nick"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des autorises"
return 0
}
}
bind dcc - -autorise dcc:-autorise
proc dcc:-autorise {nick idx arg} {
global eva
if {![matchattr $nick B]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-autorise <nick>"
return 0
}
set eva(autorise) "[fread autorise.db]"
set tmp ""
foreach bb $eva(autorise) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite autorise.db $tmp
putdcc $idx "\002$temp supprim de la liste des autorises"
sendlog "-XAutorise sur $temp - par $nick"
return 0
}
bind dcc - autorise dcc:autorise
proc dcc:autorise {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(autorise) "[fread autorise.db]"
if {$eva(autorise)==""} {
putdcc $idx "\002Aucun autorises\002"
return 0
}
putdcc $idx "\002Liste des autorises:\002"
foreach a $eva(autorise) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +autorise msg:+autorise
proc msg:+autorise {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand B]} {

avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +autorise <nick>"
return 0
}
set eva(autorise) "[fread autorise.db]"
if {[lsearch -exact "x $eva(autorise)" "$temp"] == -1 } {
lappend eva(autorise) $temp
fwrite autorise.db $eva(autorise)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des autorises"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es autorises"
return 0
}
}
bind msg - -autorise msg:-autorise
proc msg:-autorise {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand B]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -autorise <nick>"
return 0
}
set eva(autorise) "[fread autorise.db]"
set tmp ""
foreach bb $eva(autorise) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite autorise.db $tmp
set eva(autorise) "$tmp"
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des autoris
es"
return 0
}
bind msg - autorise msg:autorise
proc msg:autorise {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(autorise) "[fread autorise.db]"
if {$eva(autorise)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun autorises\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des autorises:\002"
foreach a $eva(autorise) {
send ":$eva(nick) NOTICE $nick :$a"

}
return 0
}
##################
# Level Admin: C #
##################
################
#---Xsuspend---#
################
# Msg
bind msg - xsuspend msg:xsuspend
proc msg:xsuspend {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xsuspend <hand>
"
return 0
}
if {![validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :\2Utilisateur inconnu!"
return 0
}
chattr $pseudo -p
setuser $pseudo XTRA suspend 1
send ":$eva(nick) NOTICE $nick :\2$pseudo\2 est maintenant suspendu"
}
# DCC
bind dcc - xsuspend dcc:xsuspend
proc dcc:xsuspend {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xsuspend <hand>"
return 0
}
if {![validuser $pseudo]} {
putdcc $idx "\2Utilisateur inconnu!"
return 0
}
chattr $pseudo -p
setuser $pseudo XTRA suspend 1
putdcc $idx "\2$pseudo\2 est maintenant suspendu"
sendlog "+XSuspend sur $pseudo  bien t suspendu par $by"
}
##################

#---Xunsuspend---#
##################
# Msg
bind msg - xunsuspend msg:xunsuspend
proc msg:xunsuspend {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 xunsuspend <han
d>"
return 0
}
if {![validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :\2Utilisateur inconnu!"
return 0
}
chattr $pseudo +p
setuser $pseudo XTRA suspend 0
send ":$eva(nick) NOTICE $nick :\2$pseudo\2 n'est maintenant plus suspen
du"
}
# DCC
bind dcc - xunsuspend dcc:xunsuspend
proc dcc:xunsuspend {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set pseudo [lindex $arg 0]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 xunsuspend <hand>"
return 0
}
if {![validuser $pseudo]} {
putdcc $idx "\2Utilisateur inconnu!"
return 0
}
chattr $pseudo +p
setuser $pseudo XTRA suspend 0
putdcc $idx "\2$pseudo\2 n'est maintenant plus suspendu"
sendlog "-XSuspend sur $pseudo  n'est plus suspendu par $by"
}
################
#---Xconnect---#
################
# Msg
bind msg - xconnect msg:xconnect
proc msg:xconnect {nick uhost hand arg} {

global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
if ![catch {connect $eva(link) $eva(port)} eva(idx)] {
send ":$eva(nick) NOTICE $nick :\002Connection $eva(info) \002"
proc:xconnect
} else {send ":$eva(nick) NOTICE $nick :\2Connection de $eva(serv) $eva(idx) i
mpossible."}
}
# Dcc
bind dcc - xconnect dcc:xconnect
proc dcc:xconnect {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
if ![catch {connect $eva(link) $eva(port)} eva(idx)] {
putdcc $idx "\002Connection $eva(info) \002"
proc:xconnect
} else {putdcc $idx "\2Connection de $eva(serv) $eva(idx) impossible."}
}
# Proc
proc proc:xconnect {} {
global eva uptime clone hostclone userserv tempchan
if [info exists clone] {unset clone}
if [info exists userserv] {unset userserv}
if [info exists hostclone] {unset hostclone}
if [info exists xwho] {unset xwho}
if [info exists tempchan] {unset tempchan}
set eva(operlist) ""
set eva(closelist) ""
set eva(servs) ""
set eva(nocon) "0"
set eva(secu) "off"
set eva(listexclones) ""
set eva(idx) [connect $eva(link) $eva(port)]
send "PASS $eva(pass)"
send "SERVER $eva(serv) 1 [unixtime] [unixtime] J09 :$eva(info)"
control $eva(idx) eva_event
coneva
utimer 30 check_connect
return 1
}
###############
#---Welcome---#
###############
# Msg
bind msg - welcome msg:welcome
proc msg:welcome {nick uhost hand arg} {
global eva botnick

if {![isauth $nick] || ![matchattr $hand C]} {


avertmsg $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 welcome <messag
e>"
return 0
}
proc:welcome $msg
}
# Dcc
bind dcc - welcome dcc:welcome
proc dcc:welcome {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set msg [lrange $arg 0 end]
if {$msg==""} {
putdcc $idx "\2Utilisation:\2 welcome <message>"
return 0
}
proc:welcome $msg
}
# Proc
proc proc:welcome {msg} {
global welcome
fwrite welcome.db $msg
}
###############
#---BadChan---#
###############
# Dcc
bind dcc - +badchan dcc:+badchan
proc dcc:+badchan {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+badchan <#salon>"
return 0
}
set eva(badchan) "[fread badchan.db]"
if {[lsearch -exact "x $eva(badchan)" "$temp"] == -1 } {
lappend eva(badchan) $temp
fwrite badchan.db $eva(badchan)
putdcc $idx "\002$temp ajout a la liste des badchans"

sendlog "+XBadChan  $temp  t ajout dans la liste des BadChans - Par $by"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des badchans"
return 0
}
}
bind dcc - -badchan dcc:-badchan
proc dcc:-badchan {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-badchan <#salon>"
return 0
}
set eva(badchan) "[fread badchan.db]"
set tmp ""
foreach bb $eva(badchan) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite badchan.db $tmp
putdcc $idx "\002$temp supprim de la liste des badchans"
sendlog "-XBadChan  $temp  t supprim des BadChans - Par $by"
return 0
}
bind dcc - badchan dcc:badchan
proc dcc:badchan {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(badchan) "[fread badchan.db]"
if {$eva(badchan)==""} {
putdcc $idx "\002Aucun badchans\002"
return 0
}
putdcc $idx "\002Liste des badchans:\002"
foreach a $eva(badchan) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +badchan msg:+badchan
proc msg:+badchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]

if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +badchan <#salon>"
return 0
}
set eva(badchan) "[fread badchan.db]"
if {[lsearch -exact "x $eva(badchan)" "$temp"] == -1 } {
lappend eva(badchan) $temp
fwrite badchan.db $eva(badchan)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des badchans"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es badchans"
return 0
}
}
bind msg - -badchan msg:-badchan
proc msg:-badchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -badchan <#salon>"
return 0
}
set eva(badchan) "[fread badchan.db]"
set tmp ""
foreach bb $eva(badchan) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite badchan.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des badchan
s"
return 0
}
bind msg - badchan msg:badchan
proc msg:badchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(badchan) "[fread badchan.db]"
if {$eva(badchan)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun badchans\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des badchans:\002"
foreach a $eva(badchan) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
##################

#---ExcBadChan---#
##################
# Dcc

bind dcc - +excbadchan dcc:+excbadchan


proc dcc:+excbadchan {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+excbadchan <#salon>"
return 0
}
set eva(excbadchan) "[fread excbadchan.db]"
if {[lsearch -exact "x $eva(excbadchan)" "$temp"] == -1 } {
lappend eva(excbadchan) $temp
fwrite excbadchan.db $eva(excbadchan)
putdcc $idx "\002$temp ajout a la liste des excbadchans"
sendlog "-XExcBadChans  $temp  t Ajout la liste des Expesions BadChans - Par
by"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des excbadchans"
return 0
}
}
bind dcc - -excbadchan dcc:-excbadchan
proc dcc:-excbadchan {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-excbadchan <#salon>"
return 0
}
set eva(excbadchan) "[fread excbadchan.db]"
set tmp ""
foreach bb $eva(excbadchan) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite excbadchan.db $tmp
putdcc $idx "\002$temp supprim de la liste des excbadchans"
return 0
}
bind dcc - excbadchan dcc:excbadchan
proc dcc:excbadchan {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}

set eva(excbadchan) "[fread excbadchan.db]"


if {$eva(excbadchan)==""} {
putdcc $idx "\002Aucun excbadchans\002"
return 0
}
putdcc $idx "\002Liste des excbadchans:\002"
foreach a $eva(excbadchan) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +excbadchan msg:+excbadchan
proc msg:+excbadchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +excbadchan <#salon>"
return 0
}
set eva(excbadchan) "[fread excbadchan.db]"
if {[lsearch -exact "x $eva(excbadchan)" "$temp"] == -1 } {
lappend eva(excbadchan) $temp
fwrite excbadchan.db $eva(excbadchan)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des excbadchan
s"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es excbadchans"
return 0
}
}
bind msg - -excbadchan msg:-excbadchan
proc msg:-excbadchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -excbadchan <#salon>"
return 0
}
set eva(excbadchan) "[fread excbadchan.db]"
set tmp ""
foreach bb $eva(excbadchan) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite excbadchan.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des excbadc
hans"

return 0
}
bind msg - excbadchan msg:excbadchan
proc msg:excbadchan {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(excbadchan) "[fread excbadchan.db]"
if {$eva(excbadchan)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun excbadchans\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des excbadchans:\002"
foreach a $eva(excbadchan) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
##############
#---Xtrust---#
##############
# Dcc
bind dcc - +xtrust dcc:+xtrust
proc dcc:+xtrust {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp=="" || [string match *@* $temp]} {
putdcc $idx "\2Utilisation:\2 .+xtrust <host>"
return 0
}
set eva(xtrust) "[fread xtrust.db]"
if {[lsearch -exact "x $eva(xtrust)" "$temp"] == -1 } {
lappend eva(xtrust) $temp
fwrite xtrust.db $eva(xtrust)
putdcc $idx "\002$temp ajout a la liste des xtrusts"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des XTrusts"
return 0
}
}
bind dcc - -xtrust dcc:-xtrust
proc dcc:-xtrust {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]

if {$temp=="" || [string match *@* $temp]} {


putdcc $idx "\2Utilisation:\2 .-xtrust <host>"
return 0
}
set eva(xtrust) "[fread xtrust.db]"
set tmp ""
foreach bb $eva(xtrust) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xtrust.db $tmp
set eva(xtrust) "$tmp"
putdcc $idx "\002$temp supprim de la liste des xtrusts"
return 0
}
bind dcc - xtrust dcc:xtrust
proc dcc:xtrust {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xtrust) "[fread xtrust.db]"
if {$eva(xtrust)==""} {
putdcc $idx "\002Aucun xtrusts\002"
return 0
}
putdcc $idx "\002Liste des xtrusts:\002"
foreach a $eva(xtrust) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xtrust msg:+xtrust
proc msg:+xtrust {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp=="" || [string match *@* $temp]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xtrust <host>"
return 0
}
set eva(xtrust) "[fread xtrust.db]"
if {[lsearch -exact "x $eva(xtrust)" "$temp"] == -1 } {
lappend eva(xtrust) $temp
fwrite xtrust.db $eva(xtrust)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xtrusts"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xtrusts"
return 0
}
}

bind msg - -xtrust msg:-xtrust


proc msg:-xtrust {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp=="" || [string match *@* $temp]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xtrust <host>"
return 0
}
set eva(xtrust) "[fread xtrust.db]"
set tmp ""
foreach bb $eva(xtrust) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xtrust.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xtrusts
"
return 0
}
bind msg - xtrust msg:xtrust
proc msg:xtrust {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xtrust) "[fread xtrust.db]"
if {$eva(xtrust)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xtrusts\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xtrusts:\002"
foreach a $eva(xtrust) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
###############
#---Chanoff---#
###############
# Dcc
bind dcc - +chanoff dcc:+chanoff
proc dcc:+chanoff {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+chanoff <#salon>"
return 0

}
set eva(chanoff) "[fread chanoff.db]"
if {[lsearch -exact "x $eva(chanoff)" "$temp"] == -1 } {
lappend eva(chanoff) $temp
fwrite chanoff.db $eva(chanoff)
putdcc $idx "\002$temp ajout a la liste des chanoffs"
sendlog "+XChanOfficiels  $temp  t ajout comme salon !Officiel! - Par $by"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des chanoffs"
return 0
}
}
bind dcc - -chanoff dcc:-chanoff
proc dcc:-chanoff {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-chanoff <#salon>"
return 0
}
set eva(chanoff) "[fread chanoff.db]"
set tmp ""
foreach bb $eva(chanoff) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite chanoff.db $tmp
putdcc $idx "\002$temp supprim de la liste des chanoffs"
sendlog "-XChanOfficiels  $temp  t supprim comme salon !Officiel! - Par $by"
return 0
}
bind dcc - chanoff dcc:chanoff
proc dcc:chanoff {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(chanoff) "[fread chanoff.db]"
if {$eva(chanoff)==""} {
putdcc $idx "\002Aucun chanoffs\002"
return 0
}
putdcc $idx "\002Liste des chanoffs:\002"
foreach a $eva(chanoff) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +chanoff msg:+chanoff
proc msg:+chanoff {nick uhost hand arg} {

global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +chanoff <#salon>"
return 0
}
set eva(chanoff) "[fread chanoff.db]"
if {[lsearch -exact "x $eva(chanoff)" "$temp"] == -1 } {
lappend eva(chanoff) $temp
fwrite chanoff.db $eva(chanoff)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des chanoffs"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es chanoffs"
return 0
}
}
bind msg - -chanoff msg:-chanoff
proc msg:-chanoff {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -chanoff <#salon>"
return 0
}
set eva(chanoff) "[fread chanoff.db]"
set tmp ""
foreach bb $eva(chanoff) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite chanoff.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des chanoff
s"
return 0
}
bind msg - chanoff msg:chanoff
proc msg:chanoff {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(chanoff) "[fread chanoff.db]"
if {$eva(chanoff)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun chanoffs\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des chanoffs:\002"
foreach a $eva(chanoff) {

send ":$eva(nick) NOTICE $nick :$a"


}
return 0
}
##############
#---Xnoops---#
##############
# Dcc
bind dcc - +xnoops dcc:+xnoops
proc dcc:+xnoops {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xnoops <#salon>"
return 0
}
set eva(xnoops) "[fread xnoops.db]"
if {[lsearch -exact "x $eva(xnoops)" "$temp"] == -1 } {
lappend eva(xnoops) $temp
fwrite xnoops.db $eva(xnoops)
putdcc $idx "\002$temp ajout a la liste des xnoops"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xnoops"
return 0
}
}
bind dcc - -xnoops dcc:-xnoops
proc dcc:-xnoops {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xnoops <#salon>"
return 0
}
set eva(xnoops) "[fread xnoops.db]"
set tmp ""
foreach bb $eva(xnoops) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnoops.db $tmp
putdcc $idx "\002$temp supprim de la liste des xnoops"
return 0
}
bind dcc - xnoops dcc:xnoops
proc dcc:xnoops {nick idx arg} {
global eva

if {![matchattr $nick A]} {


avertdcc $nick
return 0
}
set eva(xnoops) "[fread xnoops.db]"
if {$eva(xnoops)==""} {
putdcc $idx "\002Aucun xnoops\002"
return 0
}
putdcc $idx "\002Liste des xnoops:\002"
foreach a $eva(xnoops) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xnoops msg:+xnoops
proc msg:+xnoops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xnoops <#salon>"
return 0
}
set eva(xnoops) "[fread xnoops.db]"
if {[lsearch -exact "x $eva(xnoops)" "$temp"] == -1 } {
lappend eva(xnoops) $temp
fwrite xnoops.db $eva(xnoops)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xnoops"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xnoops"
return 0
}
}
bind msg - -xnoops msg:-xnoops
proc msg:-xnoops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xnoops <#salon>"
return 0
}
set eva(xnoops) "[fread xnoops.db]"
set tmp ""
foreach bb $eva(xnoops) {
if {![string match $temp $bb]} {lappend tmp $bb}
}

fwrite xnoops.db $tmp


send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xnoops"
return 0
}
bind msg - xnoops msg:xnoops
proc msg:xnoops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xnoops) "[fread xnoops.db]"
if {$eva(xnoops)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xnoops\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xnoops:\002"
foreach a $eva(xnoops) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
#################
#---Xdefmodes---#
#################
# Dcc
bind dcc - +xdefmodes dcc:+xdefmodes
proc dcc:+xdefmodes {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set temp2 [lindex $arg 1]
if {$temp=="" || $temp2==""} {
putdcc $idx "\2Utilisation:\2 .+xdefmodes <salon> <modes>"
return 0
}
set fichier [fread modes.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
putdcc $idx "\2Erreur: Modes dja dfini pour $temp"
return 0
}
}
set tmp "$fichier$temp:$temp2;"
fwrite modes.db $tmp
putdcc $idx "\2Modes sur $temp dfini ($temp2)"
}
bind dcc - -xdefmodes dcc:-xdefmodes
proc dcc:-xdefmodes {nick idx arg} {
global eva

if {![matchattr $nick C]} {


avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xdefmodes <salon>"
return 0
}
set fichier [fread modes.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
index $c 1];"}
}
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite modes.db $tmp
putdcc $idx "\2Suppression des modes sur $temp"
}
bind dcc - xdefmodes dcc:xdefmodes
proc dcc:xdefmodes {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .xdefmodes <salon>"
return 0
}
set fichier [fread modes.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {
set modes "[lindex $c 1]"
putdcc $idx "\2Les modes $modes sont dfini pour $salon"
}
}
if {![info exists modes]} {
putdcc $idx "\2Aucun mode dfini pour $temp"
return 0
}
}
# Msg
bind msg - +xdefmodes msg:+xdefmodes
proc msg:+xdefmodes {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick

return 0
}
set temp [lindex $arg 0]
set temp2 [lindex $arg 1]
if {$temp=="" || $temp2==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .+xdefmodes <salon> <mo
des>"
return 0
}
set fichier [fread modes.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
send ":$eva(nick) NOTICE $nick :\2Erreur: Modes dja dfini
pour $temp"
return 0
}
}
set tmp "$fichier$temp:$temp2;"
fwrite modes.db $tmp
send ":$eva(nick) NOTICE $nick :\2Modes sur $temp dfini ($temp2)"
}
bind msg - -xdefmodes msg:-xdefmodes
proc msg:-xdefmodes {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xdefmodes <salon>"
return 0
}
set fichier [fread modes.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
index $c 1];"}
}
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite modes.db $tmp
send ":$eva(nick) NOTICE $nick :\2Suppression des modes sur $temp"
}
bind msg - xdefmodes msg:xdefmodes
proc msg:xdefmodes {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}

set temp [lindex $arg 0]


if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .xdefmodes <salon>"
return 0
}
set fichier [fread modes.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {
set modes "[lindex $c 1]"
send ":$eva(nick) NOTICE $nick :\2Les modes $modes sont
dfini pour $salon"
}
}
if {![info exists modes]} {
send ":$eva(nick) NOTICE $nick :\2Aucun mode dfini pour $temp"
return 0
}
}
################
#---Xnovoice---#
################
# Dcc
bind dcc - +xnovoice dcc:+xnovoice
proc dcc:+xnovoice {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xnovoice <#salon>"
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
if {[lsearch -exact "x $eva(xnovoice)" "$temp"] == -1 } {
lappend eva(xnovoice) $temp
fwrite xnovoice.db $eva(xnovoice)
putdcc $idx "\002$temp ajout a la liste des xnovoice"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xnovoice"
return 0
}
}
bind dcc - -xnovoice dcc:-xnovoice
proc dcc:-xnovoice {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]

if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xnovoice <#salon>"
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
set tmp ""
foreach bb $eva(xnovoice) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnovoice.db $tmp
putdcc $idx "\002$temp supprim de la liste des xnovoice"
return 0
}
bind dcc - xnovoice dcc:xnovoice
proc dcc:xnovoice {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
if {$eva(xnovoice)==""} {
putdcc $idx "\002Aucun xnovoice\002"
return 0
}
putdcc $idx "\002Liste des xnovoice:\002"
foreach a $eva(xnovoice) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xnovoice msg:+xnovoice
proc msg:+xnovoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xnovoice <#salon>"
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
if {[lsearch -exact "x $eva(xnovoice)" "$temp"] == -1 } {
lappend eva(xnovoice) $temp
fwrite xnovoice.db $eva(xnovoice)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xnovoice"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xnovoice"
return 0
}
}

bind msg - -xnovoice msg:-xnovoice


proc msg:-xnovoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xnovoice <#salon>"
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
set tmp ""
foreach bb $eva(xnovoice) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnovoice.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xnovoic
e"
return 0
}
bind msg - xnovoice msg:xnovoice
proc msg:xnovoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xnovoice) "[fread xnovoice.db]"
if {$eva(xnovoice)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xnovoice\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xnovoice:\002"
foreach a $eva(xnovoice) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
###############
#---Xallops---#
###############
# Dcc
bind dcc - +xallops dcc:+xallops
proc dcc:+xallops {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xallops <#salon>"
return 0
}

set eva(xallops) "[fread xallops.db]"


if {[lsearch -exact "x $eva(xallops)" "$temp"] == -1 } {
lappend eva(xallops) $temp
fwrite xallops.db $eva(xallops)
putdcc $idx "\002$temp ajout a la liste des xallops"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xallops"
return 0
}
}
bind dcc - -xallops dcc:-xallops
proc dcc:-xallops {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xallops <#salon>"
return 0
}
set eva(xallops) "[fread xallops.db]"
set tmp ""
foreach bb $eva(xallops) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xallops.db $tmp
putdcc $idx "\002$temp supprim de la liste des xallops"
return 0
}
bind dcc - xallops dcc:xallops
proc dcc:xallops {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xallops) "[fread xallops.db]"
if {$eva(xallops)==""} {
putdcc $idx "\002Aucun xallops\002"
return 0
}
putdcc $idx "\002Liste des xallops:\002"
foreach a $eva(xallops) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xallops msg:+xallops
proc msg:+xallops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick

return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xallops <#salon>"
return 0
}
set eva(xallops) "[fread xallops.db]"
if {[lsearch -exact "x $eva(xallops)" "$temp"] == -1 } {
lappend eva(xallops) $temp
fwrite xallops.db $eva(xallops)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xallops"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xallops"
return 0
}
}
bind msg - -xallops msg:-xallops
proc msg:-xallops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xallops <#salon>"
return 0
}
set eva(xallops) "[fread xallops.db]"
set tmp ""
foreach bb $eva(xallops) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xallops.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xallops
"
return 0
}
bind msg - xallops msg:xallops
proc msg:xallops {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xallops) "[fread xallops.db]"
if {$eva(xallops)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xallops\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xallops:\002"
foreach a $eva(xallops) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0

}
#################
#---Xallvoice---#
#################
# Dcc
bind dcc - +xallvoice dcc:+xallvoice
proc dcc:+xallvoice {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xallvoice <#salon>"
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
if {[lsearch -exact "x $eva(xallvoice)" "$temp"] == -1 } {
lappend eva(xallvoice) $temp
fwrite xallvoice.db $eva(xallvoice)
putdcc $idx "\002$temp ajout a la liste des xallvoice"
sendlog "+XAllVoice  $temp  t ajout en AllVoice - Par $by"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xallvoice"
return 0
}
}
bind dcc - -xallvoice dcc:-xallvoice
proc dcc:-xallvoice {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xallvoice <#salon>"
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
set tmp ""
foreach bb $eva(xallvoice) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xallvoice.db $tmp
putdcc $idx "\002$temp supprim de la liste des xallvoice"
sendlog "+XAllVoice  $temp  t supprim des AllVoice - Par $by"
return 0
}
bind dcc - xallvoice dcc:xallvoice
proc dcc:xallvoice {nick idx arg} {
global eva
if {![matchattr $nick A]} {

avertdcc $nick
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
if {$eva(xallvoice)==""} {
putdcc $idx "\002Aucun xallvoice\002"
return 0
}
putdcc $idx "\002Liste des xallvoice:\002"
foreach a $eva(xallvoice) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xallvoice msg:+xallvoice
proc msg:+xallvoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xallvoice <#salon>"
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
if {[lsearch -exact "x $eva(xallvoice)" "$temp"] == -1 } {
lappend eva(xallvoice) $temp
fwrite xallvoice.db $eva(xallvoice)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xallvoice"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xallvoice"
return 0
}
}
bind msg - -xallvoice msg:-xallvoice
proc msg:-xallvoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xallvoice <#salon>"
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
set tmp ""
foreach bb $eva(xallvoice) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xallvoice.db $tmp

send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xallvoi


ce"
return 0
}
bind msg - xallvoice msg:xallvoice
proc msg:xallvoice {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xallvoice) "[fread xallvoice.db]"
if {$eva(xallvoice)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xallvoice\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xallvoice:\002"
foreach a $eva(xallvoice) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
###############
#---Xnobans---#
###############
# Dcc
bind dcc - +xnobans dcc:+xnobans
proc dcc:+xnobans {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xnobans <#salon>"
return 0
}
set eva(xnobans) "[fread xnobans.db]"
if {[lsearch -exact "x $eva(xnobans)" "$temp"] == -1 } {
lappend eva(xnobans) $temp
fwrite xnobans.db $eva(xnobans)
putdcc $idx "\002$temp ajout a la liste des xnobans"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xnobans"
return 0
}
}
bind dcc - -xnobans dcc:-xnobans
proc dcc:-xnobans {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0

}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xnobans <#salon>"
return 0
}
set eva(xnobans) "[fread xnobans.db]"
set tmp ""
foreach bb $eva(xnobans) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnobans.db $tmp
putdcc $idx "\002$temp supprim de la liste des xnobans"
return 0
}
bind dcc - xnobans dcc:xnobans
proc dcc:xnobans {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xnobans) "[fread xnobans.db]"
if {$eva(xnobans)==""} {
putdcc $idx "\002Aucun xnobans\002"
return 0
}
putdcc $idx "\002Liste des xnobans:\002"
foreach a $eva(xnobans) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xnobans msg:+xnobans
proc msg:+xnobans {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xnobans <#salon>"
return 0
}
set eva(xnobans) "[fread xnobans.db]"
if {[lsearch -exact "x $eva(xnobans)" "$temp"] == -1 } {
lappend eva(xnobans) $temp
fwrite xnobans.db $eva(xnobans)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xnobans"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xnobans"
return 0
}

}
bind msg - -xnobans msg:-xnobans
proc msg:-xnobans {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xnobans <#salon>"
return 0
}
set eva(xnobans) "[fread xnobans.db]"
set tmp ""
foreach bb $eva(xnobans) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnobans.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xnobans
"
return 0
}
bind msg - xnobans msg:xnobans
proc msg:xnobans {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xnobans) "[fread xnobans.db]"
if {$eva(xnobans)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xnobans\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xnobans:\002"
foreach a $eva(xnobans) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
################
#---Xnotopic---#
################
# Dcc
bind dcc - +xnotopic dcc:+xnotopic
proc dcc:+xnotopic {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xnotopic <#salon>"

return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
if {[lsearch -exact "x $eva(xnotopic)" "$temp"] == -1 } {
lappend eva(xnotopic) $temp
fwrite xnotopic.db $eva(xnotopic)
putdcc $idx "\002$temp ajout a la liste des xnotopic"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xnotopic"
return 0
}
}
bind dcc - -xnotopic dcc:-xnotopic
proc dcc:-xnotopic {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xnotopic <#salon>"
return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
set tmp ""
foreach bb $eva(xnotopic) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnotopic.db $tmp
putdcc $idx "\002$temp supprim de la liste des xnotopic"
return 0
}
bind dcc - xnotopic dcc:xnotopic
proc dcc:xnotopic {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
if {$eva(xnotopic)==""} {
putdcc $idx "\002Aucun xnotopic\002"
return 0
}
putdcc $idx "\002Liste des xnotopic:\002"
foreach a $eva(xnotopic) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xnotopic msg:+xnotopic
proc msg:+xnotopic {nick uhost hand arg} {
global eva

if {![isauth $nick] || ![matchattr $hand C]} {


avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xnotopic <#salon>"
return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
if {[lsearch -exact "x $eva(xnotopic)" "$temp"] == -1 } {
lappend eva(xnotopic) $temp
fwrite xnotopic.db $eva(xnotopic)
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xnotopic"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xnotopic"
return 0
}
}
bind msg - -xnotopic msg:-xnotopic
proc msg:-xnotopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xnotopic <#salon>"
return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
set tmp ""
foreach bb $eva(xnotopic) {
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xnotopic.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xnotopi
c"
return 0
}
bind msg - xnotopic msg:xnotopic
proc msg:xnotopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xnotopic) "[fread xnotopic.db]"
if {$eva(xnotopic)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xnotopic\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xnotopic:\002"
foreach a $eva(xnotopic) {
send ":$eva(nick) NOTICE $nick :$a"

}
return 0
}
##################
#---Xpermclose---#
##################
# Dcc
bind dcc - +xpermclose dcc:+xpermclose
proc dcc:+xpermclose {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .+xpermclose <#salon>"
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
if {[lsearch -exact "x $eva(xpermclose)" "$temp"] == -1 } {
lappend eva(xpermclose) $temp
fwrite xpermclose.db $eva(xpermclose)
set eva(act) "1"
send ":$eva(nick) JOIN $temp"
sendlog "31 Join 31 $eva(nick) - Sur: $temp --Fermeture--"
send ":$eva(nick) MODE $temp x+onitCONcms $eva(nick)"
send ":$eva(nick) TOPIC $temp :$eva(topic)"
send ":$eva(nick) WHO $temp"
putdcc $idx "\002$temp ajout a la liste des xpermclose"
return 0
} else {
putdcc $idx "\002Erreur:\002 $temp dja dans la liste des xpermclose"
return 0
}
}
bind dcc - -xpermclose dcc:-xpermclose
proc dcc:-xpermclose {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xpermclose <#salon>"
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
set tmp ""
foreach bb $eva(xpermclose) {
if {[string match $temp $bb]} {send ":$eva(nick PART $bb"}
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xpermclose.db $tmp
putdcc $idx "\002$temp supprim de la liste des xpermclose"

return 0
}
bind dcc - xpermclose dcc:xpermclose
proc dcc:xpermclose {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
if {$eva(xpermclose)==""} {
putdcc $idx "\002Aucun xpermclose\002"
return 0
}
putdcc $idx "\002Liste des xpermclose:\002"
foreach a $eva(xpermclose) {
putdcc $idx "$a"
}
return 0
}
# Msg
bind msg - +xpermclose msg:+xpermclose
proc msg:+xpermclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 +xpermclose <#salon>"
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
if {[lsearch -exact "x $eva(xpermclose)" "$temp"] == -1 } {
lappend eva(xpermclose) $temp
fwrite xpermclose.db $eva(xpermclose)
set eva(act) "1"
send ":$eva(nick) JOIN $temp"
sendlog "31 Join 31 $eva(nick) - Sur: $temp --Fermeture--"
send ":$eva(nick) MODE $temp x+onitCONcms $eva(nick)"
send ":$eva(nick) TOPIC $temp :$eva(topic)"
send ":$eva(nick) WHO $temp"
send ":$eva(nick) NOTICE $nick :\002$temp ajout a la liste des xpermclose
"
return 0
} else {
send ":$eva(nick) NOTICE $nick :\002Erreur:\002 $temp dja dans la liste d
es xpermclose"
return 0
}
}
bind msg - -xpermclose msg:-xpermclose
proc msg:-xpermclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {

avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 -xpermclose <#salon>"
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
set tmp ""
foreach bb $eva(xpermclose) {
if {[string match $temp $bb]} {send ":$eva(nick PART $bb"}
if {![string match $temp $bb]} {lappend tmp $bb}
}
fwrite xpermclose.db $tmp
send ":$eva(nick) NOTICE $nick :\002$temp supprim de la liste des xpermcl
ose"
return 0
}
bind msg - xpermclose msg:xpermclose
proc msg:xpermclose {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set eva(xpermclose) "[fread xpermclose.db]"
if {$eva(xpermclose)==""} {
send ":$eva(nick) NOTICE $nick :\002Aucun xpermclose\002"
return 0
}
send ":$eva(nick) NOTICE $nick :\002Liste des xpermclose:\002"
foreach a $eva(xpermclose) {
send ":$eva(nick) NOTICE $nick :$a"
}
return 0
}
#################
#---Xdeftopic---#
#################
# Dcc
bind dcc - +xdeftopic dcc:+xdeftopic
proc dcc:+xdeftopic {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set temp2 [lrange $arg 1 end]
if {$temp=="" || $temp2==""} {
putdcc $idx "\2Utilisation:\2 .+xdeftopic <salon> <topic>"
return 0
}
set fichier [fread topics.db]
regsub -all {;} $fichier { } a

foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
putdcc $idx "\2Erreur: Topic dja dfini pour $temp"
return 0
}
}
putdcc $idx "\2Topic sur $temp dfini ($temp2)"
regsub -all { } $temp2 {:} temp2
set tmp "$fichier$temp:$temp2;"
fwrite topics.db $tmp
}
bind dcc - -xdeftopic dcc:-xdeftopic
proc dcc:-xdeftopic {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xdeftopic <salon>"
return 0
}
set fichier [fread topics.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
range $c 1 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite topics.db $tmp
putdcc $idx "\2Suppression du topic sur $temp"
}
bind dcc - xdeftopic dcc:xdeftopic
proc dcc:xdeftopic {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .xdeftopic <salon>"
return 0
}
set fichier [fread topics.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {

set topic "[lrange $c 1 end]"


regsub -all {:} $topic { } topic
putdcc $idx "\2Le topic '$topic' est dfini pour $salon"
}
}
if {![info exists topic]} {
putdcc $idx "\2Aucun topic dfini pour $temp"
return 0
}
}
# Msg
bind msg - +xdeftopic msg:+xdeftopic
proc msg:+xdeftopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set temp2 [lrange $arg 1 end]
if {$temp=="" || $temp2==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .+xdeftopic <salon> <to
pic>"
return 0
}
set fichier [fread topics.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
send ":$eva(nick) NOTICE $nick :\2Erreur: Topic dja dfini
pour $temp"
return 0
}
}
send ":$eva(nick) NOTICE $nick :\2Topic sur $temp dfini ($temp2)"
regsub -all { } $temp2 {:} temp2
set tmp "$fichier$temp:$temp2;"
fwrite topics.db $tmp
}
bind msg - -xdeftopic msg:-xdeftopic
proc msg:-xdeftopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .-xdeftopic <salon>"
return 0
}
set fichier [fread topics.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {

set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
range $c 1 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite topics.db $tmp
send ":$eva(nick) NOTICE $nick :\2Suppression du topic sur $temp"
}
bind msg - xdeftopic msg:xdeftopic
proc msg:xdeftopic {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .xdeftopic <salon>"
return 0
}
set fichier [fread topics.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {
set topic "[lrange $c 1 end]"
regsub -all {:} $topic { } topic
send ":$eva(nick) NOTICE $nick :\2Le topic '$topic' est
dfini pour $salon"
}
}
if {![info exists topic]} {
send ":$eva(nick) NOTICE $nick :\2Aucun topic dfini pour $temp"
return 0
}
}
################
#---Xwelcome---#
################
# Dcc
bind dcc - +xwelcome dcc:+xwelcome
proc dcc:+xwelcome {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set temp2 [lrange $arg 1 end]
if {$temp=="" || $temp2==""} {
putdcc $idx "\2Utilisation:\2 .+xwelcome <salon> <notice>"

return 0
}
set fichier [fread xwelcome.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
putdcc $idx "\2Erreur: Notice dja dfinie pour $temp"
return 0
}
}
putdcc $idx "\2Notice sur $temp dfinie ($temp2)"
regsub -all { } $temp2 {:} temp2
set tmp "$fichier$temp:$temp2;"
fwrite xwelcome.db $tmp
}
bind dcc - -xwelcome dcc:-xwelcome
proc dcc:-xwelcome {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .-xwelcome <salon>"
return 0
}
set fichier [fread xwelcome.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
range $c 1 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xwelcome.db $tmp
putdcc $idx "\2Suppression de la notice d'accueil sur $temp"
}
bind dcc - xwelcome dcc:xwelcome
proc dcc:xwelcome {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .xwelcome <salon>"
return 0
}
set fichier [fread xwelcome.db]
regsub -all {;} $fichier { } a

foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {
set welcome "[lrange $c 1 end]"
regsub -all {:} $welcome { } welcome
putdcc $idx "\2La notice '$welcome' est dfinie pour $salo
n"
}
}
if {![info exists welcome]} {
putdcc $idx "\2Aucune notice dfinie pour $temp"
return 0
}
}
# Msg
bind msg - +xwelcome msg:+xwelcome
proc msg:+xwelcome {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set temp2 [lrange $arg 1 end]
if {$temp=="" || $temp2==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .+xwelcome <salon> <not
ice>"
return 0
}
set fichier [fread xwelcome.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp"} {
send ":$eva(nick) NOTICE $nick :\2Erreur: Notice dja dfini
e pour $temp"
return 0
}
}
send ":$eva(nick) NOTICE $nick :\2Notice sur $temp dfinie ($temp2)"
regsub -all { } $temp2 {:} temp2
set tmp "$fichier$temp:$temp2;"
fwrite xwelcome.db $tmp
}
bind msg - -xwelcome msg:-xwelcome
proc msg:-xwelcome {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .-xwelcome <salon>"
return 0

}
set fichier [fread xwelcome.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {![string match $temp $salon]} {lappend tmp "[lindex $c 0]:[l
range $c 1 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xwelcome.db $tmp
send ":$eva(nick) NOTICE $nick :\2Suppression de la notice d'accueil sur
$temp"
}
bind msg - xwelcome msg:xwelcome
proc msg:xwelcome {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .xwelcome <salon>"
return 0
}
set fichier [fread xwelcome.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salon "[lindex $c 0]"
if {[string match $temp $salon]} {
set welcome "[lrange $c 1 end]"
regsub -all {:} $welcome { } welcome
send ":$eva(nick) NOTICE $nick :\2La notice '$welcome' e
st dfinie pour $salon"
}
}
if {![info exists welcome]} {
send ":$eva(nick) NOTICE $nick :\2Aucune notice dfinie pour $temp
"
return 0
}
}
#################
#---Xdefgline---#
#################
# Dcc
bind dcc - +xdefgline dcc:+xdefgline
proc dcc:+xdefgline {nick idx arg} {
global eva
if {![matchattr $nick C]} {

avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
set time [lindex $arg 2]
set raison [lrange $arg 3 end]
if {$type=="" || $temp=="" || $time=="" || $raison==""} {
putdcc $idx "\2Utilisation:\2 .+xdefgline <arg> <type> <temps> <
raison>"
return 0
}
if {$type!="nick" && $type!="host" && $type!="name" && $type!="ident"} {
putdcc $idx "\2Les types possible sont:\2 nick - host - name - i
dent"
return 0
}
if [string match *:* $time] {
set exp [string tolower [split $time :]]
if {[lindex $exp 1] == "s"} {
set time [lindex $exp 0]
} elseif {[lindex $exp 1] == "m"} {
set time [expr [lindex $exp 0] * 60]
} elseif {[lindex $exp 1] == "h"} {
set time [expr [lindex $exp 0] * 3600]
} elseif {[lindex $exp 1] == "j"} {
set time [expr [lindex $exp 0] * 86400]
} else {
putdcc $idx "Le format de la dure est invalide."
return 0
}
}
set fichier [fread xdefgline.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp" && [lindex $c 1]=="$type"} {
putdcc $idx "\2Erreur: Gline dja dfini pour $temp"
return 0
}
}
putdcc $idx "\2Gline sur $temp dfinie ($type)"
regsub -all { } $raison {:} raison
set tmp "$fichier$temp:$type:$time:$raison;"
fwrite xdefgline.db $tmp
}
bind dcc - -xdefgline dcc:-xdefgline
proc dcc:-xdefgline {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
if {$temp=="" || $type==""} {
putdcc $idx "\2Utilisation:\2 .-xdefgline <arg> <type>"
return 0
}

set fichier [fread xdefgline.db]


set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
set temptype "[lindex $c 1]"
if {!([string match $temp $temp2] && $temptype=="$type")} {lappe
nd tmp "[lindex $c 0]:[lindex $c 1]:[lindex $c 2]:[lrange $c 3 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xdefgline.db $tmp
putdcc $idx "\2Suppression du gline sur $temp ($type)"
}
bind dcc - xdefgline dcc:xdefgline
proc dcc:xdefgline {nick idx arg} {
global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .xdefgline <arg>"
return 0
}
set fichier [fread xdefgline.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
if {[string match $temp $temp2]} {
set raison "[lrange $c 3 end]"
regsub -all {:} $raison { } raison
putdcc $idx "\2Le gline sur $temp2 de type [lindex $c 1]
est dfini [lindex $c 2] secondes avec la raison $raison"
}
}
if {![info exists raison]} {
putdcc $idx "\2Aucun gline dfini pour $temp ($type)"
return 0
}
}
# Msg
bind msg - +xdefgline msg:+xdefgline
proc msg:+xdefgline {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
set time [lindex $arg 2]

set raison [lrange $arg 3 end]


if {$type=="" || $temp=="" || $time=="" || $raison==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .+xdefgline <ar
g> <type> <temps> <raison>"
return 0
}
if {$type!="nick" && $type!="host" && $type!="name" && $type!="ident"} {
send ":$eva(nick) NOTICE $nick :\2Les types possible sont:\2 nic
k - host - name - ident"
return 0
}
if [string match *:* $time] {
set exp [string tolower [split $time :]]
if {[lindex $exp 1] == "s"} {
set time [lindex $exp 0]
} elseif {[lindex $exp 1] == "m"} {
set time [expr [lindex $exp 0] * 60]
} elseif {[lindex $exp 1] == "h"} {
set time [expr [lindex $exp 0] * 3600]
} elseif {[lindex $exp 1] == "j"} {
set time [expr [lindex $exp 0] * 86400]
} else {
send ":$eva(nick) NOTICE $nick :Le format de la dure est
invalide."
return 0
}
}
set fichier [fread xdefgline.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp" && [lindex $c 1]=="$type"} {
send ":$eva(nick) NOTICE $nick :\2Erreur: Gline dja dfini
pour $temp"
return 0
}
}
send ":$eva(nick) NOTICE $nick :\2Gline sur $temp dfinie ($type)"
regsub -all { } $raison {:} raison
set tmp "$fichier$temp:$type:$time:$raison;"
fwrite xdefgline.db $tmp
}
bind msg - -xdefgline msg:-xdefgline
proc msg:-xdefgline {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
if {$temp=="" || $type==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .-xdefgline <ar
g> <type>"
return 0
}
set fichier [fread xdefgline.db]
set tmp ""
regsub -all {;} $fichier { } a

foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
set temptype "[lindex $c 1]"
if {!([string match $temp $temp2] && $temptype=="$type")} {lappe
nd tmp "[lindex $c 0]:[lindex $c 1]:[lindex $c 2]:[lrange $c 3 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xdefgline.db $tmp
send ":$eva(nick) NOTICE $nick :\2Suppression du gline sur $temp ($type)
"
}
bind msg - xdefgline msg:xdefgline
proc msg:xdefgline {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .xdefgline <arg>"
return 0
}
set fichier [fread xdefgline.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
if {[string match $temp $temp2]} {
set raison "[lrange $c 3 end]"
regsub -all {:} $raison { } raison
send ":$eva(nick) NOTICE $nick :\2Le gline sur $temp2 de
type [lindex $c 1] est dfini [lindex $c 2] secondes avec la raison $raison"
}
}
if {![info exists raison]} {
send ":$eva(nick) NOTICE $nick :\2Aucun gline dfini pour $temp ($
type)"
return 0
}
}
################
#---Xdefkill---#
################
# Dcc
bind dcc - +xdefkill dcc:+xdefkill
proc dcc:+xdefkill {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}

set temp [lindex $arg 0]


set type [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$type=="" || $temp=="" || $raison==""} {
putdcc $idx "\2Utilisation:\2 .+xdefkill <arg> <type> <raison>"
return 0
}
if {$type!="nick" && $type!="host" && $type!="name" && $type!="ident"} {
putdcc $idx "\2Les types possible sont:\2 nick - host - name - i
dent"
return 0
}
set fichier [fread xdefkill.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp" && [lindex $c 1]=="$type"} {
putdcc $idx "\2Erreur: Kill dja dfini pour $temp"
return 0
}
}
putdcc $idx "\2Kill sur $temp dfinie ($type)"
regsub -all { } $raison {:} raison
set tmp "$fichier$temp:$type:$raison;"
fwrite xdefkill.db $tmp
}
bind dcc - -xdefkill dcc:-xdefkill
proc dcc:-xdefkill {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
if {$temp=="" || $type==""} {
putdcc $idx "\2Utilisation:\2 .-xdefkill <arg> <type>"
return 0
}
set fichier [fread xdefkill.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
set temptype "[lindex $c 1]"
if {!([string match $temp $temp2] && $temptype=="$type")} {lappe
nd tmp "[lindex $c 0]:[lindex $c 1]:[lrange $c 2 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xdefkill.db $tmp
putdcc $idx "\2Suppression du kill sur $temp ($type)"
}
bind dcc - xdefkill dcc:xdefkill
proc dcc:xdefkill {nick idx arg} {

global eva
if {![matchattr $nick A]} {
avertdcc $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
putdcc $idx "\2Utilisation:\2 .xdefkill <arg>"
return 0
}
set fichier [fread xdefkill.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
if {[string match $temp $temp2]} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
putdcc $idx "\2Le kill sur $temp2 de type [lindex $c 1]
est dfini avec la raison $raison"
}
}
if {![info exists raison]} {
putdcc $idx "\2Aucun kill dfini pour $temp ($type)"
return 0
}
}
# Msg
bind msg - +xdefkill msg:+xdefkill
proc msg:+xdefkill {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$type=="" || $temp=="" || $raison==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .+xdefkill <arg
> <type> <raison>"
return 0
}
if {$type!="nick" && $type!="host" && $type!="name" && $type!="ident"} {
send ":$eva(nick) NOTICE $nick :\2Les types possible sont:\2 nic
k - host - name - ident"
return 0
}
set fichier [fread xdefkill.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$temp" && [lindex $c 1]=="$type"} {
send ":$eva(nick) NOTICE $nick :\2Erreur: Kill dja dfini p
our $temp"
return 0
}
}

send ":$eva(nick) NOTICE $nick :\2Kill sur $temp dfinie ($type)"


regsub -all { } $raison {:} raison
set tmp "$fichier$temp:$type:$raison;"
fwrite xdefkill.db $tmp
}
bind msg - -xdefkill msg:-xdefkill
proc msg:-xdefkill {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand C]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
set type [lindex $arg 1]
if {$temp=="" || $type==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .-xdefkill <arg
> <type>"
return 0
}
set fichier [fread xdefkill.db]
set tmp ""
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
set temptype "[lindex $c 1]"
if {!([string match $temp $temp2] && $temptype=="$type")} {lappe
nd tmp "[lindex $c 0]:[lindex $c 1]:[lrange $c 2 end];"}
}
regsub -all { } $tmp {:} tmp
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite xdefkill.db $tmp
send ":$eva(nick) NOTICE $nick :\2Suppression du kill sur $temp ($type)"
}
bind msg - xdefkill msg:xdefkill
proc msg:xdefkill {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand A]} {
avertmsg $nick
return 0
}
set temp [lindex $arg 0]
if {$temp==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 .xdefkill <arg>"
return 0
}
set fichier [fread xdefkill.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp2 "[lindex $c 0]"
if {[string match $temp $temp2]} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
send ":$eva(nick) NOTICE $nick :\2Le kill sur $temp2 de
type [lindex $c 1] est dfini avec la raison $raison"

}
}
if {![info exists raison]} {
send ":$eva(nick) NOTICE $nick :\2Aucun kill dfini pour $temp ($t
ype)"
return 0
}
}
##############
#---Xdebug---#
##############
# Dcc
bind dcc - xdebug dcc:xdebug
proc dcc:xdebug {nick idx arg} {
global eva
if {![matchattr $nick C]} {
avertdcc $nick
return 0
}
if {$eva(debug)=="1"} {
set eva(debug) "0"
putdcc $idx "\2Debug Dsactiv\2"
} else {
set eva(debug) "1"
putdcc $idx "\2Debug Activ\2"
}
}
#############################
# Level Serveurs Admins : n #
#############################
##############
#---Addgeo---#
##############
# MSG
bind msg - addgeo msg:addgeo
proc msg:addgeo {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {[validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 addgeo <pseudo> <pass>"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo ajout avec succs!"
sendlog "Add-Gofrontiste 41 $nick vien d'ajout $pseudo en Gofrontiste"

adduser $pseudo
chattr $pseudo +Ap
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
# DCC
bind dcc - addgeo dcc:addgeo
proc dcc:addgeo {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {[validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
putdcc $idx "\2Utilisation:\2 addgeo <pseudo> <pass>"
return 0
}
putdcc $idx "$pseudo ajout avec succs!!!"
sendlog "31 Add-Gofrontiste 31 $nick vien d'ajout $pseudo en Gofrontiste"
adduser $pseudo
chattr $pseudo +Ap
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
################
#---Addircop---#
################
# MSG
bind msg - addircop msg:addircop
proc msg:addircop {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {[validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 addircop <pseudo> <pass
>"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo ajout avec succs!!!"
sendlog "Add-IRCop 41 $nick vien d'ajout $pseudo en IRCoprateur"
adduser $pseudo

chattr $pseudo +ABp


setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
# DCC
bind dcc - addircop dcc:addircop
proc dcc:addircop {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {[validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
putdcc $idx "\2Utilisation:\2 addircop <pseudo> <pass>"
return 0
}
putdcc $idx "$pseudo ajout avec succs!!!"
sendlog "Add-IRCop 41 $nick vien d'ajout $pseudo en IRCoprateur"
adduser $pseudo
chattr $pseudo +ABp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
#############
#---Addrs---#
#############
# MSG
bind msg - addrs msg:addrs
proc msg:addrs {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {[validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 addrs <pseudo> <pass>"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo ajout avec succs!!!"
sendlog "Add-RS 41 $nick vien d'ajout $pseudo en Responsable Services"
adduser $pseudo
chattr $pseudo +ABCp
setuser $pseudo PASS $pass

setuser $pseudo HOSTS -telnet!*@*


}
# DCC
bind dcc - addrs dcc:addrs
proc dcc:addrs {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {[validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
putdcc $idx "\2Utilisation:\2 addrs <pseudo> <pass>"
return 0
}
putdcc $idx "$pseudo ajout avec succs!"
sendlog "Add-RS 41 $nick vien d'ajout $pseudo en Responsable Services"
adduser $pseudo
chattr $pseudo +ABCp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
#############
#---Addsa---#
#############
# MSG
bind msg - addsa msg:addsa
proc msg:addsa {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {[validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 addsa <pseudo> <pass>"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo ajout avec succs!!!"
sendlog "Add-SA 41 $nick vien d'ajout $pseudo en Serveur Admin"
adduser $pseudo
chattr $pseudo +Dp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}

# DCC
bind dcc - addsa dcc:addsa
proc dcc:addsa {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {[validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
putdcc $idx "\2Utilisation:\2 addsa <pseudo> <pass>"
return 0
}
putdcc $idx "$pseudo ajout avec succs!!!"
sendlog "Add-SA 41 $nick vien d'ajout $pseudo en Serveur Admin"
adduser $pseudo
chattr $pseudo +Dp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
################
#---Addadmin---#
################
# MSG
bind msg - addadmin msg:addadmin
proc msg:addadmin {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {[validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 addadmin <pseudo> <pass
>"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo ajout avec succs!!!"
sendlog "Add-Admin 41 $nick vien d'ajout $pseudo en Administrateur"
adduser $pseudo
chattr $pseudo +ABCDnp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}

# DCC
bind dcc - addadmin dcc:addadmin
proc dcc:addadmin {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
set pass [lindex $arg 1]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {[validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur existe dja!"
return 0
}
if {$pseudo=="" || $pass==""} {
putdcc $idx "\2Utilisation:\2 addadmin <pseudo> <pass>"
return 0
}
putdcc $idx "$pseudo ajout avec succs!!!"
sendlog "Add-Admin 41 $nick vien d'ajout $pseudo en Administrateur"
adduser $pseudo
chattr $pseudo +ABCDnp
setuser $pseudo PASS $pass
setuser $pseudo HOSTS -telnet!*@*
}
################
#---Delacces---#
################
# MSG
bind msg - delacces msg:delacces
proc msg:delacces {nick uhost hand arg} {
global eva
set pseudo [lindex $arg 0]
if {![isauth $nick] || ![matchattr $hand n]} {
avertmsg $nick
return 0
}
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 delacces <pseudo>"
return 0
}
if {![validuser $pseudo]} {
send ":$eva(nick) NOTICE $nick :$pseudo l'utilisateur n'existe pas!"
return 0
}
if {[matchattr $pseudo n]} {
send ":$eva(nick) NOTICE $nick :Impossible, $pseudo est un Serveur Admin
istrateur"
return 0
}
send ":$eva(nick) NOTICE $nick :$pseudo supprim avec succs!!!"
sendlog "Deluser 41 $nick vien de supprim $pseudo des accss."
deluser $pseudo
}
# DCC

bind dcc - delacces dcc:delacces


proc dcc:delacces {nick idx arg} {
global eva
set pseudo [lindex $arg 0]
if {![matchattr $nick n]} {
avertdcc $nick
return 0
}
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 delacces <pseudo>"
return 0
}
if {![validuser $pseudo]} {
putdcc $idx "$pseudo l'utilisateur n'existe pas!"
return 0
}
if {[matchattr $pseudo n]} {
putdcc $idx "Impossible, $pseudo est un Serveur Administrateur"
return 0
}
putdcc $idx "$pseudo supprim avec succs!!!"
sendlog "Deluser 41 $nick vien de supprim $pseudo des Accss."
deluser $pseudo
}
#############################
# Level Services Admins : D #
#############################
##########
#---Aop--#
##########
# MSG
bind msg - aop msg:aop
proc msg:aop {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand D]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 aop <salon> <pseudo>"
return 0
}
proc:aop $salon $pseudo $hand
}
# DCC
bind dcc - aop dcc:aop
proc dcc:aop {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]

if {![matchattr $nick D]} {


avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 aop <salon> <pseudo>"
return 0
}
proc:aop $salon $pseudo $nick
}
# Proc
proc proc:aop {chan nick
global eva
send ":$eva(serv) MODE
sendlog "AOp sur $chan
putlog2 "Aop par $by :
}

by} {
$chan +o $nick"
sur $nick - par $by"
$nick sur $chan"

############
#---Adeop--#
############
# MSG
bind msg - adeop msg:adeop
proc msg:adeop {nick uhost hand arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![isauth $nick] || ![matchattr $hand D]} {
avertmsg $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 adeop <salon> <pseudo>"
return 0
}
proc:adeop $salon $pseudo $hand
}
# DCC
bind dcc - adeop dcc:adeop
proc dcc:adeop {nick idx arg} {
global eva
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
if {![matchattr $nick D]} {
avertdcc $nick
return 0
}
if {$salon=="" || $pseudo=="" || ![string match *#* $salon]} {
putdcc $idx "\2Utilisation:\2 adeop <salon> <pseudo>"
return 0
}
proc:adeop $salon $pseudo $nick
}

# Proc
proc proc:adeop {chan nick by} {
global eva
send ":$eva(serv) MODE $chan -o $nick"
sendlog "ADeop sur $chan sur $nick - par $by"
putlog2 "Adeop par $by : $nick sur $chan"
}
#############
#---Akick---#
#############
# MSG
bind msg - akick msg:akick
proc msg:akick {nick uhost hand arg} {
global eva
if {![isauth $nick] || ![matchattr $hand D]} {
avertmsg $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$salon=="" || $nick=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 akick <#salon>
<nick> <raison>"
return 0
}
if {$raison==""} {set raison "Gros vilain!"}
proc:akick $salon $pseudo $hand $raison
}
# DCC
bind dcc - akick dcc:akick
proc dcc:akick {nick idx arg} {
global eva
if {![matchattr $nick D]} {
avertdcc $nick
return 0
}
set salon [lindex $arg 0]
set pseudo [lindex $arg 1]
set raison [lrange $arg 2 end]
if {$salon=="" || $nick=="" || ![string match *#* $salon]} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 akick <#salon>
<nick> <raison>"
return 0
}
if {$raison==""} {set raison "Gros vilain!"}
proc:akick $salon $pseudo $nick $raison
}
# Proc
proc proc:akick {chan nick by raison} {
global eva
send ":$eva(serv) KICK $chan $nick :$raison - $by"

sendlog "AKilled sur $chan sur $nick - Raison: $raison - par $by"
putlog2 "Akick par $by : $nick sur $chan ($raison)"
}
#############
#---Akill---#
#############
# MSG
bind msg - akill msg:akill
proc msg:akill {nick uhost hand arg} {
global eva hostclone
if {![isauth $nick] || ![matchattr $hand D]} {
avertmsg $nick
return 0
}
set arg [debug $arg]
set pseudo [lindex $arg 0]
set raison [lrange $arg 1 end]
if {$pseudo==""} {
send ":$eva(nick) NOTICE $nick :\2Utilisation:\2 akill <pseudo>
<raison>"
return 0
}
if {$raison==""} { set raison "Gros vilain!" }
if ![info exists hostclone($pseudo)] {
send ":$eva(nick) NOTICE $nick :\2Nick non connect"
return 0
}
proc:akill $pseudo $hand $raison
}
# DCC
bind dcc - akill dcc:akill
proc dcc:akill {nick idx arg} {
global eva hostclone
if {![matchattr $nick D]} {
avertdcc $nick
return 0
}
set arg [debug $arg]
set pseudo [lindex $arg 0]
set raison [lrange $arg 1 end]
if {$pseudo==""} {
putdcc $idx "\2Utilisation:\2 akill <pseudo> <raison>"
return 0
}
if {$raison==""} { set raison "Gros vilain!" }
if ![info exists hostclone($pseudo)] {
putdcc $idx "\2Nick non connect"
return 0
}
proc:akill $pseudo $nick $raison
}
# Proc
proc proc:akill {pseudo by raison} {

global eva hostclone xwho userserv


set pseudo [debug $pseudo]
set raison [debug $raison]
sendlog "AKilled sur $pseudo - Raison: $raison - par: $by"
kill $pseudo $by "$raison"
putlog2 "Akill par $by : $pseudo ($raison)"
}
##############
# Proc Suppl #
##############
proc coneva {} {
global eva welcome socket
send ":$eva(serv) NICK $eva(nick) 1 1 $eva(ident) $eva(host) $eva(serv) :$eva(
name)"
send ":$eva(serv) NICK $welcome(nick) 1 1 $welcome(ident) $welcome(host) $eva(
serv) :$welcome(name)"
send ":$eva(serv) NICK $socket(nick) 1 1 $socket(ident) $socket(host) $eva(ser
v) :$socket(name)"
send ":$eva(nick) MODE $eva(nick) +oksAwigrZ"
send ":$welcome(nick) MODE $welcome(nick) +oksAwigrZ"
send ":$socket(nick) MODE $socket(nick) +oksAwigrZ"
send ":$eva(nick) JOIN $eva(chan)"
send ":$eva(nick) JOIN $eva(soho)"
send ":$eva(nick) JOIN $eva(chanbot)"
send ":$welcome(nick) JOIN $eva(chan)"
send ":$welcome(nick) JOIN $eva(chanbot)"
send ":$socket(nick) JOIN $eva(chan)"
send ":$socket(nick) JOIN $eva(chanbot)"
send ":$eva(nick) SVSMODE +o Robot"
send ":$eva(nick) TOPIC $eva(chan) :Welcome to #Eva! - Salon du Service IRC &
Logs"
send ":$eva(serv) MODE $eva(chan) +imntsooo $eva(nick) $welcome(nick) $socket(
nick)"
send ":$eva(serv) MODE $eva(chanbot) +ntooo $eva(nick) $welcome(nick) $socket(
nick)"
send ":$eva(serv) MODE $eva(soho) +o $eva(nick)"
send ":$eva(nick) WALLOPS :Eva Service est maintenant connect au serveur - IRCw
.info 2009 - Tous droits rservs."
set tmp "[fread xpermclose.db]"
foreach a $tmp {
set eva(act) "1"
send ":$eva(nick) JOIN $a"
sendlog "Join $eva(nick) - Sur: $a --!Fermeture!--"
send ":$eva(nick) MODE $a +o $eva(nick)"
send ":$eva(nick) MODE $a +imsnt"
send ":$eva(nick) TOPIC $a :$eva(topic)"
send ":$eva(nick) WHO $a"
}
deauthall
}
proc putlog2 {arg} {
set temp [fread diogene.log]
fwrite diogene.log "$temp $arg"
}
proc deauthall {} {

global eva
fwrite login.tmp ""
}
proc debug {arg} {
regsub -all
regsub -all
regsub -all
regsub -all
regsub -all
regsub -all
regsub -all
return $arg
}

{\\}
{\{}
{\}}
{\]}
{\[}
{\"}
{\`}

$arg
$arg
$arg
$arg
$arg
$arg
$arg

{\\\\} arg
{\{} arg
{\}} arg
{\]} arg
{\[} arg
{\"} arg
{\`} arg

proc strcasecmp {a b} {return [string compare -nocase $a $b]}


proc fcreate {ff} {set f [open $ff w];close $f}
proc fread {fi} {set f [open $fi r];set t [gets $f];close $f;return $t}
proc fwrite {fi arg} {set f [open $fi w];puts $f $arg;close $f}
proc isindb {list a} {
foreach w $list {if [string match -nocase $w $a] {return $w}}
return -1
}
proc isauth {nick} {
set fichier "[fread login.tmp]"
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 1]=="$nick"} {
set tmp "1"
}
}
if [info exists tmp] {return 1} else {return 0}
}
proc auth {nick login} {
set fichier "[fread login.tmp]"
set temp "$fichier$login:$nick;"
setuser $login HOSTS; setuser $login HOSTS $nick*!*@*; setuser $login HO
STS -telnet!*@*
chattr $login +plmn
fwrite login.tmp $temp
}
proc login2nick {login} {
set fichier "[fread login.tmp]"
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 0]=="$login"} {
return [lindex $c 1]
}
}
}
proc nick2login {nick} {
set fichier "[fread login.tmp]"
regsub -all {;} $fichier { } a
foreach b $a {

set c [split $b :]
if {[lindex $c 1]=="$nick"} {
return [lindex $c 0]
}
}
}
proc deauth {nick} {
set fichier "[fread login.tmp]"
regsub -all {;} $fichier { } a
set tmp ""
foreach b $a {
set c [split $b :]
if {[lindex $c 1] != $nick} {
lappend tmp "[lindex $c 0]:[lindex $c 1];"
set login [lindex $c 0]
setuser $login HOSTS
chattr $login +plmn
}
}
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite login.tmp "$tmp"
}
proc newauth {nick newnick} {
set fichier "[fread login.tmp]"
regsub -all {;} $fichier { } a
set tmp ""
foreach b $a {
set c [split $b :]
if {[lindex $c 1] != $nick} {lappend tmp "[lindex $c 0]:[lindex
$c 1];"}
if {[lindex $c 1] == $nick} {
lappend tmp "[lindex $c 0]:$newnick;"
set login [lindex $c 0]
setuser $login HOSTS; setuser $login HOSTS $newnick*!*@*; setuse
r $login HOSTS -telnet!*@*
chattr $login +plmn
}
}
regsub -all {\{} $tmp {} tmp
regsub -all {\}} $tmp {} tmp
regsub -all { } $tmp {} tmp
fwrite login.tmp $tmp
}
proc xclose {chan} {
global eva
lappend eva(closelist) $chan
sendsoho "Fermeture du salon \2$chan"
if {$eva(txclose) != 0} {timer $eva(txclose) [list xopen $chan]}
}
proc xopen {chan} {
global eva
if {[isxclose $chan]} {
set tmp ""
foreach bb $eva(closelist) {

if {$bb != "$chan"} {lappend tmp $bb}


}
set eva(closelist) "$tmp"
sendsoho "Rouverture du salon \2$chan"
send ":$eva(nick) PART $chan :Rouverture du salon"
}
}
proc isxclose {chan} {
global eva
if {[string match *$chan* $eva(closelist)]} {
return 1
} else {
return 0
}
}
proc addoper {pseudo} {
global eva
lappend eva(operlist) $pseudo
send ":$eva(nick) SAJOIN $pseudo $eva(soho)"
}
proc deloper {pseudo} {
global eva
set tmp ""
foreach bb $eva(operlist) {
if {$bb != "$pseudo"} {lappend tmp $bb}
}
set eva(operlist) "$tmp"
}
proc deloperquit {pseudo} {
global eva
foreach a $eva(operlist) {
if {$a=="$pseudo"} {set b 1}
}
if ![info exists b] {set b 0}
if {$b=="1"} {deloper $pseudo}
}
proc operchnick {pseudo newpseudo} {
global eva
foreach a $eva(operlist) {
if {$a=="$pseudo"} {set b 1}
}
if ![info exists b] {set b 0}
if {$b=="1"} {deloper $pseudo; addoper $newpseudo}
}
proc avertdcc {a} {
set i [hand2idx $a]
putdcc $i "\2Accs refus!"
}
proc avertmsg {i} {
global eva
send ":$eva(nick) NOTICE $i :\2Accs refus!"
}
proc send {arg} {

global eva
set arg [debug $arg]
putdcc $eva(idx) [join $arg]
}
proc anonce {nick hand} {
global eva hostclone
if {[matchattr $hand n]} {
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :*** Notice -- $nick ($hostc
lone($nick)) est maintenant Administrateur Serveur ($hand)"
}
sendsoho "\2$nick\2 est maintenant identifi comme -Admini
strateur Serveur- ($hand)"
return 0
}
if {[matchattr $hand C]} {
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :*** Notice -- $nick ($hostc
lone($nick)) est maintenant Responsable Gofrontistes ($hand)"
}
sendsoho "\2$nick\2 est maintenant identifi comme -Respon
sable Gofrontistes- ($hand)"
return 0
}
if {[matchattr $hand B]} {
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :*** Notice -- $nick ($hostc
lone($nick)) est maintenant IRCoprateur ($hand)"
}
sendsoho "\2$nick\2 est maintenant identifi comme -IRCopra
teur- ($hand)"
return 0
}
if {[matchattr $hand A]} {
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :*** Notice -- $nick ($hostc
lone($nick)) est maintenant Gofrontiste ($hand)"
}
sendsoho "\2$nick\2 est maintenant identifi comme -Gofront
iste- ($hand)"
return 0
}
if {[matchattr $hand D]} {
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :*** Notice -- $nick ($hostc
lone($nick)) est maintenant Administrateur Services ($hand)"
}
sendsoho "\2$nick\2 est maintenant identifi comme -Admini
strateur Services- ($hand)"
return 0
}
}
proc rater {nick} {
global eva hostclone
foreach a $eva(operlist) {
send ":$eva(serv) NOTICE $a :*** Notice -- Tentative de auth rate
par $nick ($hostclone($nick))"
}

sendsoho "Tentative de auth rate par \2$nick"


}
proc sendlog {text} {
global eva
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :$text"
}
proc sendsoho {text} {
global eva
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(soho) :$text"
}
proc delclones {host} {
global clone clone
if [info exists clone($host)] {
set clonenombre "[expr $clone($host) - 1]"
set clone($host) "$clonenombre"
if {$clone($host)<="0"} {
unset clone($host)
}
}
}
bind evnt - prerestart restart1
proc restart1 {arg} {
global eva
putdcc $eva(idx) ":$eva(serv) SQUIT $eva(serv) :Restarting Serveur!"
}
bind evnt - restart restart2
proc restart2 {arg} {
proc:xconnect
}
bind raw - 001 rawconnect
proc rawconnect {from key arg} {
global ircop botnick eva
putserv "OPER $ircop(onick) $ircop(opass)"
putserv "MODE $botnick $ircop(modes)"
foreach a $ircop(ident) {
putserv "$a"
}
foreach b [channels] {
if {$b=="$eva(chan)"} {set evachan "1"}
if {$b=="$eva(chanbot)"} {set evachanbot "1"}
if {$b=="$eva(soho)"} {set evasoho "1"}
}
if {![info exists evachan]} {channel add $eva(chan)}
if {![info exists evachanbot]} {channel add $eva(chanbot)}
if {![info exists evasoho]} {channel add $eva(soho)}
regsub -all { } [channels] {,} c
putserv "JOIN $c x"
foreach d [channels] {
putserv "MODE $d x+o $botnick"
}
}
bind raw - "471" failed:join
bind raw - "473" failed:join

bind raw - "474" failed:join


bind raw - "475" failed:join
proc failed:join {args} {
global botnick
set chanjoin [lindex $args 2]
set chanjoin [lindex $chanjoin 1]
putlog "Utilisation d'une Masterkey pour joindre $chanjoin"
putserv "JOIN $chanjoin x"
return 0
}
bind join - "*" proc:join
proc proc:join { nick user hand chan } {
global botnick
if {$nick=="$botnick"} {
putserv "MODE $chan x+ov $botnick"
}
}
bind ctcp - chat proc:chat
proc proc:chat {nick uhost hand dest key arg} {
global eva
putserv "PRIVMSG #Eva :Requte de connexion: $nick DCC CHAT [myip] $a"
setuser $login HOSTS $newnick*!*@*
}
bind mode - * chmode
proc chmode {nick host hand chan mode who} {
global botnick eva
if {$nick=="$botnick"} {return 0}
if {[string match *+b* $mode]} {
if {[string match [strlwr $who] [strlwr "$botnick![getchanhost $
botnick $chan]"]]} {
putserv "MODE $chan -ob $nick $who"
putserv "KICK $chan $nick :Il est interdit de bannir le
Robot!"
putserv "PRIVMSG $eva(chanbot) :Ban du robot sur $chan (
Par $nick)"
}
}
if {[string match *-o* $mode] && [string match *$botnick* $who]} {
putserv "MODE $chan x+o $botnick"
putserv "KICK $chan $nick :Il est interdit de doper le Robot!"
putserv "PRIVMSG $eva(chanbot) :Deop du robot sur $chan (Par $ni
ck)"
}
}
bind kick - * kickchan
proc kickchan {nick uhost hand chan target raison} {
global botnick eva
if {$nick=="$botnick"} {return 0}
if {$target=="$botnick"} {
putserv "PRIVMSG $eva(chanbot) :Kick du robot sur $chan (Par $ni
ck)"
putserv "JOIN $chan x"
putserv "MODE $chan x+ob $botnick *!*$uhost"
if {[onchan $nick $chan]} {

putserv "KICK $chan $nick :Il est interdit de kicker le


Robot!"
}
}
}
proc gline {host time by msg} {
global eva xwho hostclone clone
if [info exists clone($host)] {set nb "$clone($host)"}
if ![info exists clone($host)] {set nb "0"}
set expire "expire le [clock format [expr $time + [clock second]] -forma
t "%d/%m/%Y %H:%M (GMT+1)"]"
set date "([clock format [clock seconds] -format "%d/%m/%Y %H:%M"])"
regsub -all {} $expire {} expire
regsub -all {} $date {} date
if {$by==""} {
send ":$eva(serv) GLINE * *@$host $time :\[$nb\] $msg, $expire - $date"
} else {
send ":$eva(serv) GLINE * *@$host $time :\[$nb\] $msg, $expire - $by $da
te"
}
}
proc kill {pseudo by msg} {
global eva xwho hostclone clone userserv
if {$by==""} {
send ":$eva(nick) KILL $pseudo :$msg"
} else {
send ":$eva(nick) KILL $pseudo :$msg - $by"
}
foreach a $eva(servs) {
foreach b $userserv($a) {
set tmp ""
if {$b!=$pseudo} {lappend tmp $b}
set userserv($a) "$tmp"
}
}
set tmp ""
set temp "$hostclone($pseudo)"
set tempe "$xwho($temp)"
foreach bb $tempe {
if {$bb != "$pseudo"} {lappend tmp $bb}
}
set xwho($temp) "$tmp"
delclones $temp
unset hostclone($pseudo)
deloperquit $pseudo
deauth $pseudo
return 0
}
############
# Fichiers #
############
if ![file exist badchan.db] {
fcreate badchan.db
putlog "\2Creation:\2 Database Badchan"
}

if ![file exist excbadchan.db] {


fcreate excbadchan.db
putlog "\2Creation:\2 Database Excbadchan"
}
if ![file exist xtrust.db] {
fcreate xtrust.db
putlog "\2Creation:\2 Database Xtrust"
}
if ![file exist chanoff.db] {
fcreate chanoff.db
putlog "\2Creation:\2 Database Chanoff"
}
if ![file exist autorise.db] {
fcreate autorise.db
putlog "\2Creation:\2 Database Autorise"
}
if ![file exist welcome.db] {
fcreate welcome.db
putlog "\2Creation:\2 Database Welcome"
}
if ![file exists modes.db] {
fcreate modes.db
putlog "\2Creation:\2 Database Modes"
}
if ![file exists diogene.log] {
fcreate diogene.log
putlog "\2Creation:\2 Logfile"
}
if ![file exists xnoops.db] {
fcreate xnoops.db
putlog "\2Creation:\2 Database xnoops"
}
if ![file exists xnovoice.db] {
fcreate xnovoice.db
putlog "\2Creation:\2 Database XNovoice"
}
if ![file exists xallops.db] {
fcreate xallops.db
putlog "\2Creation:\2 Database Xallops"
}
if ![file exists xallvoice.db] {
fcreate xallvoice.db
putlog "\2Creation:\2 Database Xallvoice"
}
if ![file exists xnobans.db] {
fcreate xnobans.db
putlog "\2Creation:\2 Database Xnobans"
}

if ![file exists xnotopic.db] {


fcreate xnotopic.db
putlog "\2Creation:\2 Database Xnotopic"
}
if ![file exists xpermclose.db] {
fcreate xpermclose.db
putlog "\2Creation:\2 Database Xpermclose"
}
if ![file exists topics.db] {
fcreate topics.db
putlog "\2Creation:\2 Database Topics"
}
if ![file exists xwelcome.db] {
fcreate xwelcome.db
putlog "\2Creation:\2 Database XWelcome"
}
if ![file exists xdefgline.db] {
fcreate xdefgline.db
putlog "\2Creation:\2 Database XDefgline"
}
if ![file exists xdefkill.db] {
fcreate xdefkill.db
putlog "\2Creation:\2 Database XDefkill"
}
if ![file exists login.tmp] {
fcreate login.tmp
}
#################
# Proc De Check #
#################
proc check_badchan {chan} {
global eva
set eva(badchan) "[fread badchan.db]"
set eva(excbadchan) "[fread excbadchan.db]"
set eva(chanoff) "[fread chanoff.db]"
if {[isindb $eva(badchan) $chan]!=-1 && [isindb $eva(excbadchan) $chan]==-1 &&
[isindb $eva(chanoff) $chan]==-1} {
set eva(act) "1"
send ":$eva(nick) JOIN $chan"
send ":$eva(nick) MODE $chan +o $eva(nick)"
sendlog "Join 41 $eva(nick) Sur: $chan - Fermeture!"
send ":$eva(nick) MODE $chan +imsnt"
send ":$eva(nick) TOPIC $chan :$eva(topic)"
send ":$eva(nick) WHO $chan"
xclose $chan
}
set fichier [fread modes.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[string match [lindex $c 0] $chan]} {send ":$eva(serv) MODE
$chan +[lindex $c 1]"}

}
return 0
}
proc check_chanbot {chan nick} {
global eva botnick
set eva(autorise) "[fread autorise.db]"
if {$chan==$eva(chanbot)} {
send ":$eva(nick) PRIVMSG $eva(chanbot) :Recherche d'authentific
ation pour \2$nick\2 ..."
send ":$eva(nick) PRIVMSG $eva(chanbot) :Si \2$nick\2 n'est pas
autoris a entrer dans ce salon, il sera sorti automatiquement..."
send ":$eva(nick) PRIVMSG $eva(chanbot) :Patientez un instant...
"
if {[isindb $eva(autorise) $nick]==-1} {
send ":$eva(nick) PRIVMSG $eva(chanbot) :Authentificatio
n \2\0034Refuse\003\2 pour \2$nick"
sendsoho "\2$nick\2 a rejoint \2$eva(chanbot)\2 et n'est
\2\0034pas autoris\2\003 rester"
send ":$eva(nick) SAPART $nick $eva(chanbot)"
return 0
}
if {[isindb $eva(autorise) $nick]!=-1} {
send ":$eva(nick) PRIVMSG $eva(chanbot) :Authentificatio
n \2\0033Russie\003\2 pour \2$nick"
send ":$eva(nick) PRIVMSG $eva(chanbot) :Bienvenue parmi
s nous \2$nick\2!"
sendsoho "\2$nick\2 a rejoint \2$eva(chanbot)\2 et est \
2\0033autoris\2\003 rester"
return 0
}
}
}
proc check_evachan {chan nick} {
global eva botnick
if {$chan==$eva(chan)} {
if {$nick==$botnick} {return 0}
if {[lsearch -exact "$eva(listexclones)" $nick] != -1} {return 0}
sendsoho "\2$nick\2 a rejoint \2$eva(chan)"
if {![isauth $nick]} {
sendlog "Autorisation d'utiliser le service refuse pour \
2$nick\2"
sendlog "\2$nick\2 peut rester parmis nous mais ne peut
pas parler!"
}
if {[isauth $nick]} {
send ":$eva(nick) MODE $eva(chan) +v $nick"
set fichier [fread login.tmp]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
if {[lindex $c 1]=="$nick"} {set hand "[lindex $
c 0]"}
}
if [matchattr $hand n] {sendlog "Administrateur Serveur
\2$hand\2 est maintenant autoris a utiliser le service!"; return 0}
if [matchattr $hand C] {sendlog "Responsable Gofrontistes
\2$hand\2 est maintenant autoris a utiliser le service!"; return 0}
if [matchattr $hand B] {sendlog "IRCoprateur \2$hand\2 es

t maintenant autoris a utiliser le service!"; return 0}


if [matchattr $hand A] {sendlog "Gofrontiste \2$hand\2 e
st maintenant autoris a utiliser le service!"; return 0}
if [matchattr $hand D] {sendlog "Administrateur Services
\2$nick\2 est maintenant autoris a utiliser le service!"; return 0}
}
}
return 0
}
proc detect_clones {host pseudo} {
global eva clone hostclone xwho
if {[info exists clone($host)]} {
incr clone($host) 1
if {$eva(detectclone)=="0"} {return 0}
if {$clone($host) >= $eva(cloneavert)} {
set reste [expr $eva(clonelimit) - $clone($host)]
foreach x $eva(operlist) {
send ":$eva(serv) NOTICE $x :Avertissement! $clone($host) connections pr
evenant de $host - Encore $reste avant le Gline..."
}
}
set eva(xtrust) "[fread xtrust.db]"
if {$clone($host) >= $eva(clonelimit)} {
if {[lsearch -exact "$eva(xtrust)" $host] != -1} {
return 0
}
gline $host 3600 "" "$eva(rglineclones)"
return 0
}
} else {
set clone($host) 1
}
}
proc detect_defini {nick ident host name} {
global eva hostclone
set fichier [fread xdefgline.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp "[lindex $c 0]"
set type "[lindex $c 1]"
if {[string match $temp $nick] && $type=="nick"} {
set time [lindex $c 2]
set raison "[lrange $c 3 end]"
regsub -all {:} $raison { } raison
set tmp "$hostclone($nick)"
gline $tmp $time "" "$raison"
}
if {[string match $temp $ident] && $type=="ident"} {
set time [lindex $c 2]
set raison "[lrange $c 3 end]"
regsub -all {:} $raison { } raison
set tmp "$hostclone($nick)"
gline $tmp $time "" "$raison"
}
if {[string match $temp $host] && $type=="host"} {
set time [lindex $c 2]

set raison "[lrange $c 3 end]"


regsub -all {:} $raison { } raison
set tmp "$hostclone($nick)"
gline $tmp $time "" "$raison"
}
if {[string match $temp $name] && $type=="name"} {
set time [lindex $c 2]
set raison "[lrange $c 3 end]"
regsub -all {:} $raison { } raison
set tmp "$hostclone($nick)"
gline $tmp $time "" "$raison"
}
}
set fichier [fread xdefkill.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set temp "[lindex $c 0]"
set type [lindex $c 1]
if {[string match $temp $nick] && $type=="nick"} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
kill $nick "" "$raison"
}
if {[string match $temp $ident] && $type=="ident"} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
kill $nick "" "$raison"
}
if {[string match $temp $host] && $type=="host"} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
kill $nick "" "$raison"
}
if {[string match $temp $name] && $type=="name"} {
set raison "[lrange $c 2 end]"
regsub -all {:} $raison { } raison
kill $nick "" "$raison"
}
}
}
##############
# Proc event #
##############
proc eva_event {idx arg} {
global eva clone hostclone xwho welcome userserv socket tempchan
set arg [debug $arg]
set event [lindex $arg 1]
if {$eva(debug)=="1"} {
putlog "$arg"
}
if {$event==352} {
set salon [lindex $arg 3]
set identd [lindex $arg 4]
set host [lindex $arg 5]
set pseudo [lindex $arg 7]
if {$eva(act)=="1"} {
if {$pseudo=="$eva(nick)"} {return 0}

send ":$eva(nick) KICK $salon $pseudo :Channel ferm!"


sendlog "XClose sur $salon sur $pseudo - Raison: Channel ferm! - par $ev
a(nick)"
}
if {$eva(act)=="4"} {
send ":$eva(serv) MODE $salon -v $pseudo"
send ":$eva(serv) MODE $salon -o $pseudo"
}
if {$eva(act)=="3"} {
send ":$eva(serv) MODE $eva(salonban) +b $host"
}
if {$eva(act)=="5"} {
kill $pseudo "" "Hostname Killed"
sendlog "Host Killed sur $pseudo - Raison: Hostname Killed - par $eva
(nick)"
}
if {$eva(act)=="6"} {
if {$pseudo=="$eva(nick)"} {return 0}
kill $pseudo "" "Mass Kill Channel"
sendlog "Mass-Killed 1 sur $pseudo - Raison: Mass Kill - par $eva(nick)
"
}
if {$eva(act)=="7"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Pseudo:\2 $pseudo - \2Id
ent:\2 $identd - \2Host Cod:\2 $host"
}
if {$eva(act)=="7bis"} {
putdcc $eva(idx2) "\2Pseudo:\2 $pseudo - \2Ident:\2 $identd - \2
Host Cod:\2 $host"
}
if {$eva(act)=="9"} {
send ":$eva(serv) KICK $salon $pseudo :Mass Kicked"
}
if {$eva(act)=="collide"} {
send ":$eva(serv) NICK $pseudo 1 1 xxx collide.Diogene $eva(serv
) :XCollideR"
send ":$pseudo QUIT :Left IRC Server!"
}
if {$eva(act)=="10"} {
send ":$eva(serv) MODE $salon +o $pseudo"
}
if {$eva(act)=="11"} {
send ":$eva(serv) MODE $salon -o $pseudo"
}
if {$eva(act)=="12"} {
send ":$eva(serv) MODE $salon +v $pseudo"
}
if {$eva(act)=="13"} {
send ":$eva(serv) MODE $salon -v $pseudo"
}
if {$eva(act)=="15"} {
send ":$eva(nick) SAJOIN $pseudo $eva(salonsajoin)"
}
}
if {$event==311} {
set realname [lrange $arg 7 end]
set identd [lindex $arg 4]
set host [lindex $arg 5]
if {$eva(act)=="8"} {

send ":$eva(nick) NOTICE $eva(nick2) :\2Realname:\2 $rea


lname"
send ":$eva(nick) NOTICE $eva(nick2) :\2User@Host:\2 $id
entd@$host"
send ":$eva(nick) NOTICE $eva(nick2) :\2Host De Gline:\2
*@$host"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Realname:\2 $realname"
putdcc $eva(idx2) "\2User@Host:\2 $identd@$host"
putdcc $eva(idx2) "\2Host De Gline:\2 *@$host"
}
return 0
}
if {$event==312} {
set serv [lrange $arg 4 end]
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Connect Sur\2: $s
erv"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Connect Sur\2: $serv"
}
return 0
}
if {$event==313} {
set status [lrange $arg 6 end]
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Status\2: $statu
s"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Status\2: $status"
}
return 0
}
if {$event==317} {
set idle [lindex $arg 4]
set signon [lindex $arg 5]
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Idle\2: [duratio
n $idle]"
send ":$eva(nick) NOTICE $eva(nick2) :\2Connect depuis\2:
[clock format $signon -format "%d/%m/%Y, %H[]h%M"]"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Idle\2: [duration $idle]"
putdcc $eva(idx2) "\2Connect depuis\2: [clock format $sig
non -format "%d/%m/%Y, %H[]h%M"]"
}
return 0
}
if {$event==318} {
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2-= Fin De Xwhois
=-"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Fin De Xwhois"
}

return 0
}
if {$event==319} {
set salons [lrange $arg 4 end]
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Prsent Sur\2: $sa
lons"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Prsent Sur\2: $salons"
}
return 0
}
if {$event==320} {
if {$eva(act)=="8"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Protection de l'
host\2: Active"
}
if {$eva(act)=="8bis"} {
putdcc $eva(idx2) "\2Protection de l'host\2: Active"
}
return 0
}
if {$event==247} {
set host [lindex $arg 4]
set raison [lrange $arg 6 end]
if {$eva(act)=="2"} {
send ":$eva(nick) NOTICE $eva(nick2) :\2Host:\2 $host \2Raison:\
2 $raison"
}
if {$eva(act)=="2bis"} {
putdcc $eva(idx2) "\2Host:\2 $host \2Raison:\2 $raison"
}
if {$eva(act)=="14"} {
send ":$eva(serv) GLINE * -$host"
}
return 0
}
if {$event=="PRIVMSG"} {
set nick "[string trim [lindex $arg 0] :]"
set msg "[string trim [lrange $arg 3 end] :]"
set nickto "[lindex $arg 2]"
if {$msg=="VERSION" && $nickto=="$eva(nick)"} {
putdcc $eva(idx) ":$eva(nick) NOTICE $nick :VERSION Eva Service $
eva(vers) BlueIRC.com - Tous droits rservs"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :\2\00310Versio
n \0034Par\2 $nick"
return 0
}
if {$msg=="VERSION" && $nickto=="$welcome(nick)"} {
putdcc $eva(idx) ":$welcome(nick) NOTICE $nick :VERSION Eva Servi
ce $eva(vers) BlueIRC.com - Tous droits rservs"
putdcc $eva(idx) ":$welcome(nick) PRIVMSG $eva(chan) :\2\00310Ve
rsion \0034Par\2 $nick"
return 0
}
if {$msg=="VERSION" && $nickto=="$socket(nick)"} {
putdcc $eva(idx) ":$socket(nick) NOTICE $nick :VERSION Eva Servic
e $eva(vers) BlueIRC.com - Tous droits rservs"
putdcc $eva(idx) ":$socket(nick) PRIVMSG $eva(chan) :\2\00310Ver

sion \0034Par\2 $nick"


return 0
}
if {[lindex $msg 0]==".liste" && $nickto=="$socket(nick)"} {
set tmp [lindex $msg 1]
if {$tmp==""} {
send ":$socket(nick) PRIVMSG $nick :Veuillez prciser un A
rgument de recherche!"
return 0
}
set chanoff "[fread chanoff.db]"
set b ""
foreach a $chanoff {
if {[string match $tmp $a]} {lappend b $a}
}
if {$b==""} {
send ":$socket(nick) PRIVMSG $nick :\2Aucun rsultat obtenu lors d
e votre recherche."
return 0
}
send ":$socket(nick) PRIVMSG $nick :\2Rsultat de votre recherche:
"
send ":$socket(nick) PRIVMSG $nick :$b"
}
if {[lindex $msg 0]=="xaccess" && $nickto=="$eva(nick)"} {
msg:xaccess $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xhelp" && $nickto=="$eva(nick)"} {
msg:xhelp $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="operlist" && $nickto=="$eva(nick)"} {
msg:operlist $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="geolist" && $nickto=="$eva(nick)"} {
msg:geolist $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="geosend" && $nickto=="$eva(nick)"} {
msg:geosend $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="login" && $nickto=="$eva(nick)"} {
eva:login $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xop" && $nickto=="$eva(nick)"} {
msg:xop $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdeop" && $nickto=="$eva(nick)"} {
msg:xdeop $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xvoice" && $nickto=="$eva(nick)"} {
msg:xvoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdevoice" && $nickto=="$eva(nick)"} {
msg:xdevoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xgline" && $nickto=="$eva(nick)"} {
msg:xgline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xungline" && $nickto=="$eva(nick)"} {
msg:xungline $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="xmode" && $nickto=="$eva(nick)"} {


msg:xmode $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xglist" && $nickto=="$eva(nick)"} {
msg:xglist $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xban" && $nickto=="$eva(nick)"} {
msg:xban $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xunban" && $nickto=="$eva(nick)"} {
msg:xunban $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xtopic" && $nickto=="$eva(nick)"} {
msg:xtopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xclearmodes" && $nickto=="$eva(nick)"} {
msg:xclearmodes $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xhostkill" && $nickto=="$eva(nick)"} {
msg:xhostkill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xkill" && $nickto=="$eva(nick)"} {
msg:xkill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xclose" && $nickto=="$eva(nick)"} {
msg:xclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xchankill" && $nickto=="$eva(nick)"} {
msg:xchankill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xwall" && $nickto=="$eva(nick)"} {
msg:xwall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xwallops" && $nickto=="$eva(nick)"} {
msg:xwallops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xkick" && $nickto=="$eva(nick)"} {
msg:xkick $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xkickban" && $nickto=="$eva(nick)"} {
msg:xkickban $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xlistclose" && $nickto=="$eva(nick)"} {
msg:xlistclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xunclose" && $nickto=="$eva(nick)"} {
msg:xunclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xinviteme" && $nickto=="$eva(nick)"} {
msg:xinviteme $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xinvite" && $nickto=="$eva(nick)"} {
msg:xinvite $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xopersend" && $nickto=="$eva(nick)"} {
msg:xopersend $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsecu" && $nickto=="$eva(nick)"} {
msg:xsecu $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="xnoconnect" && $nickto=="$eva(nick)"} {


msg:xnoconnect $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xwho" && $nickto=="$eva(nick)"} {
msg:xwho $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xwhois" && $nickto=="$eva(nick)"} {
msg:xwhois $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xjoin" && $nickto=="$eva(nick)"} {
msg:xjoin $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xpart" && $nickto=="$eva(nick)"} {
msg:xpart $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsvsnick" && $nickto=="$eva(nick)"} {
msg:xsvsnick $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xkickall" && $nickto=="$eva(nick)"} {
msg:xkickall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xopall" && $nickto=="$eva(nick)"} {
msg:xopall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdeopall" && $nickto=="$eva(nick)"} {
msg:xdeopall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xvoiceall" && $nickto=="$eva(nick)"} {
msg:xvoiceall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdevoiceall" && $nickto=="$eva(nick)"} {
msg:xdevoiceall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xunglineall" && $nickto=="$eva(nick)"} {
msg:xcleargline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xcleargline" && $nickto=="$eva(nick)"} {
msg:xcleargline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xnotice" && $nickto=="$eva(nick)"} {
msg:xnotice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsnotice" && $nickto=="$eva(nick)"} {
msg:xsnotice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsay" && $nickto=="$eva(nick)"} {
msg:xsay $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xact" && $nickto=="$eva(nick)"} {
msg:xact $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xpurge" && $nickto=="$eva(nick)"} {
msg:xpurge $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsajoin" && $nickto=="$eva(nick)"} {
msg:xsajoin $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsapart" && $nickto=="$eva(nick)"} {
msg:xsapart $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="xsajoinall" && $nickto=="$eva(nick)"} {


msg:xsajoinall $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xraw" && $nickto=="$eva(nick)"} {
msg:xraw $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xclone" && $nickto=="$eva(nick)"} {
msg:+xclone $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xclone" && $nickto=="$eva(nick)"} {
msg:-xclone $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xclone" && $nickto=="$eva(nick)"} {
msg:xclone $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xmove" && $nickto=="$eva(nick)"} {
msg:xmove $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xsort" && $nickto=="$eva(nick)"} {
msg:xsort $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+autorise" && $nickto=="$eva(nick)"} {
msg:+autorise $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-autorise" && $nickto=="$eva(nick)"} {
msg:-autorise $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="autorise" && $nickto=="$eva(nick)"} {
msg:autorise $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="welcome" && $nickto=="$eva(nick)"} {
msg:welcome $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+badchan" && $nickto=="$eva(nick)"} {
msg:+badchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-badchan" && $nickto=="$eva(nick)"} {
msg:-badchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="badchan" && $nickto=="$eva(nick)"} {
msg:badchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+excbadchan" && $nickto=="$eva(nick)"} {
msg:+excbadchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-excbadchan" && $nickto=="$eva(nick)"} {
msg:-excbadchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="excbadchan" && $nickto=="$eva(nick)"} {
msg:excbadchan $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xtrust" && $nickto=="$eva(nick)"} {
msg:+xtrust $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xtrust" && $nickto=="$eva(nick)"} {
msg:-xtrust $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xtrust" && $nickto=="$eva(nick)"} {
msg:xtrust $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="+chanoff" && $nickto=="$eva(nick)"} {


msg:+chanoff $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-chanoff" && $nickto=="$eva(nick)"} {
msg:-chanoff $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="chanoff" && $nickto=="$eva(nick)"} {
msg:chanoff $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xnoops" && $nickto=="$eva(nick)"} {
msg:+xnoops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xnoops" && $nickto=="$eva(nick)"} {
msg:-xnoops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xnoops" && $nickto=="$eva(nick)"} {
msg:xnoops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xdefmodes" && $nickto=="$eva(nick)"} {
msg:+xdefmodes $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xdefmodes" && $nickto=="$eva(nick)"} {
msg:-xdefmodes $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdefmodes" && $nickto=="$eva(nick)"} {
msg:xdefmodes $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xnovoice" && $nickto=="$eva(nick)"} {
msg:+xnovoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xnovoice" && $nickto=="$eva(nick)"} {
msg:-xnovoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xnovoice" && $nickto=="$eva(nick)"} {
msg:xnovoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xallops" && $nickto=="$eva(nick)"} {
msg:+xallops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xallops" && $nickto=="$eva(nick)"} {
msg:-xallops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xallops" && $nickto=="$eva(nick)"} {
msg:xallops $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xallvoice" && $nickto=="$eva(nick)"} {
msg:+xallvoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xallvoice" && $nickto=="$eva(nick)"} {
msg:-xallvoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xallvoice" && $nickto=="$eva(nick)"} {
msg:xallvoice $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xnobans" && $nickto=="$eva(nick)"} {
msg:+xnobans $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xnobans" && $nickto=="$eva(nick)"} {
msg:-xnobans $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="xnobans" && $nickto=="$eva(nick)"} {


msg:xnobans $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xnotopic" && $nickto=="$eva(nick)"} {
msg:+xnotopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xnotopic" && $nickto=="$eva(nick)"} {
msg:-xnotopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xnotopic" && $nickto=="$eva(nick)"} {
msg:xnotopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xpermclose" && $nickto=="$eva(nick)"} {
msg:+xpermclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xpermclose" && $nickto=="$eva(nick)"} {
msg:-xpermclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xpermclose" && $nickto=="$eva(nick)"} {
msg:xpermclose $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xdeftopic" && $nickto=="$eva(nick)"} {
msg:+xdeftopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xdeftopic" && $nickto=="$eva(nick)"} {
msg:-xdeftopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdeftopic" && $nickto=="$eva(nick)"} {
msg:xdeftopic $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xwelcome" && $nickto=="$eva(nick)"} {
msg:+xwelcome $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xwelcome" && $nickto=="$eva(nick)"} {
msg:-xwelcome $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xwelcome" && $nickto=="$eva(nick)"} {
msg:xwelcome $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xdefgline" && $nickto=="$eva(nick)"} {
msg:+xdefgline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xdefgline" && $nickto=="$eva(nick)"} {
msg:-xdefgline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdefgline" && $nickto=="$eva(nick)"} {
msg:xdefgline $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="+xdefkill" && $nickto=="$eva(nick)"} {
msg:+xdefkill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="-xdefkill" && $nickto=="$eva(nick)"} {
msg:-xdefkill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xdefkill" && $nickto=="$eva(nick)"} {
msg:xdefkill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="addgeo" && $nickto=="$eva(nick)"} {
msg:addgeo $nick "" [nick2login $nick] [lrange $msg 1 end]
}

if {[lindex $msg 0]=="addircop" && $nickto=="$eva(nick)"} {


msg:addircop $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="addrs" && $nickto=="$eva(nick)"} {
msg:addrs $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="addsa" && $nickto=="$eva(nick)"} {
msg:addsa $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="addadmin" && $nickto=="$eva(nick)"} {
msg:addadmin $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="delacces" && $nickto=="$eva(nick)"} {
msg:delacces $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="aop" && $nickto=="$eva(nick)"} {
msg:aop $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="adeop" && $nickto=="$eva(nick)"} {
msg:adeop $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="akick" && $nickto=="$eva(nick)"} {
msg:akick $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="akill" && $nickto=="$eva(nick)"} {
msg:akill $nick "" [nick2login $nick] [lrange $msg 1 end]
}
if {[lindex $msg 0]=="xcollide" && $nickto=="$eva(nick)"} {
msg:xcollide $nick "" [nick2login $nick] [lrange $msg 1 end]
}
return 0
}
if {$event=="SETHOST"} {
set nick "[string trim [lindex $arg 0] :]"
set host "[string trim [lindex $arg 2] :]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :SetHost sur $nick - Host: $ho
st"
return 0
}
if {$event=="SQUIT"} {
set serv "[lindex $arg 2]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :NetBreak Sur le Link/Serv $
serv"
foreach pseudo $userserv($serv) {
set tmp ""
set host "$hostclone($pseudo)"
set tempe "$xwho($host)"
foreach bb $tempe {
if {$bb != "$pseudo"} {lappend tmp $bb}
}
set xwho($host) "$tmp"
delclones $host
unset hostclone($pseudo)
deloperquit $pseudo
deauth $pseudo
}
unset userserv($serv)
set tmp ""
foreach a $eva(servs) {
if {$a!=$serv} {lappend tmp $a}

}
set eva(servs) "$tmp"
return 0
}
if {$event=="SERVER"} {
set serv "[lindex $arg 2]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :4NetMerge avec le Link/Serve
ur -1 $serv"
lappend eva(servs) $serv
set userserv($serv) " "
return 0
}
if {$event=="JOIN"} {
set salon "[string trim [lindex $arg 2] :]"
set pseudo "[string trim [lindex $arg 0] :]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Join par $pseud
o - sur $salon"
foreach chan [split [lindex $arg 2] ,] {
set fichier [fread xwelcome.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salle "[lindex $c 0]"
if {[string match $salle $chan]} {
set xwelcome "[lrange $c 1 end]"
regsub -all {:} $xwelcome { } xwelcome
send ":$eva(nick) NOTICE $pseudo :$xwelc
ome"
}
}
if {![info exists tempchan($chan)]} {
set tempchan($chan) "1"
set fichier [fread topics.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salle "[lindex $c 0]"
if {[string match $salle $chan]} {
set topic "[lrange $c 1 end]"
regsub -all {:} $topic { } topic
send ":$eva(nick) JOIN $chan"
send ":$eva(nick) MODE $chan x+o $eva(ni
ck)"
send ":$eva(nick) TOPIC $chan :$topic"
set eva(xpermclose) "[fread xpermclose.d
b]"
if {$chan!="$eva(chan)" && $chan!="$eva(
chanbot)" && $chan!="$eva(soho)" && [isxclose $chan]!="1" && [isindb $eva(xpermc
lose) $chan]==-1} {send ":$eva(nick) PART $chan"}
}
}
}
set eva(xnoops) "[fread xnoops.db]"
if {[isindb $eva(xnoops) $chan]!=-1} {
send ":$eva(serv) MODE $chan -o $pseudo"
}
set eva(xallops) "[fread xallops.db]"
if {[isindb $eva(xallops) $chan]!=-1} {
send ":$eva(serv) MODE $chan +o $pseudo"
}

set eva(xallvoice) "[fread xallvoice.db]"


if {[isindb $eva(xallvoice) $chan]!=-1} {
send ":$eva(serv) MODE $chan +v $pseudo"
}
check_badchan $chan
check_chanbot $chan $pseudo
check_evachan $chan $pseudo
}
return 0
}
if {$event=="PART"} {
set pseudo "[string trim [lindex $arg 0] :]"
set salon "[string trim [lindex $arg 2] :]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Part de $pseudo
- Sur $salon"
return 0
}
if {$event=="MODE"} {
set usermode "[lindex $arg 3]"
set usernick "[lindex $arg 2]"
set pseudo "[string trim [lindex $arg 0] :]"
set salon "[lindex $arg 2]"
set mode "[lrange $arg 3 end]"
if [string match *+*o* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo est maintenant IRCoprateur"
addoper $pseudo
sendsoho "\2$pseudo\2 est maintenant IRCoprateur"
}
}
if [string match *-*o* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo n'est plus IRCoprateur"
deloper $pseudo
sendsoho "\2$pseudo\2 n'est plus IRCoprateur"
}
}
if [string match *+*O* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo est maintenant IRCoprateur"
addoper $pseudo
sendsoho "\2$pseudo\2 est maintenant IRCoprateur"
}
}
if [string match *-*O* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo n'est plus IRCoprateur"
deloper $pseudo
sendsoho "\2$pseudo\2 n'est plus IRCoprateur"
}
}
if [string match *+*A* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo est maintenant IRCAdministrateur"
}

}
if [string match *-*A* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo n'est plus IRCAdministrateur"
}
}
if [string match *+*a* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo est maintenant Service Administrateur"
}
}
if [string match *-*a* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo n'est plus Service Administrateur"
}
}
if [string match *+*k* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo est maintenant Protg"
}
}
if [string match *-*k* $usermode] {
if {[string match -nocase $pseudo $salon]} {
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan)
:Opers 1 $pseudo n'est plus Protg"
}
}
if {![string match -nocase $pseudo $salon]} {
if {[string match *-*o*$eva(nick)* $mode]} { putdcc $eva
(idx) ":$eva(nick) MODE $salon x+o $eva(nick)" }
if {[string match *-*o*$welcome(nick)* $mode]} { putdcc
$eva(idx) ":$welcome(nick) MODE $salon x+o $welcome(nick)" }
if {[string match *-*o*$socket(nick)* $mode]} { putdcc $
eva(idx) ":$socket(nick) MODE $salon x+o $socket(nick)" }
if {![string match *.* $pseudo]} {check_badchan $salon}
if {[string match *+*o* $mode] && ![string match *.* $ps
eudo]} {
set eva(xnoops) "[fread xnoops.db]"
if {[isindb $eva(xnoops) $salon]!=-1} {
send ":$eva(serv) MODE $salon -ooooooo [lrange $
mode 1 end]"
send ":$socket(nick) PRIVMSG $pseudo :$salon a l
'option xnoops active"
}
}
if {[string match *+*v* $mode] && ![string match *.* $ps
eudo]} {
set eva(xnovoice) "[fread xnovoice.db]"
if {[isindb $eva(xnovoice) $salon]!=-1} {
send ":$eva(serv) MODE $salon -vvvvvv [lrange $m
ode 1 end]"
send ":$socket(nick) PRIVMSG $pseudo :$salon a l
'option xnovoice active"
}
}
if {[string match *-*o* $mode] && ![string match *.* $ps

eudo]} {
set eva(xallops) "[fread xallops.db]"
if {[isindb $eva(xallops) $salon]!=-1} {
send ":$eva(serv) MODE $salon +oooooo [lrange $m
ode 1 end]"
send ":$socket(nick) PRIVMSG $pseudo :$salon a l
'option xallops active"
}
}
if {[string match *-*v* $mode] && ![string match *.* $ps
eudo]} {
set eva(xallvoice) "[fread xallvoice.db]"
if {[isindb $eva(xallvoice) $salon]!=-1} {
send ":$eva(serv) MODE $salon +vvvvvv [lrange $m
ode 1 end]"
send ":$socket(nick) PRIVMSG $pseudo :$salon a l
'option xallvoice active"
}
}
if {[string match *+*b* $mode] && ![string match *.* $ps
eudo]} {
set eva(xnobans) "[fread xnobans.db]"
if {[isindb $eva(xnobans) $salon]!=-1} {
send ":$eva(serv) MODE $salon -bbbbbb [lrange $m
ode 1 end]"
send ":$socket(nick) PRIVMSG $pseudo :$salon a l
'option xnobans active"
}
}
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Modes
sur $salon - Modes $mode Par $pseudo"
return 0
} else {
return 0
}
}
if {$event=="KICK"} {
set kickeur "[string trim [lindex $arg 0] :]"
set victime "[lindex $arg 3]"
set salon "[lindex $arg 2]"
set raison "[string trim [lindex $arg 4] :]"
if {$victime==$eva(nick)} {
if {[string match *.* $kickeur]} {return 0}
kill $kickeur "" "Il est interdit de kick le robot"
putdcc $eva(idx) ":$eva(nick) JOIN $salon x"
putdcc $eva(idx) ":$eva(serv) MODE $salon +o $eva(nick)"
}
if {$victime==$welcome(nick)} {
if {[string match *.* $kickeur]} {return 0}
kill $kickeur "" "Il est interdit de kick le robot"
putdcc $eva(idx) ":$welcome(nick) JOIN $salon x"
putdcc $eva(idx) ":$eva(serv) MODE $salon +o $welcome(ni
ck)"
}
if {$victime==$socket(nick)} {
if {[string match *.* $kickeur]} {return 0}
kill $kickeur "" "Il est interdit de kick le robot"
putdcc $eva(idx) ":$socket(nick) JOIN $salon x"
putdcc $eva(idx) ":$eva(serv) MODE $salon +o $socket(nic
k)"

}
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Kicked
sur $salon sur $victime - Raison: $raison - Par: $kickeur"
return 0
}
if {$event=="KILL"} {
set killeur "[string trim [lindex $arg 0] :]"
set victime "[lindex $arg 2]"
set host "$hostclone($victime)"
set raison "[lrange $arg 4 end]"
if {$victime=="$eva(nick)"} {
send ":$eva(serv) NICK $eva(nick) 1 1 $eva(ident) $eva(h
ost) $eva(serv) :$eva(name)"
send ":$eva(nick) MODE $eva(nick) +owsAagdkp"
send ":$eva(nick) JOIN $eva(chan)"
send ":$eva(nick) JOIN $eva(soho)"
send ":$eva(nick) JOIN $eva(chanbot)"
send ":$eva(serv) MODE $eva(chan) +o $eva(nick)"
send ":$eva(serv) MODE $eva(chanbot) +o $eva(nick)"
send ":$eva(serv) MODE $eva(soho) +o $eva(nick)"
}
if {$victime=="$welcome(nick)"} {
send ":$eva(serv) NICK $welcome(nick) 1 1 $welcome(ident
) $welcome(host) $eva(serv) :$welcome(name)"
send ":$welcome(nick) MODE $welcome(nick) +owsAagdkp"
send ":$welcome(nick) JOIN $eva(chan)"
send ":$welcome(nick) JOIN $eva(soho)"
send ":$welcome(nick) JOIN $eva(chanbot)"
send ":$eva(serv) MODE $eva(chan) +o $welcome(nick)"
send ":$eva(serv) MODE $eva(chanbot) +o $welcome(nick)"
}
if {$victime=="$socket(nick)"} {
send ":$eva(serv) NICK $socket(nick) 1 1 $socket(ident)
$socket(host) $eva(serv) :$socket(name)"
send ":$socket(nick) MODE $eva(nick) +owsAagdkp"
send ":$socket(nick) JOIN $eva(chan)"
send ":$socket(nick) JOIN $eva(soho)"
send ":$socket(nick) JOIN $eva(chanbot)"
send ":$eva(serv) MODE $eva(chan) +o $socket(nick)"
send ":$eva(serv) MODE $eva(chanbot) +o $socket(nick)"
}
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Killed sur $vic
time Host: $host - Raison: $raison - Par: $killeur"
foreach a $eva(servs) {
foreach b $userserv($a) {
set tmp ""
if {$b!=$victime} {lappend tmp $b}
set userserv($a) "$tmp"
}
}
set tmp ""
set tempe "$xwho($host)"
foreach bb $tempe {
if {$bb != "$victime"} {lappend tmp $bb}
}
set xwho($host) "$tmp"
delclones $host
unset hostclone($victime)
deloperquit $victime

deauth $victime
return 0
}
if {$event=="NICK"} {
if {[lindex $arg 6] != ""} {
set pseudo "[string trim [lindex $arg 2] :]"
set identd "[lindex $arg 5]"
set host "[lindex $arg 6]"
set serv "[lindex $arg 7]"
set name "[string trim [lrange $arg 8 end] :]"
detect_clones $host $pseudo
lappend userserv($serv) $pseudo
lappend xwho($host) $pseudo
set hostclone($pseudo) "$host"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Connexion de $pseudo - H
ost: $identd@$host - Sur $serv (Serveur t'Chat)"
set welcome(notice) "[fread welcome.db]"
if {$welcome(notice)!=""} {
send ":$welcome(nick) NOTICE $pseudo :$welcome(notice)"
}
if {$eva(nocon)=="1"} {
kill $pseudo "" "L'option de non connection est active, v
euillez vous reconnecter plus tard"
}
if {$eva(onotcon)=="1"} {
set nb $clone($host)
foreach a $eva(operlist) {
putdcc $eva(idx) ":$eva(serv) NOTICE $a :*** Notice -- Connectio
n client $pseudo ($identd@$host) sur $serv \2\[Nombre de connection(s): $nb\]"
}
}
detect_defini $pseudo $identd $host "$name"
return 0
} else {
set pseudo "[string trim [lindex $arg 0] :]"
set newpseudo "[lindex $arg 2]"
set tempx "$hostclone($pseudo)"
set hostclone($newpseudo) "$tempx"
set tempa "$hostclone($newpseudo)"
newauth $pseudo $newpseudo
foreach a $eva(servs) {
foreach b $userserv($a) {
if {$b==$pseudo} {
lappend userserv($a) $newpseudo
foreach c $userserv($a) {
set tmp ""
if {$c!=$pseudo} {lappend tmp $c
}
set userserv($a) "$tmp"
}
}
}
}
lappend xwho($tempa) $newpseudo
set tmp ""
set tempe "$xwho($tempa)"
foreach bb $tempe {
if {$bb != "$pseudo"} {lappend tmp $bb}
}

set xwho($tempa) "$tmp"


unset hostclone($pseudo)
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Nick 1 $pseudo C hange de
pseudo en $newpseudo"
operchnick $pseudo $newpseudo
detect_defini $newpseudo "/" "$hostclone($newpseudo)" "/"
return 0
}
}
if {$event=="QUIT"} {
set pseudo "[string trim [lindex $arg 0] :]"
set msg "[string trim [lrange $arg 2 end] :]"
putdcc $eva(idx) ":$eva(nick) PRIVMSG $eva(chan) :Dconnexion de $p
seudo - Host: $hostclone($pseudo) - Quit: $msg"
foreach a $eva(servs) {
foreach b $userserv($a) {
set tmp ""
if {$b!=$pseudo} {lappend tmp $b}
set userserv($a) "$tmp"
}
}
set tmp ""
set temp "$hostclone($pseudo)"
set tempe "$xwho($temp)"
foreach bb $tempe {
if {$bb != "$pseudo"} {lappend tmp $bb}
}
set xwho($temp) "$tmp"
delclones $temp
unset hostclone($pseudo)
deloperquit $pseudo
deauth $pseudo
return 0
}
if {$event=="TOPIC"} {
set pseudo "[string trim [lindex $arg 0] :]"
set salon "[lindex $arg 2]"
set topic "[string trim [lrange $arg 3 end] :]"
if {![string match *.* $pseudo]} {
set fichier [fread topics.db]
regsub -all {;} $fichier { } a
foreach b $a {
set c [split $b :]
set salle "[lindex $c 0]"
if {[string match $salle $salon]} {
set topic "[lrange $c 1 end]"
regsub -all {:} $topic { } topic
send ":$eva(nick) JOIN $salon"
send ":$eva(nick) MODE $salon x+o $eva(nick)"
send ":$eva(nick) TOPIC $salon :$topic"
if {$salon!="$eva(chan)" && $salon!="$eva(chanbot)" && $
salon!="$eva(soho)" && [isxclose $salon]!="1" && [isindb $eva(xpermclose) $salon
]==-1} {send ":$eva(nick) PART $salon"}
}
}
set eva(xnotopic) "[fread xnotopic.db]"
if {[isindb $eva(xnotopic) $salon]!=-1} {
send ":$eva(nick) JOIN $salon"
send ":$eva(nick) MODE $salon x+o $eva(nick)"
send ":$eva(nick) TOPIC $salon :\2"

set eva(xpermclose) "[fread xpermclose.db]"


if {$salon!="$eva(chan)" && $salon!="$eva(chanbot)" && $salon!="
$eva(soho)" && [isxclose $salon]!="1" && [isindb $eva(xpermclose) $salon]==-1} {
send ":$eva(nick) PART $salon"}
}
}
return 0
}
if {$event=="PING"} {
send ":$eva(serv) PONG $eva(serv) :$eva(rserv)"
return 0
}
}
#########################
# Proc de check connect #
#########################
proc valididx {idx} {
set r 0
foreach j [dcclist] {
if {[lindex $j 0] == $idx} {
set r 1
}
}
return $r
}
if {![info exists eva(idx)]} {proc:xconnect}
proc check_connect {} {
global eva
if {[valididx $eva(idx)]} {
utimer 30 check_connect
} else {
proc:xconnect
}
}
set conditions "accepter"
if {$conditions!="accepter"} {
putlog "\2"
putlog "\2Erreur!"
putlog "Pour utiliser ce TCL vous devez lire et accepter les conditions
se trouvant a la fin du TCL"
die "Rgles non acceptes"
}
bind chon - * user_joined
bind chof - * user_parted
proc user_joined {hand idx} {
global eva
send ":$eva(nick) PRIVMSG #Eva :Connexion PL - $hand vient de rejoindre la
Party-line (Session Ouverte)"
putdcc $idx "4\[1Authentification 3Russie4\]"
console $idx $hand -mjkobxscd

}
proc user_parted {hand idx} {
global eva botnick
send ":$eva(nick) PRIVMSG #Eva :Dconnexion PL - $hand vient de quitter la P
arty-line (Session ferm)"
}
putlog "4Eva Service By IluZi0n -Charg/Mis Jour"