Vous n'êtes pas identifié(e).

Top posteurs

Statistiques

Partenaires

  • eXolia Hosting
  • Eggdrop.fr

#1 08/06/2015 19:14:01

sianur
IRCzien en herbe
Lieu : dordogne
Inscription : 17/05/2013
Messages : 79
Site Web

Lea 1.0 avec etrymsg pour Helium

à la demande de Helium j'ai ajouter la commande entrymsg a Lea 1.0

pensez à mettre une uline a votre robot pour que le message fonctionne sur tous les salons.

En cas d'erreur merci de reposter

Bon irc @tous

Code: TCL
 
#######################################
##                                   ##
##           __                      ##
##          |  |   ___ ___           ##
##          |  |__| -_| .'|          ##
##          |_____|___|__,|          ##
##                                   ##
##           Auteur : TiSmA          ##
##           Email : TiSmA@eXolia.fr ##
##           Licence : GNU / GPL     ##
##                                   ##
#######################################
 
############
# Lea Bind #
############
 
bind time - "00 00 * * *" lea:dbback
bind evnt n init-server lea:initialisation
bind evnt n disconnect-server lea:evenement
bind evnt n prerestart lea:evenement
bind evnt n sighup lea:evenement
bind evnt n sigterm lea:evenement
bind evnt n sigill lea:evenement
bind evnt n sigquit lea:evenement
bind evnt n prerehash lea:prerehash
bind evnt n rehash lea:rehash
bind dcc n lea lea:com
bind dcc n leaconnect lea:connect
bind dcc n leadeconnect lea:deconnect
bind dcc n leaversion lea:version
bind dcc n leadebug lea:debug
 
#################
# Lea Scriptdir #
#################
 
set lea(path) "[file dirname [info script]]/"
proc lea:scriptdir {} { 
	global lea
	return $lea(path) 
}
 
##############
# Lea Source #
##############
 
source [lea:scriptdir]Lea.conf
 
################
# Lea Fichiers #
################
 
if {![file exists "[lea:scriptdir]db/gestion.db"]} { set file_gestion [open "[lea:scriptdir]db/gestion.db" a+]; close $file_gestion }
if {![file exists "[lea:scriptdir]db/chan.db"]} { set file_salon [open "[lea:scriptdir]db/chan.db" a+]; close $file_salon }
if {![file exists "[lea:scriptdir]db/client.db"]} { set file_client [open "[lea:scriptdir]db/client.db" a+]; close $file_client }
if {![file exists "[lea:scriptdir]db/autojoin.db"]} { set file_autojoin [open "[lea:scriptdir]db/autojoin.db" a+]; close $file_autojoin }
if {![file exists "[lea:scriptdir]db/host.db"]} { set file_host [open "[lea:scriptdir]db/host.db" a+]; close $file_host }
if {![file exists "[lea:scriptdir]db/trust.db"]} { set file_trust [open "[lea:scriptdir]db/trust.db" a+]; close $file_trust }
if {![file exists "[lea:scriptdir]db/nick.db"]} { set file_nick [open "[lea:scriptdir]db/nick.db" a+]; close $file_nick }
if {![file exists "[lea:scriptdir]db/ident.db"]} { set file_ident [open "[lea:scriptdir]db/ident.db" a+]; close $file_ident }
if {![file exists "[lea:scriptdir]db/real.db"]} { set file_real [open "[lea:scriptdir]db/real.db" a+]; close $file_real }
if {![file exists "[lea:scriptdir]db/close.db"]} { set file_close [open "[lea:scriptdir]db/close.db" a+]; close $file_close }
if {![file exists "[lea:scriptdir]db/salon.db"]} { set file_salon [open "[lea:scriptdir]db/salon.db" a+]; close $file_salon }
if {![file exists "[lea:scriptdir]db/ip.db"]} { set file_ip [open "[lea:scriptdir]db/ip.db" a+]; close $file_ip }
if {![file exists "[lea:scriptdir]db/port.db"]} { set file_port [open "[lea:scriptdir]db/port.db" a+]; close $file_port }
if {![file exists "[lea:scriptdir]db/secu.db"]} { set file_secu [open "[lea:scriptdir]db/secu.db" a+]; close $file_secu }
if {![file exists "[lea:scriptdir]db/news.db"]} { set file_news [open "[lea:scriptdir]db/news.db" a+]; close $file_news }
if {![file exists "[lea:scriptdir]db/onews.db"]} { set file_onews [open "[lea:scriptdir]db/onews.db" a+]; close $file_onews }
if {![file exists "[lea:scriptdir]db/cnews.db"]} { set file_cnews [open "[lea:scriptdir]db/cnews.db" a+]; close $file_cnews }
 
#################
# Lea Commandes #
#################
 
set clea(copyright)     "0"
set clea(help)          "0"
set clea(showcommands)  "0"
set clea(ban)           "1"
set clea(clearallmodes) "1"
set clea(clearbans)     "1"
set clea(clearclose)    "1"
set clea(clearmodes)    "1"
set clea(close)         "1"
set clea(closelist)     "1"
set clea(dehalfop)      "1"
set clea(dehalfopall)   "1"
set clea(deop)          "1"
set clea(deopall)       "1"
set clea(deowner)       "1"
set clea(deownerall)    "1"
set clea(deprotect)     "1"
set clea(deprotectall)  "1"
set clea(devoice)       "1"
set clea(devoiceall)    "1"
set clea(gline)         "1"
set clea(glinelist)     "1"
set clea(globops)       "1"
set clea(halfop)        "1"
set clea(halfopall)     "1"
set clea(invite)        "1"
set clea(kick)          "1"
set clea(kickall)       "1"
set clea(kickban)       "1"
set clea(kickbanall)    "1"
set clea(kill)          "1"
set clea(kline)         "1"
set clea(klinelist)     "1"
set clea(mode)          "1"
set clea(nickban)       "1"
set clea(notice)        "1"
set clea(op)            "1"
set clea(opall)         "1"
set clea(owner)         "1"
set clea(ownerall)      "1"
set clea(protect)       "1"
set clea(protectall)    "1"
set clea(say)           "1"
set clea(status)        "1"
set clea(topic)         "1"
set clea(unban)         "1"
set clea(unclose)       "1"
set clea(ungline)       "1"
set clea(unkline)       "1"
set clea(unzline)       "1"
set clea(voice)         "1"
set clea(voiceall)      "1"
set clea(wallops)       "1"
set clea(zline)         "1"
set clea(zlinelist)     "1"
set clea(entrymsg)      "1"
set clea(addcnews)      "2"
set clea(chankill)      "2"
set clea(changline)     "2"
set clea(chanscan)      "2"
set clea(cleargline)    "2"
set clea(clearkline)    "2"
set clea(clearzline)    "2"
set clea(cnewslist)     "2"
set clea(delcnews)      "2"
set clea(scan)          "2"
set clea(securite)      "2"
set clea(svsjoin)       "2"
set clea(svsnick)       "2"
set clea(svspart)       "2"
set clea(join)          "3"
set clea(list)          "3"
set clea(part)          "3"
set clea(addchan)       "4"
set clea(addclient)     "4"
set clea(addhost)       "4"
set clea(addident)      "4"
set clea(addip)         "4"
set clea(addnews)       "4"
set clea(addnick)       "4"
set clea(addport)       "4"
set clea(addreal)       "4"
set clea(addtrust)      "4"
set clea(badchan)       "4"
set clea(badhost)       "4"
set clea(badident)      "4"
set clea(badip)         "4"
set clea(badnick)       "4"
set clea(badreal)       "4"
set clea(chanlist)      "4"
set clea(client)        "4"
set clea(clientlist)    "4"
set clea(console)       "4"
set clea(delchan)       "4"
set clea(delclient)     "4"
set clea(delhost)       "4"
set clea(delident)      "4"
set clea(delip)         "4"
set clea(delnews)       "4"
set clea(delnick)       "4"
set clea(delport)       "4"
set clea(delreal)       "4"
set clea(deltrust)      "4"
set clea(dnsbl)         "4"
set clea(hostlist)      "4"
set clea(identlist)     "4"
set clea(iplist)        "4"
set clea(newslist)      "4"
set clea(nicklist)      "4"
set clea(portlist)      "4"
set clea(reallist)      "4"
set clea(scanner)       "4"
set clea(trustlist)     "4"
set clea(action)        "5"
set clea(addjoin)       "5"
set clea(addonews)      "5"
set clea(addsecu)       "5"
set clea(autojoin)      "5"
set clea(backup)        "5"
set clea(chanlog)       "5"
set clea(cnews)         "5"
set clea(crypt)         "5"
set clea(cryptage)      "5"
set clea(cryptype)      "5"
set clea(deljoin)       "5"
set clea(delonews)      "5"
set clea(delsecu)       "5"
set clea(die)           "5"
set clea(exec)          "5"
set clea(joinlist)      "5"
set clea(news)          "5"
set clea(onews)         "5"
set clea(onewslist)     "5"
set clea(protection)    "5"
set clea(restart)       "5"
set clea(score)         "5"
set clea(secu)          "5"
set clea(seculist)      "5"
 
#################
# Lea Variables #
#################
 
set lea(version)        "031.0"
set lea(rscore)         "1.0"
set lea(timerinit)      "15"
set lea(timerco)        "30"
set lea(countkill)      "3"
set lea(counter)        "0"
set lea(init)           "0"
set lea(dem)            "0"
set lea(debug)          "0"
set lea(console)        "0"
set lea(umode)          "0"
set lea(protection)     "0"
set lea(action-n)       "0"
set lea(action-h)       "0"
set lea(action-i)       "0"
set lea(action-r)       "0"
set lea(action-b)       "0"
set lea(action-c)       "0"
set lea(action-d)       "0"
set lea(action-s)       "0"
set lea(dnsbl)          "0"
set lea(badnick)        "0"
set lea(badident)       "0"
set lea(badhost)        "0"
set lea(badreal)        "0"
set lea(badchan)        "0"
set lea(badip)          "0"
set lea(client)         "0"
set lea(ajoin)          "0"
set lea(crypt)          "0"
set lea(scanner)        "0"
set lea(secu)           "0"
set lea(securite)       "0"
set lea(news)           "0"
set lea(onews)          "0"
set lea(cnews)          "0"
set lea(entrymsg)       "0"
set lea(cryptage)       "rand"
set lea(cryptype)       "tld"
 
###########
# Lea Sbl #
###########
 
set lea(sbl) {
	"rbl.efnet.org 3.4"
	"ircbl.ahbl.org 2.8"
	"socks.dnsbl.sorbs.net 2.4"
	"http.dnsbl.sorbs.net 1.6"
	"cbl.abuseat.org 1.4"
	"dnsbl.njabl.org 1.4"
	"misc.dnsbl.sorbs.net 1.3"
	"sbl.spamhaus.org 1.2"
	"bl.spamcop.net 1.2"
	"list.dsbl.org 1.1"
	"rbl-plus.mail-abuse.org 1.0"
}
 
##############
# Lea Config #
##############
 
proc lea:config {} { 
	global lea 
	if {![info exists lea(link)] || ![info exists lea(ip)] || ![info exists lea(port)] || ![info exists lea(pass)] || ![info exists lea(info)] || ![info exists lea(pseudo)] || ![info exists lea(ident)] || ![info exists lea(host)] || ![info exists lea(real)] || ![info exists lea(salon)] || ![info exists lea(smode)] || ![info exists lea(cmode)] || ![info exists lea(prefix)] || ![info exists lea(duree)] || ![info exists lea(tld)] || ![info exists lea(fai)] || ![info exists lea(secuco)] || ![info exists lea(secutime)] || ![info exists lea(secumode)] || ![info exists lea(secuon)] || ![info exists lea(secuoff)] || ![info exists lea(secustop)] || ![info exists lea(raison)] || ![info exists lea(rdns)] || ![info exists lea(rscan)] || ![info exists lea(rclient)] || ![info exists lea(rhost)] || ![info exists lea(rip)] || ![info exists lea(rident)] || ![info exists lea(rnick)] || ![info exists lea(rreal)] || ![info exists lea(console_com)] || ![info exists lea(console_deco)] || ![info exists lea(console_txt)]} { 
		return ok
	} elseif {$lea(link)=="" || $lea(ip)=="" || $lea(port)=="" || $lea(pass)=="" || $lea(info)=="" || $lea(pseudo)=="" || $lea(ident)=="" || $lea(host)=="" || $lea(real)=="" || $lea(salon)=="" || $lea(smode)=="" || $lea(cmode)=="" || $lea(prefix)=="" || $lea(duree)=="" || $lea(tld)=="" || $lea(fai)=="" || $lea(secuco)=="" || $lea(secutime)=="" || $lea(secumode)=="" || $lea(secuon)=="" || $lea(secuoff)=="" || $lea(secustop)=="" || $lea(raison)=="" || $lea(rdns)=="" || $lea(rscan)=="" || $lea(rclient)=="" || $lea(rhost)=="" || $lea(rip)=="" || $lea(rident)=="" || $lea(rnick)=="" || $lea(rreal)=="" || $lea(console_com)=="" || $lea(console_deco)=="" || $lea(console_txt)==""} { 
		return ok 
	}
}
 
#############
# Lea Umode #
#############
 
proc lea:umode {} {
	global lea
	switch -exact $lea(umode) {
		"0" { return $lea(pseudo) }
		"1" { return $lea(link) }
	}
}
 
#############
# Lea Arret #
#############
 
proc lea:arret {} {
	global lea
	foreach kill [utimers] { if {[lindex $kill 1]=="lea:verif" || [lindex [lindex $kill 1] 0]=="lea:uncountkill" || [lindex [lindex $kill 1] 0]=="lea:scanout"} { killutimer [lindex $kill 2] } }
}
 
###############
# Lea Gestion #
###############
 
