Bonjour,
Erreur
[23:14] <Supa> .xhost
[23:14] <XisK> [23:16:34] Tcl error [dcchost]: mysqlconnect/db server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)[/code]
Partie Configuration:
Dans la partie package&procedure SQL du TCL
Dans la partie BIND DCC:
Table SQL:
Erreur
[23:14] <Supa> .xhost
[23:14] <XisK> [23:16:34] Tcl error [dcchost]: mysqlconnect/db server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)[/code]
Partie Configuration:
tcl
#######################
# CONFIGURATION mySQL #
#######################
set sql(login) "root"
set sql(pass) "******"
set sql(db) "xisk"
set sql(host) "localhost"
set sql(sock) "/tmp/mysql.sock"
Dans la partie package&procedure SQL du TCL
tcl
###########
# Package #
###########
catch {package require mysqltcl}
#####################
# mySQL Code #
# -> www.eggdrop.fr #
#####################
#-> Connexion
proc service:connect {} {
set ::mysqlink [mysqlconnect -host $::sql(host) -user $::sql(login) -password $::sql(pass) -sock $::sql(sock)]
mysqluse $::mysqlink $::sql(db)
}
#-> Deconnexion
proc service:deconnect {} {
mysqlclose $::mysqlink; unset -nocomplain ::mysqlink
}
Dans la partie BIND DCC:
tcl
###############
# SQL requete #
###############
# Il vous faudra taper .xhost en dcc chat pour que cette commande fonctionne
bind dcc - xhost dcc:xhost
proc dcc:xhost {hand idx arg} {
service:connect
mysqlsel $::mysqlink "SELECT * FROM `host` ORDER BY brut"
if {[mysqlresult $::mysqlink rows] ne 0} {
while {[set row [mysqlnext $::mysqlink]] != ""} {
putlog "*@IP : [lindex $row 0] -> [lindex $row 1]"
}
}
service:deconnect
}
Table SQL:
Code :
===Base de données xisk
== Structure de la table host
|------
|Colonne|Type|Null|Défaut
|------
|brut|text|Non|
|encrypt|text|Non|
== Contenu de la table host
|localhost|2884567834.tv
== Structure de la table host
|------
|Colonne|Type|Null|Défaut
|------
|brut|text|Non|
|encrypt|text|Non|