proc lea:gestion {} { 
	global lea
	set sv [open [lea:scriptdir]db/gestion.db w+]
	puts $sv "lea(salon) [encoding convertto iso8859-1 $lea(salon)]"
	puts $sv "lea(console) $lea(console)"
	puts $sv "lea(debug) $lea(debug)"
	puts $sv "lea(umode) $lea(umode)"
	puts $sv "lea(protection) $lea(protection)"
	puts $sv "lea(dnsbl) $lea(dnsbl)"
	puts $sv "lea(badnick) $lea(badnick)"
	puts $sv "lea(badident) $lea(badident)"
	puts $sv "lea(badhost) $lea(badhost)"
	puts $sv "lea(badreal) $lea(badreal)"
	puts $sv "lea(badchan) $lea(badchan)"
	puts $sv "lea(badip) $lea(badip)"
	puts $sv "lea(client) $lea(client)"
	puts $sv "lea(crypt) $lea(crypt)"
	puts $sv "lea(cryptage) $lea(cryptage)"
	puts $sv "lea(cryptype) $lea(cryptype)"
	puts $sv "lea(ajoin) $lea(ajoin)"
	puts $sv "lea(rscore) $lea(rscore)"
	puts $sv "lea(scanner) $lea(scanner)"
	puts $sv "lea(secu) $lea(secu)"
	puts $sv "lea(securite) $lea(securite)"
	puts $sv "lea(news) $lea(news)"
	puts $sv "lea(onews) $lea(onews)"
	puts $sv "lea(cnews) $lea(cnews)"
	puts $sv "lea(action-n) $lea(action-n)"
	puts $sv "lea(action-i) $lea(action-i)"
	puts $sv "lea(action-h) $lea(action-h)"
	puts $sv "lea(action-r) $lea(action-r)"
	puts $sv "lea(action-b) $lea(action-b)"
	puts $sv "lea(action-c) $lea(action-c)"
	puts $sv "lea(action-d) $lea(action-d)"
	puts $sv "lea(action-s) $lea(action-s)"
	if {[info exists lea(maxthrottle)]} { puts $sv "lea(maxthrottle) $lea(maxthrottle)" }
	puts $sv "lea(entrymsg) $lea(entrymsg)"
	close $sv
}
 
##################
# Lea Chargement #
##################
 
proc lea:chargement {} { 
	global lea trusts
	catch {open [lea:scriptdir]db/trust.db r} load_trust
	while {![eof $load_trust]} { gets $load_trust hosts; if {$hosts!="" && ![info exists trusts($hosts)]} { set trusts($hosts) "1" } }
	catch {close $load_trust}
	catch {open [lea:scriptdir]db/gestion.db r} gestion
	while {![eof $gestion]} { gets $gestion var2; if {$var2!=""} { set [lindex $var2 0] [lindex $var2 1] } }
	catch {close $gestion}
	if {$lea(crypt)=="1"} {
		switch -exact $lea(cryptage) {
			"md4" { if {[catch {package require md4}]} { set lea(crypt) "0" } }
			"md5" { if {[catch {package require md5}]} { set lea(crypt) "0" } }
			"sum" { if {[catch {package require sum}]} { set lea(crypt) "0" } }
			"sha1" { if {[catch {package require sha1}]} { set lea(crypt) "0" } }
			"cksum" { if {[catch {package require cksum}]} { set lea(crypt) "0" } }
			"crc32" { if {[catch {package require crc32}]} { set lea(crypt) "0" } }
			"crc16" { if {[catch {package require crc16}]} { set lea(crypt) "0" } }
		}
	}
}
 
##############
# Lea Backup #
##############
 
proc lea:backup {} {
	global lea
	lea:gestion
	exec cp -f [lea:scriptdir]db/gestion.db [lea:scriptdir]db/gestion.bak
	exec cp -f [lea:scriptdir]db/chan.db [lea:scriptdir]db/chan.bak
	exec cp -f [lea:scriptdir]db/client.db [lea:scriptdir]db/client.bak
	exec cp -f [lea:scriptdir]db/autojoin.db [lea:scriptdir]db/autojoin.bak
	exec cp -f [lea:scriptdir]db/host.db [lea:scriptdir]db/host.bak
	exec cp -f [lea:scriptdir]db/trust.db [lea:scriptdir]db/trust.bak
	exec cp -f [lea:scriptdir]db/ident.db [lea:scriptdir]db/ident.bak
	exec cp -f [lea:scriptdir]db/nick.db [lea:scriptdir]db/nick.bak
	exec cp -f [lea:scriptdir]db/real.db [lea:scriptdir]db/real.bak
	exec cp -f [lea:scriptdir]db/salon.db [lea:scriptdir]db/salon.bak
	exec cp -f [lea:scriptdir]db/close.db [lea:scriptdir]db/close.bak
	exec cp -f [lea:scriptdir]db/ip.db [lea:scriptdir]db/ip.bak
	exec cp -f [lea:scriptdir]db/port.db [lea:scriptdir]db/port.bak
	exec cp -f [lea:scriptdir]db/secu.db [lea:scriptdir]db/secu.bak
	exec cp -f [lea:scriptdir]db/news.db [lea:scriptdir]db/news.bak
	exec cp -f [lea:scriptdir]db/onews.db [lea:scriptdir]db/onews.bak
	exec cp -f [lea:scriptdir]db/cnews.db [lea:scriptdir]db/cnews.bak
}
 
############
# Lea Secu #
############
 
proc lea:secu {} {
	global lea
	if {[info exists lea(maxthrottle)]} {
		if {[info exists lea(throttle)]} { unset lea(throttle) }
		putdcc $lea(idx) ":$lea(pseudo) NOTICE $*.* : $lea(secuoff)"
		catch {open "[lea:scriptdir]db/secu.db" r} liste
		while {![eof $liste]} { gets $liste salon; if {$salon!=""} { putdcc $lea(idx) ":[lea:umode] MODE $salon -$lea(secumode)" } }
		catch {close $liste}; unset lea(maxthrottle); lea:gestion
	}
}
 
#################
# Lea Countkill #
#################
 
proc lea:countkill {arg} {
	global countkill
	set arg [split $arg]
	set host [string tolower [lindex $arg 0]]
	if {![info exists countkill($host)]} { 
		set countkill($host) "1"; utimer 180 [list lea:uncountkill "$countkill($host)"]
	} else { incr countkill($host) 1 }
	return $countkill($host)
}
 
###################
# Lea Uncountkill #
###################
 
proc lea:uncountkill {arg} {
	global countkill
	set arg [split $arg]
	set host [string tolower [lindex $arg 0]]
	if {[info exists countkill($host)]} { unset countkill($host) }
}
 
###############
# Lea Refresh #
###############
 
proc lea:refresh {arg} {
	global olines vhosts ulines links
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	if {[info exists vhosts($user)]} { unset vhosts($user) }
	if {[info exists olines($user)]} { unset olines($user) }
	if {[info exists ulines($user)]} { unset ulines($user) }
	if {[info exists links($user)]} { unset links($user) }
}
 
#############
# Lea Purge #
#############
 
proc lea:purge {arg} {
	global olines vhosts ulines links
	set arg [split $arg]
	set servs [string tolower [lindex $arg 0]]
	foreach {pseudo lien} [array get links] { 
		if {$servs==$lien} {		
			if {[info exists vhosts($pseudo)]} { unset vhosts($pseudo) }
			if {[info exists olines($pseudo)]} { unset olines($pseudo) }
			if {[info exists ulines($pseudo)]} { unset ulines($pseudo) }
			if {[info exists links($pseudo)]} { unset links($pseudo) } 
		}
	}
}
 
###########
# Lea Set #
###########
 
proc lea:set {arg} {
	global olines vhosts
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	set level [string tolower [lindex $arg 1]]
	if {[info exists vhosts($user)] && ![info exists olines($user)]} { set olines($user) "$level" }
	return 0
}
 
#############
# Lea Unset #
#############
 
proc lea:unset {arg} {
	global olines vhosts
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	if {[info exists vhosts($user)] && [info exists olines($user)]} { unset olines($user) }
	return 0
}
 
############
# Lea Line #
############
 
proc lea:line {arg} {
	global ulines vhosts
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	if {[info exists vhosts($user)] && ![info exists ulines($user)]} { set ulines($user) "ok" }
	return 0
}
 
##############
# Lea Unline #
##############
 
proc lea:unline {arg} {
	global ulines vhosts
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	if {[info exists vhosts($user)] && [info exists ulines($user)]} { unset ulines($user) }
	return 0
}
 
###############
# Lea Protect #
###############
 
proc lea:protect {arg} {
	global lea olines ulines
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	set luser [string tolower [lindex $arg 1]]
	if {$luser==[string tolower $lea(pseudo)]} { 
		return ok 
	} elseif {[info exists ulines($luser)]} { 
		return ok 
	} elseif {$lea(protection)=="1" && [info exists olines($luser)] && $user!=$luser && $olines($luser)>=$olines($user)} { 
		return ok 
	}
}
 
#################
# Lea Protected #
#################
 
proc lea:protected {arg} {
	global lea olines ulines
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	if {$user!=[string tolower $lea(pseudo)] && ![info exists ulines($user)] && ![info exists olines($user)]} { return ok }
}
 
#############
# Lea Cmode #
#############
 
proc lea:cmode {arg} {
	global lea
	set arg [split $arg]
	set salon [string tolower [lindex $arg 0]]
	switch -exact $lea(cmode) {
		"q" { putdcc $lea(idx) ":[lea:umode] MODE $salon +q $lea(pseudo)" }
		"a" { putdcc $lea(idx) ":[lea:umode] MODE $salon +a $lea(pseudo)" }
		"o" { putdcc $lea(idx) ":[lea:umode] MODE $salon +o $lea(pseudo)" }
		"h" { putdcc $lea(idx) ":[lea:umode] MODE $salon +h $lea(pseudo)" }
		"v" { putdcc $lea(idx) ":[lea:umode] MODE $salon +v $lea(pseudo)" }
	}
}
 
#############
# Lea Duree #
#############
 
proc lea:duree {arg} {
	set arg [split $arg]
	set temps [lindex $arg 0]
	set opt [lindex $arg 1]
	switch -exact [lindex [ctime $temps] 1] {
		"Jan" { set mois "01" }
		"Feb" { set mois "02" }
		"Mar" { set mois "03" }
		"Apr" { set mois "04" }
		"May" { set mois "05" }
		"Jun" { set mois "06" }
		"Jul" { set mois "07" }
		"Aug" { set mois "08" }
		"Sep" { set mois "09" }
		"Oct" { set mois "10" }
		"Nov" { set mois "11" }
		"Dec" { set mois "12" }
	}
	switch -exact [lindex [ctime $temps] 2] {
		"1" { set jour "01" }
		"2" { set jour "02" }
		"3" { set jour "03" }
		"4" { set jour "04" }
		"5" { set jour "05" }
		"6" { set jour "06" }
		"7" { set jour "07" }
		"8" { set jour "08" }
		"9" { set jour "09" }
	}
	if {![info exists jour]} { set jour [lindex [ctime $temps] 2] }
	if {$opt=="1"} {
		set seen "$jour/$mois/[lindex [ctime $temps] 4]"
	} else { set seen "$jour/$mois/[lindex [ctime $temps] 4] à [lindex [ctime $temps] 3]" }
	return $seen
}
 
#################
# Lea Prerehash #
#################
 
proc lea:prerehash {arg} { 
	global lea 
	if {[info exists lea(idx)] && [valididx $lea(idx)]} { lea:gestion }
}
 
##############
# Lea Rehash #
##############
 
proc lea:rehash {arg} { 
	global lea
	if {[info exists lea(idx)] && [valididx $lea(idx)]} { lea:chargement }
}
 
#################
# Lea Evenement #
#################
 
proc lea:evenement {arg} { 
	global lea
	if {[info exists lea(idx)] && [valididx $lea(idx)]} {
		lea:gestion
		putdcc $lea(idx) ":$lea(pseudo) QUIT :$lea(raison)"
		putdcc $lea(idx) ":$lea(link) SQUIT $lea(link) :$lea(raison)"
		lea:arret
	}
}
 
##############
# Lea Authed #
##############
 
proc lea:authed {arg} {
	global lea olines
	set arg [split $arg]
	set user [string tolower [lindex $arg 0]]
	set level [lindex $arg 1]
	switch -exact $level {
		"0" { return ok }
		"1" { if {[info exists olines($user)] && $olines($user)>="1"} { return ok } }
		"2" { if {[info exists olines($user)] && $olines($user)>="2"} { return ok } }
		"3" { if {[info exists olines($user)] && $olines($user)>="3"} {	return ok } }
		"4" { if {[info exists olines($user)] && $olines($user)>="4"} { return ok } }
		"5" { if {[info exists olines($user)] && $olines($user)=="5"} { return ok } }
	}
}
 
###############
# Lea Console #
###############
 
proc lea:console {arg} { 
	global lea
	set arg [split $arg]
	set level [string tolower [lindex $arg 0]]
	set salon [string tolower [lindex $arg 1]]
	if {$lea(init)=="0"} {
		if {[info exists salon] && $salon!=[string tolower $lea(salon)]} {
			switch -exact $level {
				"1" { if {$lea(console)>="1"} { return ok } }
				"2" { if {$lea(console)>="2"} { return ok } }
				"3" { if {$lea(console)=="3"} { return ok } }
			}
		} elseif {![info exists salon]} {
			switch -exact $level {
				"1" { if {$lea(console)>="1"} { return ok } }
				"2" { if {$lea(console)>="2"} { return ok } }
				"3" { if {$lea(console)=="3"} { return ok } }
			}
		}
	}
}
 
##########
# Lea Ip #
##########
 
proc lea:ip {ip host res user} {
	global lea
	if {$res=="1"} {
		set vuser [string tolower $user]
		catch {open [lea:scriptdir]db/ip.db r} liste
		while {![eof $liste]} { 
			gets $liste verif
			if {$verif==$ip && $verif!=""} {
				if {[lea:console 3]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badip $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) IP : $ip" }
				if {$lea(action-b)=="1"} {
					if {[lea:countkill "$ip"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + Z * $ip $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rip) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$ip"; return 0 }
					putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rip)"; lea:refresh $user
					if {[lea:console 2]=="ok"} { utimer 2 [list putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rip)"] } 
					return 0
				} elseif {$lea(action-b)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + Z * $ip $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rip) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
				break
			}
		}
		catch {close $liste}	
	}
}
 
#############
# Lea Dnsbl #
#############
 
proc lea:dnsbl {ip host res user} {
	global lea
	if {$res=="1"} {
		regexp {([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})} $ip matches class1 class2 class3 class4
		foreach serv $lea(sbl) { 
			if {[lindex $serv 0]!=""} { 
				dnslookup "$class4.$class3.$class2.$class1.[lindex $serv 0]" lea:rdnsbl $user $ip [lindex $serv 0] [lindex $serv 1] 
				if {$lea(debug)=="1"} { putlog " 01 \[Debug DNSBL\] 14 User: $user - IP: $ip - Serveur: [lindex $serv 0]" }
			} 
		}
	}
}
 
##############
# Lea Rdnsbl #
##############
 
proc lea:rdnsbl {ip host res user ips rbl score} {
	global lea bl data
	if {$res=="1"} {
		set vuser [string tolower $user]
		if {![info exists bl($vuser)]} { set bl($vuser) "0"; utimer 1 [list lea:score "$user $ips"] }
		if {[info exists bl($vuser)]} { 
			set bl($vuser) [expr [subst $bl($vuser)+$score]]
			lappend data($vuser) "Serveur: $rbl - Score: $score"
			if {$lea(debug)=="1"} { putlog " 01 \[Debug RDNSBL\] 14 User: $user - IP: $ips - Serveur: $rbl - Score: $score" }
		}
	}
}
 
#############
# Lea Score #
#############
 
proc lea:score {arg} {
	global lea bl data
	set arg [split $arg]
	set user [lindex $arg 0]
	set vuser [string tolower $user]
	set ip [lindex $arg 1]
	if {[info exists bl($vuser)] && [info exists data($vuser)]} {
		if {$bl($vuser)>=$lea(rscore)} { 
			if {[lea:console 3]=="ok"} { 
				putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)DNSBL $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) IP : $ip $lea(console_txt) - $lea(console_txt) Score : $bl($vuser)"
				foreach sbl $data($vuser) { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_deco)—›$lea(console_txt) $sbl" }
			}
			unset bl($vuser); unset data($vuser)
			if {$lea(action-d)=="1"} {
				if {[lea:countkill "$ip"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + Z * $ip $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rdns) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$ip"; return 0 }
				putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rdns)"; lea:refresh $user
				if {[lea:console 2]=="ok"} { utimer 2 [list putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rdns)"] } 
				return 0
			} elseif {$lea(action-d)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + Z * $ip $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rdns) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
		} 
	}
}
 
################
# Lea Scanport #
################
 
proc lea:scanport {arg} {
	global lea fin
	set arg [split $arg]
	set host [lindex $arg 0]
	set user [lindex $arg 1]
	set vuser [string tolower $user]
	catch {open [lea:scriptdir]db/port.db r} ports
	while {![eof $ports]} { 
		gets $ports port
		if {$port!=""} {
			if {![catch {set proxy [socket -async $host $port]} err]} {
				if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Port\] 14 User: $user - Host: $host - Port: $port" }
				set fin($proxy) "out"; utimer 20 [list lea:scanout "$proxy $host $port $user"]
				fileevent $proxy writable [list lea:scanwrite "$proxy $host $port $user"]
				fileevent $proxy readable [list lea:scanread "$proxy $host $port $user"]
			}
		} 
	}
	catch { close $ports }
}
 
###############
# Lea Scanout #
###############
 
proc lea:scanout {arg} {
	global lea fin
	set arg [split $arg]
	set proxy [lindex $arg 0]
	set host [lindex $arg 1]
	set port [lindex $arg 2]
	set user [lindex $arg 3]
	set vuser [string tolower $user]
	if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Timeout\] 14 User: $user - Host: $host - Port: $port" }
	if {[info exists fin($proxy)]} { unset fin($proxy); catch {close $proxy} }
}
 
#################
# Lea Scanwrite #
#################
 
proc lea:scanwrite {arg} {
	global lea fin v4port 
	set arg [split $arg]
	set proxy [lindex $arg 0]
	set host [lindex $arg 1]
	set port [lindex $arg 2]
	set user [lindex $arg 3]
	set vuser [string tolower $user]
	fconfigure $proxy -translation binary -buffering none -blocking 1
	fileevent $proxy writable {}
	set envoi "[binary format ccc 5 1 0]"
	if {[catch {puts $proxy $envoi}]} {
		if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Timeout\] 14 User: $user - Host: $host - Port: $port" }
		if {[info exists fin($proxy)]} { unset fin($proxy) }
		foreach kill [utimers] { if {[lindex [lindex $kill 1] 0]=="lea:scanout" && [lindex [lindex [lindex $kill 1] 1] 0]==$proxy} { killutimer [lindex $kill 2] } }
		catch {close $proxy}
	}	
}
 
################
# Lea Scanread #
################
 
proc lea:scanread {arg} {
	global lea fin
	set arg [split $arg]
	set proxy [lindex $arg 0]
	set host [lindex $arg 1]
	set port [lindex $arg 2]
	set user [lindex $arg 3]
	set vuser [string tolower $user]
	if {[info exists fin($proxy)]} { unset fin($proxy) }
	foreach kill [utimers] { if {[lindex [lindex $kill 1] 0]=="lea:scanout" && [lindex [lindex [lindex $kill 1] 1] 0]==$proxy} { killutimer [lindex $kill 2] } }
	catch {binary scan [read $proxy 2] cc type auth}
	fileevent $proxy readable {}
	catch {close $proxy}
	if {[info exists type] && [info exists auth]} {
		switch -exact $type {
			"0" { 
				if {$auth=="90" || $auth=="91"} { 
					if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Socks v4\] 14 User: $user - Host: $host - Port: $port" }
					if {[lea:console 3]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scan Socks v4 $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) Host : $host - $lea(console_txt) Port : $port" }
					if {$lea(action-s)=="1"} { 
						if {[lea:countkill "$host"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v4) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$host"; return 0 }
						putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rscan) (Socks v4)"; lea:refresh $user
						if {[lea:console 2]=="ok"} { utimer 2 [list putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rscan) (Socks v4)"] } 
						return 0
					} elseif {$lea(action-s)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v4) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
				} 
			}
			"4" { 
				if {$auth=="90" || $auth=="91"} { 
					if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Socks v4\] 14 User: $user - Host: $host - Port: $port" }
					if {[lea:console 3]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scan Socks v4 $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) Host : $host - $lea(console_txt) Port : $port" }
					if {$lea(action-s)=="1"} { 
						if {[lea:countkill "$host"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v4) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$host"; return 0 }
						putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rscan) (Socks v4)"; lea:refresh $user
						if {[lea:console 2]=="ok"} { utimer 2 [list putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rscan) (Socks v4)"] } 
						return 0
					} elseif {$lea(action-s)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v4) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
				} 
			}
			"5" { 
				if {$auth=="0"} { 
					if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Socks v5\] 14 User: $user - Host: $host - Port: $port" }
					if {[lea:console 3]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scan Socks v5 $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) Host : $host - $lea(console_txt) Port : $port" }
					if {$lea(action-s)=="1"} { 
						if {[lea:countkill "$host"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v5) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$host"; return 0 }
						putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rscan) (Socks v5)"; lea:refresh $user
						if {[lea:console 2]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rscan) (Socks v5)" } 
						return 0
					} elseif {$lea(action-s)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Socks v5) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
				} 
			}
			"72" { 
				if {$auth=="84"} { 
					if {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Proxy HTTP\] 14 User: $user - Host: $host - Port: $port" }
					if {[lea:console 3]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scan Proxy HTTP $lea(console_deco):$lea(console_txt) Pseudo : $user $lea(console_txt) - $lea(console_txt) Host : $host - $lea(console_txt) Port : $port" }
					if {$lea(action-s)=="1"} { 
						if {[lea:countkill "$host"]>$lea(countkill)} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Proxy HTTP) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; lea:uncountkill "$host"; return 0 }
						putdcc $lea(idx) ":[lea:umode] KILL $user $lea(rscan) (Proxy HTTP)"; lea:refresh $user
						if {[lea:console 2]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $user a été killé : $lea(rscan) (Proxy HTTP)" } 
						return 0
					} elseif {$lea(action-s)=="2"} { putdcc $lea(idx) ":$lea(link) TKL + G * $host $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] :$lea(rscan) (Proxy HTTP) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"; return 0 }
				}  
			}
		}
	} elseif {$lea(debug)=="1"} { putlog " 01 \[Debug Scan Timeout\] 14 User: $user - Host: $host - Port: $port" }
}
 
############
# Lea Cmds #
############
 
proc lea:cmds {arg} {
	global lea clea olines vhosts trusts ulines
	set arg [split $arg]
	set cmd [lindex $arg 0]
	set user [lindex $arg 1]
	set vuser [string tolower $user]
	set value1 [lindex $arg 2]
	set value2 [string tolower [lindex $arg 2]]
	set value3 [lindex $arg 3]
	set value4 [string tolower [lindex $arg 3]]
	set value5 [join [lrange $arg 4 end]]
	set value6 [join [lrange $arg 3 end]]
	set value7 [join [lrange $arg 2 end]]
	set value8 [join [lrange [split $arg] 2 end]]
	set value9 [join [lrange [split $arg] 3 end]]
	set stop "0"; set ids "0"
	if {[lea:authed "$vuser $clea($cmd)"]!="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé"; return 0 }
	switch -exact $cmd {
		"copyright" {
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Lea Service $lea(version) by TiSmA03©"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Copyright $lea(console_deco):$lea(console_txt) $user" }
		}
		"console" {
			if {$value2=="" || [regexp \[^0-3\] $value2]} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Console 03:01 /msg $lea(pseudo) console 0/1/2/3"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Level 0 04:01 Aucune console"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Level 1 04:01 Console commande"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Level 2 04:01 Console commande & connexion & déconnexion"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Level 3 04:01 Toutes les consoles"
				return 0 
			}
			switch -exact $value2 {
				"0" {
					set lea(console) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Level 0 : Aucune console"
					putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Console $lea(console_deco):$lea(console_txt) $user"
				}
				"1" {
					set lea(console) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Level 1 : Console commande"
					putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Console $lea(console_deco):$lea(console_txt) $user"
				}
				"2" {
					set lea(console) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Level 2 : Console commande & connexion & déconnexion"
					putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Console $lea(console_deco):$lea(console_txt) $user"
				}
				"3" {
					set lea(console) "3"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Level 3 : Toutes les consoles"
					putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Console $lea(console_deco):$lea(console_txt) $user"
				}
			}
		}
		"chanlog" {
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà le salon de log."; return 0 }
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Chanlog 03:01 /msg $lea(pseudo) chanlog #salon"; return 0 }
			catch {open "[lea:scriptdir]db/salon.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {![string compare -nocase $value2 $verif1]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :Accès Refusé : Salon Interdit"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {![string compare -nocase $value2 [lindex $verif2 0]]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :Accès Refusé : Salon Fermé"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/chan.db" r} liste3
			while {![eof $liste3]} { gets $liste3 verif3; if {![string compare -nocase $value2 $verif3]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :Accès Refusé : Salon Autojoin"; set stop "1"; break } }
			catch {close $liste3}; if {$stop==1} { return 0 }
			putdcc $lea(idx) ":$lea(pseudo) PART $lea(salon)"
			set lea(salon) $value1
			putdcc $lea(idx) ":$lea(pseudo) JOIN $lea(salon)"
			putdcc $lea(idx) ":[lea:umode] MODE $lea(salon) +$lea(smode)"
			lea:cmode $lea(salon)
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Changement du salon de log pour $value1."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Chanlog $lea(console_deco):$lea(console_txt) Changement du salon de log par $user ($value1)" }
		}
		"join" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Join 03:01 /msg $lea(pseudo) join #salon"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon de logs"; return 0 } 
			catch {open "[lea:scriptdir]db/salon.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {![string compare -nocase $value2 $verif1]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Interdit"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {![string compare -nocase $value2 [lindex $verif2 0]]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Fermé"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/chan.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$lea(pseudo) est déjà sur $value1."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set join [open "[lea:scriptdir]db/chan.db" a]; puts $join [encoding convertto iso8859-1 $value2]; close $join; putdcc $lea(idx) ":$lea(pseudo) JOIN $value1"
			lea:cmode $value1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$lea(pseudo) entre sur $value1."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Join $lea(console_deco):$lea(console_txt) $lea(pseudo) entre sur $value1 par $user" }
		}
		"part" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Part 03:01 /msg $lea(pseudo) part #salon"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon de logs"; return 0 } 
			catch {open "[lea:scriptdir]db/chan.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend salle "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$lea(pseudo) n'est pas sur $value1."; return 0
			} else {
				if {[info exists salle]} { 
					set del [open "[lea:scriptdir]db/chan.db" w+]; foreach delchan $salle { puts $del "$delchan" }; close $del
				} else { set del [open "[lea:scriptdir]db/chan.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) PART $value1"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$lea(pseudo) part de $value1."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Part $lea(console_deco):$lea(console_txt) $lea(pseudo) part de $value1 par $user" }
			}
		}
		"list" {
			catch {open "[lea:scriptdir]db/chan.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00Autojoin salons 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste salon; if {$salon!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $salon" } }
			catch {close $liste}; if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Salon" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)List $lea(console_deco):$lea(console_txt) $user" }
		}
		"showcommands" {
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01-------------------------------------------------- 00Lea Service 01--------------------------------------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Tchatteur01 \]"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 copyright 01 | 02 help 01 | 02 showcommands 01"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[info exists olines($vuser)]} {
				if {$olines($vuser)>="1"} {
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03IRCopérateur Global01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 ban 01 | 02 clearallmodes 01 | 02 clearbans 01 | 02 clearclose 01 | 02 clearmodes 01 | 02 close 01 | 02 closelist 01 | 02 dehalfop"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 dehalfopall 01 | 02 deop 01 | 02 deopall 01 | 02 deowner 01 | 02 deownerall 01 | 02 deprotect 01 | 02 deprotectall 01 | 02 devoice"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 devoiceall 01 | 02 gline 01 | 02 glinelist 01 | 02 globops 01 | 02 halfop 01 | 02 halfopall 01 | 02 invite 01 | 02 kick 01 | 02 kickall 01 | 02 kickban"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 kickbanall 01 | 02 kill 01 | 02 kline 01 | 02 klinelist 01 | 02 mode 01 | 02 nickban 01 | 02 notice 01 | 02 op 01 | 02 opall 01 | 02 owner 01 | 02 ownerall"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 protect 01 | 02 protectall 01 | 02 say 01 | 02 status 01 | 02 topic 01 | 02 unban 01 | 02 unclose 01 | 02 ungline 01 | 02 unkline 01 | 02 unzline"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 voice 01 | 02 voiceall 01 | 02 wallops 01 | 02 zline 01 | 02 zlinelist 01 | 02 entrymsg"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="2"} {
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Co-Administrateur01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addcnews 01 | 02 chankill 01 | 02 changline 01 | 02 chanscan 01 | 02 02 cleargline 01 | 02 clearkline 01 | 02 clearzline 01 | 02 cnewslist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 delcnews 01 | 02 scan 01 | 02 securite 01 | 02 svsjoin 01 | 02 svsnick 01 | 02 svspart"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="3"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Services01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 join 01 | 02 list 01 | 02 part"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="4"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Serveur01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addchan 01 | 02 addclient 01 | 02 addhost 01 | 02 addident 01 | 02 addip 01 | 02 addnews 01 | 02 addnick 01 | 02 addport 01 | 02 addreal"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addtrust 01 | 02 badchan 01 | 02 badhost 01 | 02 badident 01 | 02 badip 01 | 02 badnick 01 | 02 badreal 01 | 02 chanlist 01 | 02 client"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 clientlist 01 | 02 console 01 | 02 delchan 01 | 02 delclient 01 | 02 delhost 01 | 02 delident 01 | 02 delip 01 | 02 delnews 01 | 02 delnick"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 delport 01 | 02 delreal 01 | 02 deltrust 01 | 02 dnsbl 01 | 02 hostlist 01 | 02 identlist 01 | 02 iplist 01 | 02 newslist 01 | 02 nicklist 01 | 02 portlist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 reallist 01 | 02 scanner 01 | 02 trustlist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)=="5"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Réseau01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 action 01 | 02 addjoin 01 | 02 addonews 01 | 02 addsecu 01 | 02 autojoin 01 | 02 backup 01 | 02 chanlog 01 | 02 cnews 01 | 02 crypt"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 cryptage 01 | 02 cryptype 01 | 02 deljoin 01 | 02 delonews 01 | 02 delsecu 01 | 02 die 01 | 02 exec 01 | 02 joinlist 01 | 02 news 01 | 02 onews"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 onewslist 01 | 02 protection 01 | 02 restart 01 | 02 score 01 | 02 secu 01 | 02 seculist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
			}
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Showcommands $lea(console_deco):$lea(console_txt) $user" }
		}
		"help" {
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01-------------------------------------------------- 00Lea Service 01--------------------------------------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Tchatteur01 \]"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 copyright 01 | 02 help 01 | 02 showcommands 01"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[info exists olines($vuser)]} {
				if {$olines($vuser)>="1"} {
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03IRCopérateur Global01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 ban 01 | 02 clearallmodes 01 | 02 clearbans 01 | 02 clearclose 01 | 02 clearmodes 01 | 02 close 01 | 02 closelist 01 | 02 dehalfop"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 dehalfopall 01 | 02 deop 01 | 02 deopall 01 | 02 deowner 01 | 02 deownerall 01 | 02 deprotect 01 | 02 deprotectall 01 | 02 devoice"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 devoiceall 01 | 02 gline 01 | 02 glinelist 01 | 02 globops 01 | 02 halfop 01 | 02 halfopall 01 | 02 invite 01 | 02 kick 01 | 02 kickall 01 | 02 kickban"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 kickbanall 01 | 02 kill 01 | 02 kline 01 | 02 klinelist 01 | 02 mode 01 | 02 nickban 01 | 02 notice 01 | 02 op 01 | 02 opall 01 | 02 owner 01 | 02 ownerall"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 protect 01 | 02 protectall 01 | 02 say 01 | 02 status 01 | 02 topic 01 | 02 unban 01 | 02 unclose 01 | 02 ungline 01 | 02 unkline 01 | 02 unzline"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 voice 01 | 02 voiceall 01 | 02 wallops 01 | 02 zline 01 | 02 zlinelist 01 | 02 entrymsg"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="2"} {
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Co-Administrateur01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addcnews 01 | 02 chankill 01 | 02 changline 01 | 02 chanscan 01 | 02 02 cleargline 01 | 02 clearkline 01 | 02 clearzline 01 | 02 cnewslist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 delcnews 01 | 02 scan 01 | 02 securite 01 | 02 svsjoin 01 | 02 svsnick 01 | 02 svspart"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="3"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Services01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 join 01 | 02 list 01 | 02 part"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)>="4"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Serveur01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addchan 01 | 02 addclient 01 | 02 addhost 01 | 02 addident 01 | 02 addip 01 | 02 addnews 01 | 02 addnick 01 | 02 addport 01 | 02 addreal"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 addtrust 01 | 02 badchan 01 | 02 badhost 01 | 02 badident 01 | 02 badip 01 | 02 badnick 01 | 02 badreal 01 | 02 chanlist 01 | 02 client"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 clientlist 01 | 02 console 01 | 02 delchan 01 | 02 delclient 01 | 02 delhost 01 | 02 delident 01 | 02 delip 01 | 02 delnews 01 | 02 delnick"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 delport 01 | 02 delreal 01 | 02 deltrust 01 | 02 dnsbl 01 | 02 hostlist 01 | 02 identlist 01 | 02 iplist 01 | 02 newslist 01 | 02 nicklist 01 | 02 portlist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 reallist 01 | 02 scanner 01 | 02 trustlist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
				if {$olines($vuser)=="5"} { 
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Administrateur Réseau01 \]"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 action 01 | 02 addjoin 01 | 02 addonews 01 | 02 addsecu 01 | 02 autojoin 01 | 02 backup 01 | 02 chanlog 01 | 02 cnews 01 | 02 crypt"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 cryptage 01 | 02 cryptype 01 | 02 deljoin 01 | 02 delonews 01 | 02 delsecu 01 | 02 die 01 | 02 exec 01 | 02 joinlist 01 | 02 news 01 | 02 onews"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02 onewslist 01 | 02 protection 01 | 02 restart 01 | 02 score 01 | 02 secu 01 | 02 seculist"
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
				}
			}
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Help $lea(console_deco):$lea(console_txt) $user" }
		}
		"backup" {
			lea:backup
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Sauvegarde des databases réalisée."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Backup $lea(console_deco):$lea(console_txt) $user" }
		}
		"restart" {
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Restart $lea(console_deco):$lea(console_txt) $user" }
			if {[info exists lea(maxthrottle)]} { lea:secu }; lea:gestion
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Redémarrage de Lea Service."
			putdcc $lea(idx) ":$lea(pseudo) QUIT $lea(raison)"
			putdcc $lea(idx) ":$lea(link) SQUIT $lea(link) :$lea(raison)"
			lea:arret; set lea(counter) "0"; if {[lea:config]!="ok"} { utimer 1 lea:connexion }
		}
		"die" {
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Die $lea(console_deco):$lea(console_txt) $user" }
			if {[info exists lea(maxthrottle)]} { lea:secu }; lea:gestion
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Arrêt de Lea Service."
			putdcc $lea(idx) ":$lea(pseudo) QUIT $lea(raison)"
			putdcc $lea(idx) ":$lea(link) SQUIT $lea(link) :$lea(raison)"; lea:arret
		}
		"action" {
			if {$value2!="badhost" && $value2!="badip" && $value2!="badident" && $value2!="badnick" && $value2!="badreal" && $value2!="client" && $value2!="dnsbl" && $value2!="scanner"} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badhost 03:01 /msg $lea(pseudo) action badhost 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badip 03:01 /msg $lea(pseudo) action badip 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Zline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badident 03:01 /msg $lea(pseudo) action badident 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badnick 03:01 /msg $lea(pseudo) action badnick 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badreal 03:01 /msg $lea(pseudo) action badreal 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Client 03:01 /msg $lea(pseudo) action client 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Dnsbl 03:01 /msg $lea(pseudo) action dnsbl 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Zline 01\[ 042 01\]"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Scanner 03:01 /msg $lea(pseudo) action scanner 0/1/2"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
				return 0 
			}
			switch -exact $value2 {
				"badhost" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badhost 03:01 /msg $lea(pseudo) action badhost 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-h) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badhost : Aucune" }
						"1" { set lea(action-h) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badhost : Kill" }
						"2" { set lea(action-h) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badhost : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Badhost $lea(console_deco):$lea(console_txt) $user" }
				}
				"badip" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badip 03:01 /msg $lea(pseudo) action badip 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Zline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-b) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badip : Aucune" }
						"1" { set lea(action-b) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badip : Kill" }
						"2" { set lea(action-b) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badip : Zline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Badip $lea(console_deco):$lea(console_txt) $user" }
				}
				"badident" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badident 03:01 /msg $lea(pseudo) action badident 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-i) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badident : Aucune" }
						"1" { set lea(action-i) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badident : Kill" }
						"2" { set lea(action-i) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badident : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Badident $lea(console_deco):$lea(console_txt) $user" }
				}
				"badnick" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badnick 03:01 /msg $lea(pseudo) action badnick 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-n) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badnick : Aucune" }
						"1" { set lea(action-n) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badnick : Kill" }
						"2" { set lea(action-n) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badnick : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Badnick $lea(console_deco):$lea(console_txt) $user" }
				}
				"badreal" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Badreal 03:01 /msg $lea(pseudo) action badreal 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-r) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badreal : Aucune" }
						"1" { set lea(action-r) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badreal : Kill" }
						"2" { set lea(action-r) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Badreal : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Badreal $lea(console_deco):$lea(console_txt) $user" }
				}
				"client" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Client 03:01 /msg $lea(pseudo) action client 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-c) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Client : Aucune" }
						"1" { set lea(action-c) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Client : Kill" }
						"2" { set lea(action-c) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Client : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Client $lea(console_deco):$lea(console_txt) $user" }
				}
				"dnsbl" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Dnsbl 03:01 /msg $lea(pseudo) action dnsbl 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Zline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-d) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Dnsbl : Aucune" }
						"1" { set lea(action-d) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Dnsbl : Kill" }
						"2" { set lea(action-d) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Dnsbl : Zline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Dnsbl $lea(console_deco):$lea(console_txt) $user" }
				}
				"scanner" {
					if {$value4=="" || [regexp \[^0-2\] $value4]} { 
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Action Scanner 03:01 /msg $lea(pseudo) action scanner 0/1/2"
						putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :02Aucune 01\[ 040 01\] 02 Kill 01\[ 041 01\] 02 Gline 01\[ 042 01\]"
						return 0 
					}
					switch -exact $value4 {
						"0" { set lea(action-s) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Scanner : Aucune" }
						"1" { set lea(action-s) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Scanner : Kill" }
						"2" { set lea(action-s) "2"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Action Scanner : Gline" }
					}
					if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Action Scanner $lea(console_deco):$lea(console_txt) $user" }
				}
			}
		}
		"score" {
			if {$value2=="" || ![regexp {^[1-9]{1,1}.[0-9]{1,1}$} $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Score 03:01 /msg $lea(pseudo) score 1.0/9.9"; return 0 }
			set lea(rscore) $value2; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Changement du score DNSBL : $value2"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Score $lea(console_deco):$lea(console_txt) $user" }
		}
		"exec" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Exec 03:01 /msg $lea(pseudo) exec on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(umode)=="0"} {
						set lea(umode) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commandes exécutées par le link"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Exec $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Les commandes sont déjà exécutées par le link." }
				}
				"off" {
					if {$lea(umode)=="1"} {
						set lea(umode) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commandes exécutées par le pseudo"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Exec $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Les commandes sont déjà exécutées par le pseudo." }
				}
			}
		}
		"protection" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Protection 03:01 /msg $lea(pseudo) protection on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(protection)=="0"} {
						set lea(protection) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection des accès activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Protection $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection des accès est déjà activée." }
				}
				"off" {
					if {$lea(protection)=="1"} {
						set lea(protection) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection des accès désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Protection $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection des accès est déjà désactivée." }
				}
			}	
		}
		"status" {
			set numchan "0"; set numcli "0"; set numjoin "0"; set numhost "0"; set numtru "0"; set numnick "0"; set numide "0"; set numnews "0"; set numcnews "0"
			set numrea "0"; set numsal "0"; set numclo "0"; set numip "0"; set numport "0"; set numsecu "0"; set numonews "0"; set show ""
			set up [expr ([clock seconds] - $lea(uptime))]; set jour [expr ($up / 86400)]; set up [expr ($up % 86400)]
			set heure [expr ($up / 3600)]; set up [expr ($up % 3600)]; set minute [expr ($up / 60)]; set seconde [expr ($up % 60)]
			if {$jour == "1"} { append show "$jour jour " } elseif {$jour > "1"} { append show "$jour jours " } 
			if {$heure == "1"} { append show "$heure heure " } elseif {$heure > "1"} { append show "$heure heures " }
			if {$minute == "1"} { append show "$minute minute " } elseif {$minute > "1"} { append show "$minute minutes " }
			if {$seconde == "1"} { append show "$seconde seconde " } elseif {$seconde > "1"} { append show "$seconde secondes " }
			catch {open [lea:scriptdir]db/chan.db r} liste
			while {![eof $liste]} { gets $liste vars; if {$vars!=""} { incr numchan 1 } }
			catch {close $liste}
			catch {open [lea:scriptdir]db/client.db r} liste2
			while {![eof $liste2]} { gets $liste2 vars; if {$vars!=""} { incr numcli 1 } }
			catch {close $liste2}
			catch {open [lea:scriptdir]db/autojoin.db r} liste3
			while {![eof $liste3]} { gets $liste3 vars; if {$vars!=""} { incr numjoin 1 } }
			catch {close $liste3}
			catch {open [lea:scriptdir]db/host.db r} liste4
			while {![eof $liste4]} { gets $liste4 vars; if {$vars!=""} { incr numhost 1 } }
			catch {close $liste4}
			catch {open [lea:scriptdir]db/trust.db r} liste5
			while {![eof $liste5]} { gets $liste5 vars; if {$vars!=""} { incr numtru 1 } }
			catch {close $liste5}
			catch {open [lea:scriptdir]db/nick.db r} liste6
			while {![eof $liste6]} { gets $liste6 vars; if {$vars!=""} { incr numnick 1 } }
			catch {close $liste6}
			catch {open [lea:scriptdir]db/ident.db r} liste7
			while {![eof $liste7]} { gets $liste7 vars; if {$vars!=""} { incr numide 1 } }
			catch {close $liste7}
			catch {open [lea:scriptdir]db/real.db r} liste8
			while {![eof $liste8]} { gets $liste8 vars; if {$vars!=""} { incr numrea 1 } }
			catch {close $liste8}
			catch {open [lea:scriptdir]db/salon.db r} liste9
			while {![eof $liste9]} { gets $liste9 vars; if {$vars!=""} { incr numsal 1 } }
			catch {close $liste9}
			catch {open [lea:scriptdir]db/close.db r} liste10
			while {![eof $liste10]} { gets $liste10 vars; if {[lindex $vars 0]!=""} { incr numclo 1 } }
			catch {close $liste10}
			catch {open [lea:scriptdir]db/ip.db r} liste11
			while {![eof $liste11]} { gets $liste11 vars; if {$vars!=""} { incr numip 1 } }
			catch {close $liste11}
			catch {open [lea:scriptdir]db/port.db r} liste12
			while {![eof $liste12]} { gets $liste12 vars; if {$vars!=""} { incr numport 1 } }
			catch {close $liste12}
			catch {open [lea:scriptdir]db/secu.db r} liste13
			while {![eof $liste13]} { gets $liste13 vars; if {$vars!=""} { incr numsecu 1 } }
			catch {close $liste13}
			catch {open [lea:scriptdir]db/news.db r} liste14
			while {![eof $liste14]} { gets $liste14 vars; if {$vars!=""} { incr numnews 1 } }
			catch {close $liste14}
			catch {open [lea:scriptdir]db/onews.db r} liste15
			while {![eof $liste15]} { gets $liste15 vars; if {$vars!=""} { incr numonews 1 } }
			catch {close $liste15}
			catch {open [lea:scriptdir]db/cnews.db r} liste16
			while {![eof $liste16]} { gets $liste16 vars; if {$vars!=""} { incr numcnews 1 } }
			catch {close $liste16}
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01-------------------- 00Statut de Lea Service 01--------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Information01 \]"
			if {$lea(umode)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Execution : 01Link"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Execution : 01Pseudo" }
			switch -exact $lea(console) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Level Console : 010" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Level Console : 011" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Level Console : 012" }
				"3" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Level Console : 013" }
			}
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Salon de logs : 01$lea(salon)"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Uptime : 01$show"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Protection01 \]"
			if {$lea(protection)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Accès : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Accès : 04Off" }
			if {$lea(badchan)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badchan : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badchan : 04Off" }
			if {$lea(badhost)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badhost : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badhost : 04Off" }
			if {$lea(badident)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badident : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badident : 04Off" }
			if {$lea(badip)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badip : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badip : 04Off" }
			if {$lea(badnick)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badnick : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badnick : 04Off" }
			if {$lea(badreal)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badreal : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badreal : 04Off" }
			if {$lea(client)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Client : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Client : 04Off" }			
			if {$lea(entrymsg)!="0"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 EntryMsg : 03On"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Message : $lea(entrymsg)"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 EntryMsg : 04Off" }
			if {$lea(dnsbl)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Dnsbl : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Dnsbl : 04Off" }
			if {$lea(scanner)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Scanner : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Scanner : 04Off" }
			if {$lea(secu)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Secu : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Secu : 04Off" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Action01 \]"
			switch -exact $lea(action-h) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badhost : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badhost : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badhost : 01Gline" }
			}
			switch -exact $lea(action-i) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badident : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badident : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badident : 01Gline" }
			}
			switch -exact $lea(action-b) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badip : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badip : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badip : 01Zline" }
			}
			switch -exact $lea(action-n) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badnick : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badnick : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badnick : 01Gline" }
			}
			switch -exact $lea(action-r) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badreal : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badreal : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Badreal : 01Gline" }
			}
			switch -exact $lea(action-c) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Client : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Client : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Client : 01Gline" }
			}
			switch -exact $lea(action-d) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Dnsbl : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Dnsbl : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Dnsbl : 01Zline" }
			}
			switch -exact $lea(action-s) {
				"0" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Scanner : 01Aucune" }
				"1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Scanner : 01Kill" } 
				"2" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Scanner : 01Gline" }
			}
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Cryptage01 \]"
			if {$lea(ajoin)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Autojoin users : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Autojoin users : 04Off" }
			if {$lea(crypt)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage des hosts : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage des hosts : 04Off" }
			switch -exact $lea(cryptage) {
				"md4" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01md4" }
				"md5" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01md5" }
				"sum" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01sum" }
				"rand" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01rand" }
				"sha1" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01sha1" }
				"cksum" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01cksum" }
				"crc32" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01crc32" }
				"crc16" { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptage : 01crc16" }
			}
			if {$lea(cryptype)=="fai"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptype : 01FAI"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cryptype : 01TLD" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03News01 \]"
			if {$lea(news)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 News : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 News : 04Off" }
			if {$lea(onews)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Onews : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Onews : 04Off" }
			if {$lea(cnews)=="1"} {
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cnews : 03On"
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Cnews : 04Off" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01\[ 03Statistiques01 \]"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Autojoin users : 01$numjoin"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Clients IRC interdits : 01$numcli"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Hostnames interdites : 01$numhost"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Hostnames / IPs trustées : 01$numtru"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Idents interdits : 01$numide"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 IPs interdites : 01$numip"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 News Olines : 01$numonews"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 News Salons : 01$numcnews"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 News Serveur : 01$numnews"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Ports scannés : 01$numport"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Pseudos interdits : 01$numnick"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Realnames interdits : 01$numrea"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Salons autojoins : 01$numchan"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Salons fermés : 01$numclo"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Salons interdits : 01$numsal"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Salons sécurisés : 01$numsecu"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 02 Score DNSBL : 01$lea(rscore)"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Status $lea(console_deco):$lea(console_txt) $user" }
		}
		"owner" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Owner 03:01 /msg $lea(pseudo) owner #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +q $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Owner $lea(console_deco):$lea(console_txt) $value3 sur $value1 par $user" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +q $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Owner $lea(console_deco):$lea(console_txt) $user sur $value1" }
			}
		}
		"ownerall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Ownerall 03:01 /msg $lea(pseudo) ownerall #salon"; return 0 }
			set lea(cmd) "ownerall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Ownerall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"deowner" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deowner 03:01 /msg $lea(pseudo) deowner #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -q $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deowner $lea(console_deco):$lea(console_txt) $value3 sur $value1 par $user" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -q $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deowner $lea(console_deco):$lea(console_txt) $user sur $value1" }
			}
		}
		"deownerall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deownerall 03:01 /msg $lea(pseudo) deownerall #salon"; return 0 }
			set lea(cmd) "deownerall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deownerall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"protect" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Protect 03:01 /msg $lea(pseudo) protect #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +a $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Protect $lea(console_deco):$lea(console_txt) $value3 sur $value1 par $user" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +a $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Protect $lea(console_deco):$lea(console_txt) $user sur $value1" }
			}
		}
		"protectall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Protectall 03:01 /msg $lea(pseudo) protectall #salon"; return 0 }
			set lea(cmd) "protectall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Protectall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"deprotect" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deprotect 03:01 /msg $lea(pseudo) deprotect #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -a $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deprotect $lea(console_deco):$lea(console_txt) $value3 sur $value1 par $user" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -a $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deprotect $lea(console_deco):$lea(console_txt) $user sur $value1" }
			}
		}
		"deprotectall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deprotectall 03:01 /msg $lea(pseudo) deprotectall #salon"; return 0 }
			set lea(cmd) "deprotectall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deprotectall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"op" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Op 03:01 /msg $lea(pseudo) op #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +o $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Op $lea(console_deco):$lea(console_txt) $value3 a été opé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +o $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Op $lea(console_deco):$lea(console_txt) $user a été opé sur $value1" }
			}
		}
		"opall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Opall 03:01 /msg $lea(pseudo) opall #salon"; return 0 }
			set lea(cmd) "opall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Opall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"deop" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deop 03:01 /msg $lea(pseudo) deop #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -o $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deop $lea(console_deco):$lea(console_txt) $value3 a été déopé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -o $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deop $lea(console_deco):$lea(console_txt) $user a été déopé sur $value1" }
			}
		}
		"deopall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deopall 03:01 /msg $lea(pseudo) deopall #salon"; return 0 }
			set lea(cmd) "deopall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deopall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"halfop" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Halfop 03:01 /msg $lea(pseudo) halfop #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +h $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Halfop $lea(console_deco):$lea(console_txt) $value3 a été halfopé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +h $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Halfop $lea(console_deco):$lea(console_txt) $user a été halfopé sur $value1" }
			}
		}
		"halfopall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Halfopall 03:01 /msg $lea(pseudo) halfopall #salon"; return 0 }
			set lea(cmd) "halfopall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Halfopall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"dehalfop" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Dehalfop 03:01 /msg $lea(pseudo) dehalfop #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -h $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Dehalfop $lea(console_deco):$lea(console_txt) $value3 a été déhalfopé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -h $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Dehalfop $lea(console_deco):$lea(console_txt) $user a été déhalfopé sur $value1" }
			}
		}
		"dehalfopall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Dehalfopall 03:01 /msg $lea(pseudo) dehalfopall #salon"; return 0 }
			set lea(cmd) "dehalfopall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Dehalfopall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"voice" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Voice 03:01 /msg $lea(pseudo) voice #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +v $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Voice $lea(console_deco):$lea(console_txt) $value3 a été voicé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 +v $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Voice $lea(console_deco):$lea(console_txt) $user a été voicé sur $value1" }
			}
		}
		"voiceall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Voiceall 03:01 /msg $lea(pseudo) voiceall #salon"; return 0 }
			set lea(cmd) "voiceall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Voiceall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"devoice" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Devoice 03:01 /msg $lea(pseudo) devoice #salon pseudo"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value4!=""} {
				if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -v $value3"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Devoice $lea(console_deco):$lea(console_txt) $value3 a été dévoicé par $user sur $value1" }
			} else {
				putdcc $lea(idx) ":[lea:umode] MODE $value1 -v $user"
				if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Devoice $lea(console_deco):$lea(console_txt) $user a été dévoicé sur $value1" }
			}
		}
		"devoiceall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Devoiceall 03:01 /msg $lea(pseudo) devoiceall #salon"; return 0 }
			set lea(cmd) "devoiceall"
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Devoiceall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"kick" {
			if {[string index $value1 0]!="#" || $value4==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kick 03:01 /msg $lea(pseudo) kick #salon pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {$value5==""} { set value5 "Kicked" }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			putdcc $lea(idx) ":[lea:umode] KICK $value2 $value4 $value5 ($user)"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kick $lea(console_deco):$lea(console_txt) $value3 a été kické par $user sur $value1" }
		}
		"kickall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kickall 03:01 /msg $lea(pseudo) kickall #salon raison"; return 0 }
			if {$value6==""} { set value6 "Kicked" }			
			set lea(cmd) "kickall"; set lea(rsn) $value6
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kickall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"ban" {
			if {[string index $value1 0]!="#" || ![regexp {^(.+)!(.+)+@(.+)$} $value3]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Ban 03:01 /msg $lea(pseudo) ban #salon pseudo!ident@host"; return 0 }
			putdcc $lea(idx) ":[lea:umode] MODE $value1 +b $value3"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Ban $lea(console_deco):$lea(console_txt) $value3 a été banni par $user sur $value1" }
		}	
		"nickban" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Nickban 03:01 /msg $lea(pseudo) nickban #salon pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {$value5==""} { set value5 "Nick Banned" }
			putdcc $lea(idx) ":[lea:umode] MODE $value1 +b $value4*!*@*"
       			putdcc $lea(idx) ":[lea:umode] KICK $value1 $value3 $value5 ($user)"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Nickban $lea(console_deco):$lea(console_txt) $value3 a été banni par $user sur $value1" }
		}
		"kickban" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kickban 03:01 /msg $lea(pseudo) kickban #salon pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {$value5==""} { set value5 "Kick Banned" }
			putdcc $lea(idx) ":[lea:umode] MODE $value1 +b *!*@$vhosts($value4)"
       			putdcc $lea(idx) ":[lea:umode] KICK $value1 $value3 $value5 ($user)"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kickban $lea(console_deco):$lea(console_txt) $value3 a été banni par $user sur $value1" }
		}
		"kickbanall" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kickbanall 03:01 /msg $lea(pseudo) kickbanall #salon raison"; return 0 }
			if {$value6==""} { set value6 "Kick Banned" }
			set lea(cmd) "kickbanall"; set lea(rsn) $value6
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kickbanall $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"unban" {
			if {[string index $value1 0]!="#" || ![regexp {^(.+)!(.+)+@(.+)$} $value3]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Unban 03:01 /msg $lea(pseudo) unban #salon pseudo!ident@host"; return 0 }
			putdcc $lea(idx) ":[lea:umode] MODE $value1 -b $value3"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Unban $lea(console_deco):$lea(console_txt) $value3 a été débanni par $user sur $value1" }
		}
		"clearbans" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Clearbans 03:01 /msg $lea(pseudo) clearbans #salon"; return 0 }
			putdcc $lea(idx) ":[lea:umode] SVSMODE $value1 -b"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearbans $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"topic" {
			if {[string index $value1 0]!="#" || $value6==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Topic 03:01 /msg $lea(pseudo) topic #salon topic"; return 0 }
			putdcc $lea(idx) ":[lea:umode] TOPIC $value1 :$value6"	
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Topic $lea(console_deco):$lea(console_txt) $user change le topic sur $value1" }
		}
		"mode" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Mode 03:01 /msg $lea(pseudo) mode #salon +/-mode"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Salon de logs"; return 0 }
			if {![regexp ^\[\+\-\]+\[a-zA-Z\]+$ $value3]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Chanmode Incorrect"; return 0 }
			if {[string match *q* $value3] || [string match *a* $value3] ||[string match *o* $value3] ||[string match *h* $value3] ||[string match *v* $value3]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Chanmode Refusé"; return 0 }
			putdcc $lea(idx) ":[lea:umode] MODE $value1 $value6"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Mode $lea(console_deco):$lea(console_txt) $user applique le mode $value6 sur $value1" }
		}
		"clearmodes" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Clearmodes 03:01 /msg $lea(pseudo) clearmodes #salon"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Salon de logs"; return 0 }
			set lea(cmd) "clearmodes"
			putdcc $lea(idx) ":[lea:umode] MODE $value1"
		  	if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearmodes $lea(console_deco):$lea(console_txt) $user sur $value1" }
		}
		"clearallmodes" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Clearallmodes 03:01 /msg $lea(pseudo) clearallmodes #salon"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Salon de logs"; return 0 }
			putdcc $lea(idx) ":[lea:umode] SVSMODE $value1 -beIqaohv"
			putdcc $lea(idx) ":[lea:umode] MODE $value1"
			putdcc $lea(idx) ":[lea:umode] SVSMODE $value1 -b"			
		  	if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearallmodes $lea(console_deco):$lea(console_txt) $user sur $value1" }
		}
		"invite" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Invite 03:01 /msg $lea(pseudo) invite #salon pseudo"; return 0 }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			putdcc $lea(idx) ":$lea(pseudo) INVITE $value3 $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Invite $lea(console_deco):$lea(console_txt) $user invite $value3 sur $value1" }
		}
		"say" {
			if {[string index $value1 0]!="#" || $value6==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Say 03:01 /msg $lea(pseudo) say #salon message"; return 0 }
			putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $value1 :$value6"
			if {[lea:console "1 $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Say $lea(console_deco):$lea(console_txt) $user sur $value1" }
		}
		"notice" {
			if {$value7==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Notice 03:01 /msg $lea(pseudo) notice message"; return 0 }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $*.* :01 \[03 Notice Globale 01\]  $value7"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Notice $lea(console_deco):$lea(console_txt) $user" }
		}
		"wallops" {
			if {$value7==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Wallops 03:01 /msg $lea(pseudo) wallops message"; return 0 }
			putdcc $lea(idx) ":[lea:umode] WALLOPS  $value7 ($user)"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Wallops $lea(console_deco):$lea(console_txt) $user" }
		}
		"globops" {
			if {$value7==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Globops 03:01 /msg $lea(pseudo) globops message"; return 0 }
			putdcc $lea(idx) ":[lea:umode] GLOBOPS  $value7 ($user)"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Globops $lea(console_deco):$lea(console_txt) $user" }
		}
		"svsjoin" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Svsjoin 03:01 /msg $lea(pseudo) svsjoin #salon pseudo"; return 0 }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			putdcc $lea(idx) ":[lea:umode] SVSJOIN $value3 $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Svsjoin $lea(console_deco):$lea(console_txt) $value3 entre sur $value1 par $user" }
		}
		"svspart" {
			if {[string index $value1 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Svspart 03:01 /msg $lea(pseudo) svspart #salon pseudo"; return 0 }
			if {![info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {[lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			putdcc $lea(idx) ":[lea:umode] SVSPART $value3 $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Svspart $lea(console_deco):$lea(console_txt) $value3 part de $value1 par $user" }
		}
		"svsnick" {
			if {$value1=="" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Svsnick 03:01 /msg $lea(pseudo) svsnick ancien-pseudo nouveau-pseudo"; return 0 }
			if {$value2==$value4} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo Identique."; return 0 }
			if {[lea:protect "$vuser $value2"]=="ok" || [lea:protect "$vuser $value4"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable ($value1)."; return 0 }
			if {[info exists vhosts($value4)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo existant ($value3)."; return 0 }
			putdcc $lea(idx) ":[lea:umode] SVSNICK $value1 $value3 56826586"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Svsnick $lea(console_deco):$lea(console_txt) $user change le pseudo de $value1 en $value3" }
		}
		"kill" {
			if {$value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kill 03:01 /msg $lea(pseudo) kill pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {$value6==""} { set value6 "Killed" }
			putdcc $lea(idx) ":[lea:umode] KILL $value1 $value6 ($user)"; lea:refresh $value2
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kill $lea(console_deco):$lea(console_txt) $value1 a été killé par $user : $value6" }
			if {[lea:console 2]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Déconnexion $lea(console_deco):$lea(console_txt) $value1 a été killé : $value6" } 
		}
		"chankill" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Chankill 03:01 /msg $lea(pseudo) chankill #salon raison"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé"; return 0 }			
			if {$value6==""} { set value6 "Chan Killed" }
			set lea(cmd) "chankill"; set lea(rsn) $value6
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Chankill $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"kline" {
			if {$value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Kline 03:01 /msg $lea(pseudo) kline pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {$value6==""} { set value6 "Klined" }
			putdcc $lea(idx) ":$lea(link) TKL + k * $vhosts($value2) $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] : $value6 ($user) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Kline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"unkline" {
			if {$value1=="" || ![regexp {^(.+)+@(.+)$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Unkline 03:01 /msg $lea(pseudo) unkline ident@host"; return 0 }
			putdcc $lea(idx) ":$lea(link) TKL - k [lindex [split $value1 @] 0] [lindex [split $value1 @] 1] $lea(pseudo)"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Unkline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"klinelist" {
			set lea(cmd) "kline"; set lea(rep) $vuser
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Klinelist $lea(console_deco):$lea(console_txt) $user" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01---------------------- 00Liste des Klines 01----------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			putdcc $lea(idx) ":$lea(pseudo) STATS K"
		}
		"clearkline" {
			set lea(cmd) "clearkline"
			putdcc $lea(idx) ":$lea(pseudo) STATS K"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Liste des klines vidée."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearkline $lea(console_deco):$lea(console_txt) $user" }
		}
		"gline" {
			if {$value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Gline 03:01 /msg $lea(pseudo) gline pseudo raison"; return 0 }
			if {[lea:protect "$vuser $value2"]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			if {![info exists vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
			if {$value6==""} { set value6 "Glined" }
			putdcc $lea(idx) ":$lea(link) TKL + G * $vhosts($value2) $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] : $value6 ($user) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Gline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}			
		"ungline" {
			if {$value1=="" || ![regexp {^(.+)+@(.+)$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Ungline 03:01 /msg $lea(pseudo) ungline ident@host"; return 0 }
			putdcc $lea(idx) ":$lea(link) TKL - G [lindex [split $value1 @] 0] [lindex [split $value1 @] 1] $lea(pseudo)"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Ungline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"glinelist" {
			set lea(cmd) "gline"; set lea(rep) $vuser
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Glinelist $lea(console_deco):$lea(console_txt) $user" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01---------------------- 00Liste des Glines 01----------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :" 
			putdcc $lea(idx) ":$lea(pseudo) STATS G"
		}
		"cleargline" {
			set lea(cmd) "cleargline"
			putdcc $lea(idx) ":$lea(pseudo) STATS G"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Liste des glines vidée."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Cleargline $lea(console_deco):$lea(console_txt) $user" }
		}
		"zline" {
			if {$value1=="" || ![regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Zline 03:01 /msg $lea(pseudo) zline IP raison"; return 0 }
			if {$lea(ip)==$value2} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : IP Protégée"; return 0 }
			foreach {mask num} [array get trusts] { if {$value2==$mask} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : IP Trustée"; return 0 } }
			if {$value6==""} { set value6 "Zlined" }
			putdcc $lea(idx) ":$lea(link) TKL + Z * $value2 $lea(pseudo) [expr [unixtime] + $lea(duree)] [unixtime] : $value6 ($user) (Expire le [lea:duree [expr [unixtime] + $lea(duree)]])"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Zline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}			
		"unzline" {
			if {$value1=="" || ![regexp {^(.+)+@([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Unzline 03:01 /msg $lea(pseudo) unzline ident@ip"; return 0 }
			putdcc $lea(idx) ":$lea(link) TKL - Z [lindex [split $value1 @] 0] [lindex [split $value1 @] 1] $lea(pseudo)"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Unzline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"zlinelist" {
			set lea(cmd) "zline"; set lea(rep) $vuser
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Zlinelist $lea(console_deco):$lea(console_txt) $user" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01---------------------- 00Liste des Zlines 01----------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :" 
			putdcc $lea(idx) ":$lea(pseudo) STATS G"
		}
		"clearzline" {
			set lea(cmd) "clearzline"
			putdcc $lea(idx) ":$lea(pseudo) STATS G"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Liste des zlines vidée."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearzline $lea(console_deco):$lea(console_txt) $user" }
		}
		"changline" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Changline 03:01 /msg $lea(pseudo) changline #salon raison"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé"; return 0 }			
			if {$value6==""} { set value6 "Chan Glined" }
			set lea(cmd) "changline"; set lea(rsn) $value6
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Changline $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"close" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Close 03:01 /msg $lea(pseudo) close #salon raison"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Salon de logs"; return 0 }			
			catch {open "[lea:scriptdir]db/salon.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {![string compare -nocase $value2 $verif1]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Interdit"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/chan.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {![string compare -nocase $value2 $verif2]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Autojoin"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 [lindex $verif 0]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des salons fermés."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			if {$value6==""} { set value6 "Closed" }
			set lea(cmd) "close"; set lea(rsn) $value6
			set bclose [open "[lea:scriptdir]db/close.db" a]; puts $bclose "[encoding convertto iso8859-1 $value2] [encoding convertto iso8859-1 $value6]"; close $bclose
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 vient d'être ajouté dans la liste des salons fermés."
			putdcc $lea(idx) ":$lea(pseudo) JOIN $value1"
			putdcc $lea(idx) ":[lea:umode] MODE $value1 +sntio $lea(pseudo)"
			putdcc $lea(idx) ":[lea:umode] TOPIC $value1 :01Salon Fermé - Date: [lea:duree [unixtime]] - Raison: $value6" 
			putdcc $lea(idx) ":$lea(pseudo) WHO $value1"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Close $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"unclose" {
			if {[string index $value1 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Unclose 03:01 /msg $lea(pseudo) unclose #salon"; return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 [lindex $verif 0]]} { set stop 1 }; if {[string compare -nocase $value2 [lindex $verif 0]] && [lindex $verif 0]!=""} { lappend salon "[lindex $verif 0] [join [lrange $verif 1 end]]" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des salons fermés."; return 0 
			} else {
				if [info exists salon] {
					set del [open "[lea:scriptdir]db/close.db" w+]; foreach delchan $salon { puts $del "$delchan" }; close $del
				} else { set del [open "[lea:scriptdir]db/close.db" w+]; close $del }
				set lea(cmd) "unclose"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01$value1 a bien été supprimé de la liste des salons fermés."
				putdcc $lea(idx) ":[lea:umode] MODE $value1"
				putdcc $lea(idx) ":$lea(pseudo) PART $value1"
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Unclose $lea(console_deco):$lea(console_txt) $value1 par $user" }
			}
		}
		"closelist" {
			catch {open "[lea:scriptdir]db/close.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01----------- 00Salons fermés 01-----------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste salon; if {[lindex $salon 0]!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 [lindex $salon 0]" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Salon." }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Closelist $lea(console_deco):$lea(console_txt) $user" }
		}
		"clearclose" {
			catch {open "[lea:scriptdir]db/close.db" r} num
			while {![eof $num]} { gets $num chan; if {[lindex $chan 0]!=""} { set lea(cmd) "clearclose"; break } }
			catch {close $num}
			catch {open "[lea:scriptdir]db/close.db" r} liste
			while {![eof $liste]} { gets $liste salon; if {[lindex $salon 0]!=""} { putdcc $lea(idx) ":[lea:umode] MODE [lindex $salon 0]"; putdcc $lea(idx) ":$lea(pseudo) PART [lindex $salon 0]" } }
			catch {close $liste}
			set del [open "[lea:scriptdir]db/close.db" w+]; close $del
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01La liste des salons fermés à bien été vidée."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clearclose $lea(console_deco):$lea(console_txt) $user" }	
		}
		"scanner" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Scanner 03:01 /msg $lea(pseudo) scanner on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(scanner)=="0"} {
						set lea(scanner) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Scanner activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scanner $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection scanner est déjà activée." }
				}
				"off" {
					if {$lea(scanner)=="1"} {
						set lea(scanner) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Scanner désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scanner $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection scanner est déjà désactivée." }
				}
			}
		}
		"scan" {
			if {$lea(scanner)=="1"} {
				if {$value2==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Scan 03:01 /msg $lea(pseudo) scan pseudo"; return 0 }
				if {[lea:protected $value2]!="ok"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
				if {![info exists vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Pseudo introuvable."; return 0 }
				foreach {mask num} [array get trusts] { if {[string match *$mask* $vhosts($value2)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Hostname Trustée."; return 0 } }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Scan en cours..."
				lea:scanport "$vhosts($value2) $value1"
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Scan $lea(console_deco):$lea(console_txt) $user" }
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le scanner est désactivé."; return 0 }
		}
		"chanscan" {
			if {$lea(scanner)=="1"} {
				if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Chanscan 03:01 /msg $lea(pseudo) chanscan #salon"; return 0 }
				if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon de logs"; return 0 } 
				set lea(cmd) "chanscan"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Chanscan en cours..."
				putdcc $lea(idx) ":$lea(pseudo) WHO $value2"
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Chanscan $lea(console_deco):$lea(console_txt) $user ($value1)" }
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le scanner est désactivé."; return 0 }
		}
		"addport" {
			if {$value2=="" || [regexp \[^0-9\] $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addport 03:01 /msg $lea(pseudo) addport port"; return 0 }
			catch {open [lea:scriptdir]db/port.db r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le port $value2 est déjà dans la liste des ports."; set stop "1"; break } }
			catch {close $liste}; if {$stop=="1"} { return 0 }
			set bport [open [lea:scriptdir]db/port.db a]; puts $bport [encoding convertto iso8859-1 $value2]; close $bport
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le port $value2 a bien été ajouté dans la liste des ports."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addport $lea(console_deco):$lea(console_txt) $user" }
		}
		"delport" {
			if {$value2=="" || [regexp \[^0-9\] $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delport 03:01 /msg $lea(pseudo) delport port"; return 0 }
			catch {open [lea:scriptdir]db/port.db r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend ports "$verif" } }
			catch {close $liste}
			if {$stop=="0"} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le port $value2 n'est pas dans la liste des ports."; return 0 
			} else {
				if {[info exists ports]} {
					set del [open [lea:scriptdir]db/port.db w+]; foreach delport $ports { puts $del "$delport" }; close $del
				} else { set del [open [lea:scriptdir]db/port.db w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le port $value2 a bien été supprimé de la liste des ports."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delport $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"portlist" {
			catch {open [lea:scriptdir]db/port.db r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01----- 00Liste des ports 01-----"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste ports; if {$ports!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $ports" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Port" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Portlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"secu" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Secu 03:01 /msg $lea(pseudo) secu on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(secu)=="0"} {
						set lea(secu) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de sécurité des salons activé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Secu $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de sécurité des salons est déjà activé." }
				}
				"off" {
					if {$lea(secu)=="1"} {
						set lea(secu) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de sécurité des salons désactivé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Secu $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de sécurité des salons est déjà désactivé." }
				}
			}	
		}
		"securite" {
			if {$lea(secu)=="1"} {
				if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Securite 03:01 /msg $lea(pseudo) securite on/off"; return 0 }
				switch -exact $value2 {
					"on" {
						if {$lea(securite)=="0" && ![info exists lea(maxthrottle)]} {
							set lea(securite) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Sécurité des salons activée"
							if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Securite $lea(console_deco):$lea(console_txt) $user" }
							putdcc $lea(idx) ":$lea(pseudo) NOTICE $*.* : $lea(secuon)"
							catch {open "[lea:scriptdir]db/secu.db" r} liste
							while {![eof $liste]} { gets $liste salon; if {$salon!=""} { putdcc $lea(idx) ":[lea:umode] MODE $salon +$lea(secumode)" } }
							catch {close $liste}; set lea(maxthrottle) "1"; lea:gestion; utimer $lea(secutime) lea:secu
						} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La sécurité des salons est déjà activée." }
					}
					"off" {
						if {[info exists lea(maxthrottle)]} {
							set lea(securite) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Sécurité des salons désactivée"
							if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Securite $lea(console_deco):$lea(console_txt) $user" }
							foreach kill [utimers] { if {[lindex $kill 1]=="lea:secu"} {  killutimer [lindex $kill 2] } }
							lea:secu
						} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La sécurité des salons est déjà désactivée." }
					}
				}			
			} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de sécurité des salons est désactivé."; return 0 }
		}
		"addsecu" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addsecu 03:01 /msg $lea(pseudo) addsecu #salon"; return 0 }
			if {$value2==[string tolower $lea(salon)]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon de logs"; return 0 } 
			catch {open "[lea:scriptdir]db/salon.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {![string compare -nocase $value2 $verif1]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Interdit"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {![string compare -nocase $value2 $verif2]} {  putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Fermé"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/secu.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des salons sécurisés."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set join [open "[lea:scriptdir]db/secu.db" a]; puts $join [encoding convertto iso8859-1 $value2]; close $join
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des salons sécurisés."
			if {[info exists lea(maxthrottle)]} { putdcc $lea(idx) ":$lea(pseudo) MODE $value1 +$lea(secumode)" }
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addsecu $lea(console_deco):$lea(console_txt) $user" }
		}
		"delsecu" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delsecu 03:01 /msg $lea(pseudo) delsecu #salon"; return 0 }
			catch {open "[lea:scriptdir]db/secu.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend salle "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des salons sécurisés."; return 0
			} else {
				if {[info exists salle]} { 
					set del [open "[lea:scriptdir]db/secu.db" w+]; foreach delchan $salle { puts $del "$delchan" }; close $del
				} else { set del [open "[lea:scriptdir]db/secu.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des salons sécurisés."
				if {[info exists lea(maxthrottle)]} { putdcc $lea(idx) ":$lea(pseudo) MODE $value1 -$lea(secumode)" }			
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delsecu $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"seculist" {
			catch {open "[lea:scriptdir]db/secu.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01-------- 00Salons Sécurisés 01--------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste salon; if {$salon!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $salon" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01 Aucun Salon" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Seculist $lea(console_deco):$lea(console_txt) $user" }
		}
		"entrymsg" {
			if {$value2=="" || $value2==" "} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande EntryMsg 03:01 /msg $lea(pseudo) entrymsg off/message"; return 0 }
 
				if {$value2=="off"} {
					if {$lea(entrymsg)=="0"} {
						set lea(entrymsg) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Message d'accueil désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)EntryMsg $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le Message d'accueil est déjà désactivée." }
				} else {
					if {$lea(entrymsg)=="0"} {
						set lea(entrymsg) "$value8"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Message d'accueil activée ( $lea(entrymsg) )"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)EntryMsg $lea(console_deco):$lea(console_txt) $user" }
					} else { 
					set lea(entrymsg) "$value8";
					putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Message d'accueil updater." 
					}
			}
		}
		"dnsbl" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Dnsbl 03:01 /msg $lea(pseudo) dnsbl on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(dnsbl)=="0"} {
						set lea(dnsbl) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection DNSBL activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Dnsbl $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection DNSBL est déjà activée." }
				}
				"off" {
					if {$lea(dnsbl)=="1"} {
						set lea(dnsbl) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection DNSBL désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Dnsbl $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection DNSBL est déjà désactivée." }
				}
			}	
		}
		"badip" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badip 03:01 /msg $lea(pseudo) badip on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badip)=="0"} {
						set lea(badip) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badip activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badip $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badip est déjà activée." }
				}
				"off" {
					if {$lea(badip)=="1"} {
						set lea(badip) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badip désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badip $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badip est déjà désactivée." }
				}
			}
		}
		"addip" {
			if {$value1=="" || ![regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addip 03:01 /msg $lea(pseudo) addip IP"; return 0 }
			if {$value1==$lea(ip)} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : IP Protégée"; return 0 }
			foreach {mask num} [array get trusts] { if {$value2==$mask} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : IP Trustée"; return 0 } }
			catch {open "[lea:scriptdir]db/ip.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des IPs interdites."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set ip [open "[lea:scriptdir]db/ip.db" a]; puts $ip [encoding convertto iso8859-1 $value2]; close $ip
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des IPs interdites."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addip $lea(console_deco):$lea(console_txt) $user" }
		}
		"delip" {
			if {$value1=="" || ![regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $value1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delip 03:01 /msg $lea(pseudo) delip IP"; return 0 }
			catch {open "[lea:scriptdir]db/ip.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend ip "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des IPs interdites."; return 0
			} else {
				if {[info exists ip]} { 
					set del [open "[lea:scriptdir]db/ip.db" w+]; foreach delip $ip { puts $del "$delip" }; close $del
				} else { set del [open "[lea:scriptdir]db/ip.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des IPs interdites."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delip $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"iplist" {
			catch {open "[lea:scriptdir]db/ip.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00IPs Interdites 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste ip; if {$ip!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $ip" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucune IP" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Iplist $lea(console_deco):$lea(console_txt) $user" }
		}
		"badnick" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badnick 03:01 /msg $lea(pseudo) badnick on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badnick)=="0"} {
						set lea(badnick) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badnick activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badnick $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badnick est déjà activée." }
				}
				"off" {
					if {$lea(badnick)=="1"} {
						set lea(badnick) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badnick désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badnick $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badnick est déjà désactivée." }
				}
			}
		}
		"addnick" {
			if {$value2==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addnick 03:01 /msg $lea(pseudo) addnick pseudo"; return 0 }
			if {[string match *$value2* [string tolower $lea(pseudo)]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 }
			foreach {p n} [array get ulines] { if {[string match *$value2* $p]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 } }
			foreach {a r} [array get olines] { if {[string match *$value2* $r]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Pseudo Protégé"; return 0 } }
			catch {open "[lea:scriptdir]db/nick.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des pseudos interdits."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set nick [open "[lea:scriptdir]db/nick.db" a]; puts $nick [encoding convertto iso8859-1 $value2]; close $nick
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des pseudos interdits."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addnick $lea(console_deco):$lea(console_txt) $user" }
		}
		"delnick" {
			if {$value2==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delnick 03:01 /msg $lea(pseudo) delnick pseudo"; return 0 }
			catch {open "[lea:scriptdir]db/nick.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend pseudo "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des pseudos interdits."; return 0
			} else {
				if {[info exists pseudo]} { 
					set del [open "[lea:scriptdir]db/nick.db" w+]; foreach delnick $pseudo { puts $del "$delnick" }; close $del
				} else { set del [open "[lea:scriptdir]db/nick.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des pseudos interdits."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delnick $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"nicklist" {
			catch {open "[lea:scriptdir]db/nick.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00Pseudos Interdits 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste pseudo; if {$pseudo!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $pseudo" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Pseudo" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Nicklist $lea(console_deco):$lea(console_txt) $user" }
		}
		"badident" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badident 03:01 /msg $lea(pseudo) badident on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badident)=="0"} {
						set lea(badident) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badident activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badident $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badident est déjà activée." }
				}
				"off" {
					if {$lea(badident)=="1"} {
						set lea(badident) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badident désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badident $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badident est déjà désactivée." }
				}
			}
		}
		"addident" {
			if {$value2=="" || [string match *@* $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addident 03:01 /msg $lea(pseudo) addident ident"; return 0 }
			if {[string match *$value2* [string tolower $lea(ident)]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Ident Protégé"; return 0 }
			catch {open "[lea:scriptdir]db/ident.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des idents interdits."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set ident [open "[lea:scriptdir]db/ident.db" a]; puts $ident [encoding convertto iso8859-1 $value2]; close $ident
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des idents interdits."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addident $lea(console_deco):$lea(console_txt) $user" }
		}
		"delident" {
			if {$value2=="" || [string match *@* $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delident 03:01 /msg $lea(pseudo) delident ident"; return 0 }
			catch {open "[lea:scriptdir]db/ident.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend ident "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des idents interdits."; return 0
			} else {
				if {[info exists ident]} { 
					set del [open "[lea:scriptdir]db/ident.db" w+]; foreach delident $ident { puts $del "$delident" }; close $del
				} else { set del [open "[lea:scriptdir]db/ident.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des idents interdits."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delident $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"identlist" {
			catch {open "[lea:scriptdir]db/ident.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01---------- 00Idents Interdits 01----------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste ident; if {$ident!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $ident" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Ident" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Identlist $lea(console_deco):$lea(console_txt) $user" }
		}		
		"badhost" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badhost 03:01 /msg $lea(pseudo) badhost on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badhost)=="0"} {
						set lea(badhost) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badhost activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badhost $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badhost est déjà activée." }
				}
				"off" {
					if {$lea(badhost)=="1"} {
						set lea(badhost) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badhost désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badhost $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badhost est déjà désactivée." }
				}
			}
		}
		"addhost" {
			if {$value2=="" || ![regexp {^[a-z0-9\-.*]+\.[a-z]{2,4}$} $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addhost 03:01 /msg $lea(pseudo) addhost hostname"; return 0 }
			if {[string match *$value2* [string tolower $lea(host)]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Hostname Protégée"; return 0 }
			foreach {mask num} [array get trusts] { if {[string match *$value2* $mask]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Hostname Trustée"; return 0 } }
			catch {open "[lea:scriptdir]db/host.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des hostnames interdites."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set host [open "[lea:scriptdir]db/host.db" a]; puts $host [encoding convertto iso8859-1 $value2]; close $host
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des hostnames interdites."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addhost $lea(console_deco):$lea(console_txt) $user" }
		}
		"delhost" {
			if {$value2=="" || ![regexp {^[a-z0-9\-.*]+\.[a-z]{2,4}$} $value2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delhost 03:01 /msg $lea(pseudo) delhost hostname"; return 0 }
			catch {open "[lea:scriptdir]db/host.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend host "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des hostnames interdites."; return 0
			} else {
				if {[info exists host]} { 
					set del [open "[lea:scriptdir]db/host.db" w+]; foreach delhost $host { puts $del "$delhost" }; close $del
				} else { set del [open "[lea:scriptdir]db/host.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des hostnames interdites."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delhost $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"hostlist" {
			catch {open "[lea:scriptdir]db/host.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01----------- 00Hostnames Interdites 01-----------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste host; if {$host!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $host" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucune Hostname" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Hostlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"badreal" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badreal 03:01 /msg $lea(pseudo) badreal on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badreal)=="0"} {
						set lea(badreal) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badreal activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badreal $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badreal est déjà activée." }
				}
				"off" {
					if {$lea(badreal)=="1"} {
						set lea(badreal) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badreal désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badreal $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badreal est déjà désactivée." }
				}
			}
		}
		"addreal" {
			if {$value2==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addreal 03:01 /msg $lea(pseudo) addreal realname"; return 0 }
			catch {open "[lea:scriptdir]db/real.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des realnames interdits."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set real [open "[lea:scriptdir]db/real.db" a]; puts $real [encoding convertto iso8859-1 $value2]; close $real
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des realnames interdits."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addreal $lea(console_deco):$lea(console_txt) $user" }
		}
		"delreal" {
			if {$value2==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delreal 03:01 /msg $lea(pseudo) delreal realname"; return 0 }
			catch {open "[lea:scriptdir]db/real.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend real "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des realnames interdits."; return 0
			} else {
				if {[info exists real]} { 
					set del [open "[lea:scriptdir]db/real.db" w+]; foreach delreal $real { puts $del "$delreal" }; close $del
				} else { set del [open "[lea:scriptdir]db/real.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des realnames interdits."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delreal $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"reallist" {
			catch {open "[lea:scriptdir]db/real.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00Realnames Interdits 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste real; if {$real!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $real" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Realname" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Reallist $lea(console_deco):$lea(console_txt) $user" }
		}
		"badchan" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Badchan 03:01 /msg $lea(pseudo) badchan on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(badchan)=="0"} {
						set lea(badchan) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badchan activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badchan $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badchan est déjà activée." }
				}
				"off" {
					if {$lea(badchan)=="1"} {
						set lea(badchan) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Badchan désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Badchan $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection badchan est déjà désactivée." }
				}
			}
		}
		"addchan" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addchan 03:01 /msg $lea(pseudo) addchan #salon"; return 0 }
			if {[string match *[string trimleft $value2 #]* [string trimleft [string tolower $lea(salon)] #]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $user :01Accès Refusé : Salon de logs"; return 0 }
			catch {open "[lea:scriptdir]db/chan.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {[string match *[string trimleft $value2 #]* [string trimleft $verif1 #]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Autojoin"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/close.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {[string match *[string trimleft $value2 #]* [string trimleft [lindex $verif2 0] #]]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Salon Fermé"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/salon.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des salons interdits."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set chan [open "[lea:scriptdir]db/salon.db" a]; puts $chan [encoding convertto iso8859-1 $value2]; close $chan
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajouté dans la liste des salons interdits."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addchan $lea(console_deco):$lea(console_txt) $user" }
		}
		"delchan" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delchan 03:01 /msg $lea(pseudo) delchan #salon"; return 0 }
			catch {open "[lea:scriptdir]db/salon.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend chan "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des salons interdits."; return 0
			} else {
				if {[info exists chan]} { 
					set del [open "[lea:scriptdir]db/salon.db" w+]; foreach delchan $chan { puts $del "$delchan" }; close $del
				} else { set del [open "[lea:scriptdir]db/salon.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) MODE $value1"
				putdcc $lea(idx) ":$lea(pseudo) PART $value1"
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimé de la liste des salons interdits."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delchan $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"chanlist" {
			catch {open "[lea:scriptdir]db/salon.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00Salons Interdits 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste chan; if {$chan!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $chan" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Salon" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Chanlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"client" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Client 03:01 /msg $lea(pseudo) client on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(client)=="0"} {
						set lea(client) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Client IRC activée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Client $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection client IRC est déjà activée." }
				}
				"off" {
					if {$lea(client)=="1"} {
						set lea(client) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Protection Client IRC désactivée"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Client $lea(console_deco):$lea(console_txt) $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La protection client IRC est déjà désactivée." }
				}
			}
		}
		"addclient" {
			if {$value7==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addclient 03:01 /msg $lea(pseudo) addclient version"; return 0 }
			catch {open "[lea:scriptdir]db/client.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value7 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value7 est déjà dans la liste des clients IRC interdits."; set stop "1"; break } }
			catch {close $liste}; if {$stop=="1"} { return 0 }
			set bclient [open "[lea:scriptdir]db/client.db" a]; puts $bclient [encoding convertto iso8859-1 [string tolower $value7]]; close $bclient
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value7 a bien été ajouté à la liste des clients IRC interdits."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addclient $lea(console_deco):$lea(console_txt) $user" }
		}
		"delclient" {
			if {$value7==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delclient 03:01 /msg $lea(pseudo) delclient version"; return 0 }
			catch {open "[lea:scriptdir]db/client.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value7 $verif]} { set stop "1" }; if {[string compare -nocase $value7 $verif] && $verif!=""} { lappend vers "$verif" } }
			catch {close $liste}
			if {$stop=="0"} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value7 n'est pas dans la liste des clients IRC interdits."; return 0 
			} else {
				if [info exists vers] {
					set del [open "[lea:scriptdir]db/client.db" w+]; foreach delclient $vers { puts $del "$delclient" }; close $del
				} else { set del [open "[lea:scriptdir]db/client.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value7 a bien été supprimé de la liste des clients IRC interdits."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delclient $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"clientlist" {
			catch {open "[lea:scriptdir]db/client.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01--------- 00Clients IRC interdits 01---------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste version; if {$version!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $version" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Aucun client IRC" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Clientlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"addtrust" {
			if {($value2=="") || (![regexp {^[a-z0-9\-.*]+\.[a-z]{2,4}$} $value2] && ![regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $value2])} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addtrust 03:01 /msg $lea(pseudo) addtrust host/IP"; return 0 }
			catch {open "[lea:scriptdir]db/host.db" r} liste1
			while {![eof $liste1]} { gets $liste1 verif1; if {[string match *$value2* $verif1]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : Hostname Interdite"; set stop "1"; break } }
			catch {close $liste1}; if {$stop==1} { return 0 }
			catch {open "[lea:scriptdir]db/ip.db" r} liste2
			while {![eof $liste2]} { gets $liste2 verif2; if {[string match *$value2* $verif2]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Accès Refusé : IP Interdite"; set stop "1"; break } }
			catch {close $liste2}; if {$stop==1} { return 0 }
			catch {open [lea:scriptdir]db/trust.db r} liste
			while {![eof $liste]} { gets $liste verif; if {$verif==$value2} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 est déjà dans la liste des trusts."; set stop "1"; break } }
			catch {close $liste}; if {$stop=="1"} { return 0 }
			set bprotect [open [lea:scriptdir]db/trust.db a]; puts $bprotect "$value2"; close $bprotect
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été ajoutée dans la liste des trusts."
			if {![info exists trusts($value2)]} { set trusts($value2) "1" }
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addtrust $lea(console_deco):$lea(console_txt) $user" }
		}
		"deltrust" {
			if {($value2=="") || (![regexp {^[a-z0-9\-.*]+\.[a-z]{2,4}$} $value2] && ![regexp {^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $value2])} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deltrust 03:01 /msg $lea(pseudo) deltrust host/IP"; return 0 }
			catch {open [lea:scriptdir]db/trust.db r} liste
			while {![eof $liste]} { gets $liste verif; if {$verif==$value2} { set stop "1" }; if {$verif!=$value2 && $verif!=""} { lappend hs "$verif" } }
			catch {close $liste}
			if {$stop=="0"} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 n'est pas dans la liste des trusts."; return 0 
			} else {
				if {[info exists hs]} {
					set del [open [lea:scriptdir]db/trust.db w+]; foreach delprotect $hs { puts $del "$delprotect" }; close $del
				} else { set del [open [lea:scriptdir]db/trust.db w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01$value1 a bien été supprimée de la liste des trusts."
				if {[info exists trusts($value2)]} { unset trusts($value2) }
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deltrust $lea(console_deco):$lea(console_txt) $user" }
			}
		}
		"trustlist" {
			catch {open [lea:scriptdir]db/trust.db r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01------------ 00Hosts / IPs Trustées 01------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste mask; if {$mask!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $mask" } }
			catch {close $liste}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Trust" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Trustlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"news" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande News 03:01 /msg $lea(pseudo) news on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(news)=="0"} {
						set lea(news) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de news activé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)News $lea(console_deco):$lea(console_txt) Activé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de news est déjà activé." }
				}
				"off" {
					if {$lea(news)=="1"} {
						set lea(news) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de news désactivé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)News $lea(console_deco):$lea(console_txt) Désactivé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de news est déjà désactivé." }
				}
			}
		}
		"addnews" {
			if {$value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addnews 03:01 /msg $lea(pseudo) addnews message"; return 0 }
			set bmess [open [lea:scriptdir]db/news.db a]; puts $bmess "[unixtime] [encoding convertto iso8859-1 $value8]"; close $bmess
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news serveur a bien été ajoutée dans la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addnews $lea(console_deco):$lea(console_txt) $user" }
		}
		"delnews" {
			if {[regexp \[^0-9\] $value1] || $value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delnews 03:01 /msg $lea(pseudo) delnews numero"; return 0 }
			catch {open [lea:scriptdir]db/news.db r} lister
			while {![eof $lister]} { gets $lister verif; if {$verif!=""} { incr ids 1 } }
			catch {close $lister}
			if {$ids<$value1 || $value1=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news serveur n°$value1 n'existe pas dans la liste."; return 0 }
			catch {open [lea:scriptdir]db/news.db r} liste
			while {![eof $liste]} { gets $liste verif; if {$verif!=""} { incr stop 1; if {$stop!=$value1} { lappend new "$verif" } } }
			catch {close $liste}
			if [info exists new] {
				set del [open [lea:scriptdir]db/news.db w+]; foreach delnew $new { puts $del "$delnew" }; close $del
			} else { set del [open [lea:scriptdir]db/news.db w+]; close $del }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news serveur n°$value1 a bien été supprimée de la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delnews $lea(console_deco):$lea(console_txt) $user" }
		}
		"newslist" {
			catch {open [lea:scriptdir]db/news.db r} new
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01------------------------------- 00Liste des News Serveur 01-------------------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $new]} { 
				gets $new anew
				if {$anew!=""} { incr stop 1; set date [lindex $anew 0]; set mess [join [lrange $anew 1 end]]; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01 \[02 $stop 01\] 01 \[ 03News 01\] - \[ 04[lea:duree "$date 1"]01 \] - $mess" } 
			}
			catch {close $new}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucune news" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Newslist $lea(console_deco):$lea(console_txt) $user" }
		}
		"onews" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Onews 03:01 /msg $lea(pseudo) onews on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(onews)=="0"} {
						set lea(onews) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de onews activé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Onews $lea(console_deco):$lea(console_txt) Activé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de onews est déjà activé." }
				}
				"off" {
					if {$lea(onews)=="1"} {
						set lea(onews) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de onews désactivé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Onews $lea(console_deco):$lea(console_txt) Désactivé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de onews est déjà désactivé." }
				}
			}
		}
		"addonews" {
			if {$value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addonews 03:01 /msg $lea(pseudo) addonews message"; return 0 }
			set bmess [open [lea:scriptdir]db/onews.db a]; puts $bmess "[unixtime] [encoding convertto iso8859-1 $value8]"; close $bmess
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news olines a bien été ajoutée dans la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addonews $lea(console_deco):$lea(console_txt) $user" }
		}
		"delonews" {
			if {[regexp \[^0-9\] $value1] || $value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delonews 03:01 /msg $lea(pseudo) delonews numero"; return 0 }
			catch {open [lea:scriptdir]db/onews.db r} lister
			while {![eof $lister]} { gets $lister verif; if {$verif!=""} { incr ids 1 } }
			catch {close $lister}
			if {$ids<$value1 || $value1=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news olines n°$value1 n'existe pas dans la liste."; return 0 }
			catch {open [lea:scriptdir]db/onews.db r} liste
			while {![eof $liste]} { gets $liste verif; if {$verif!=""} { incr stop 1; if {$stop!=$value1} { lappend new "$verif" } } }
			catch {close $liste}
			if [info exists new] {
				set del [open [lea:scriptdir]db/onews.db w+]; foreach delnew $new { puts $del "$delnew" }; close $del
			} else { set del [open [lea:scriptdir]db/onews.db w+]; close $del }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news olines n°$value1 a bien été supprimée de la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delonews $lea(console_deco):$lea(console_txt) $user" }
		}
		"onewslist" {
			catch {open [lea:scriptdir]db/onews.db r} new
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01------------------------------- 00Liste des News Olines 01-------------------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $new]} { 
				gets $new anew
				if {$anew!=""} { incr stop 1; set date [lindex $anew 0]; set mess [join [lrange $anew 1 end]]; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01 \[02 $stop 01\] 01 \[ 03OperNews 01\] - \[ 04[lea:duree "$date 1"]01 \] - $mess" } 
			}
			catch {close $new}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucune Onews" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Onewslist $lea(console_deco):$lea(console_txt) $user" }
		}
		"cnews" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Cnews 03:01 /msg $lea(pseudo) cnews on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(cnews)=="0"} {
						set lea(cnews) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de cnews activé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Cnews $lea(console_deco):$lea(console_txt) Activé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de cnews est déjà activé." }
				}
				"off" {
					if {$lea(cnews)=="1"} {
						set lea(cnews) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Système de cnews désactivé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Cnews $lea(console_deco):$lea(console_txt) Désactivé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le système de cnews est déjà désactivé." }
				}
			}
		}
		"addcnews" {
			if {[string index $value2 0]!="#" || $value3==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addcnews 03:01 /msg $lea(pseudo) addcnews #salon message"; return 0 }
			set bmess [open [lea:scriptdir]db/cnews.db a]; puts $bmess "[unixtime] [encoding convertto iso8859-1 $value1] [encoding convertto iso8859-1 $value9]"; close $bmess
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news salons a bien été ajoutée dans la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addcnews $lea(console_deco):$lea(console_txt) $user" }
		}
		"delcnews" {
			if {[regexp \[^0-9\] $value1] || $value1==""} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Delcnews 03:01 /msg $lea(pseudo) delcnews numero"; return 0 }
			catch {open [lea:scriptdir]db/cnews.db r} lister
			while {![eof $lister]} { gets $lister verif; if {$verif!=""} { incr ids 1 } }
			catch {close $lister}
			if {$ids<$value1 || $value1=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news salons n°$value1 n'existe pas dans la liste."; return 0 }
			catch {open [lea:scriptdir]db/cnews.db r} liste
			while {![eof $liste]} { gets $liste verif; if {$verif!=""} { incr stop 1; if {$stop!=$value1} { lappend new "$verif" } } }
			catch {close $liste}
			if [info exists new] {
				set del [open [lea:scriptdir]db/cnews.db w+]; foreach delnew $new { puts $del "$delnew" }; close $del
			} else { set del [open [lea:scriptdir]db/cnews.db w+]; close $del }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01La news salons n°$value1 a bien été supprimée de la liste."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Delcnews $lea(console_deco):$lea(console_txt) $user" }
		}
		"cnewslist" {
			catch {open [lea:scriptdir]db/cnews.db r} new
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01,01------------------------------- 00Liste des News Salons 01-------------------------------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $new]} { 
				gets $new anew
				if {$anew!=""} { incr stop 1; set date [lindex $anew 0]; set salle [lindex $anew 1]; set mess [join [lrange $anew 2 end]]; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01 \[02 $stop 01\] 01 \[ 03ChanNews 01\] - \[ 04[lea:duree "$date 1"]01 \] - \[$salle\]  $mess" } 
			}
			catch {close $new}
			if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucune Cnews" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Cnewslist $lea(console_deco):$lea(console_txt) $user" }
		}
		"autojoin" {
			if {$value2!="on" && $value2!="off"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Autojoin 03:01 /msg $lea(pseudo) autojoin on/off"; return 0 }
			switch -exact $value2 {
				"on" {
					if {$lea(ajoin)=="0"} {
						set lea(ajoin) "1"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Autojoin utilisateurs activé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Autojoin $lea(console_deco):$lea(console_txt) Activé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01L'autojoin utilisateurs est déjà activé." }
				}
				"off" {
					if {$lea(ajoin)=="1"} {
						set lea(ajoin) "0"; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Autojoin utilisateurs désactivé"
						if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Autojoin $lea(console_deco):$lea(console_txt) Désactivé par $user" }
					} else { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01L'autojoin utilisateurs est déjà désactivé." }
				}
			}
		}
		"addjoin" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Addjoin 03:01 /msg $lea(pseudo) addjoin #salon"; return 0 }
			catch {open "[lea:scriptdir]db/autojoin.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le salon $value1 est déjà dans la liste des autojoins utilisateurs."; set stop "1"; break } }
			catch {close $liste}; if {$stop==1} { return 0 }
			set join [open "[lea:scriptdir]db/autojoin.db" a]; puts $join [encoding convertto iso8859-1 $value2]; close $join
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le salon $value1 a bien été ajouté dans la liste des autojoins utilisateurs."
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Addjoin $lea(console_deco):$lea(console_txt) $value1 par $user" }
		}
		"deljoin" {
			if {[string index $value2 0]!="#"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Commande Deljoin 03:01 /msg $lea(pseudo) deljoin #salon"; return 0 }
			catch {open "[lea:scriptdir]db/autojoin.db" r} liste
			while {![eof $liste]} { gets $liste verif; if {![string compare -nocase $value2 $verif]} { set stop 1 }; if {[string compare -nocase $value2 $verif] && $verif!=""} { lappend salle "$verif" } }
			catch {close $liste}
			if {$stop==0} { 
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le salon $value1 n'est pas dans la liste des autojoins utilisateurs."; return 0
			} else {
				if {[info exists salle]} { 
					set del [open "[lea:scriptdir]db/autojoin.db" w+]; foreach delchan $salle { puts $del "$delchan" }; close $del
				} else { set del [open "[lea:scriptdir]db/autojoin.db" w+]; close $del }
				putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :01Le salon $value1 a bien été supprimé de la liste des autojoins utilisateurs."
				if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Deljoin $lea(console_deco):$lea(console_txt) $value1 par $user" }
			}
		}
		"joinlist" {
			catch {open "[lea:scriptdir]db/autojoin.db" r} liste
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :1,1------ 0Autojoin utilisateurs 1------"
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			while {![eof $liste]} { gets $liste salon; if {$salon!=""} { incr stop 1; putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 \[03 $stop 01\] 01 $salon" } }
			catch {close $liste}; if {$stop=="0"} { putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser : 01 Aucun Salon" }
			putdcc $lea(idx) ":$lea(pseudo) NOTICE $vuser :"
			if {[lea:console 1]=="ok"} { putdcc $lea(idx) ":$lea(pseudo) PRIVMSG $lea(salon) : $lea(console_com)Joinlist $lea(console_deco):$lea(console_txt) $user" }
		}
		"crypt" {
			if {$value2!="on" &&