[Résolu] moderation SQL
#1
Bonjour,

Je viens demander un renseignement sur un soucis de code en SQL.
Voilà lorsque je tape .moderation sur un salon, il m'affiche les tables sur le salon "mais pas dans le bon ordre".

Exemple en premier sur ma base SQL j'ai : .+badword Permet d'ajouter un mot interdit

Et je ses pas comment faire pour sa mette dans l'ordre

Voici le code TCL

TCL
##########################
# moderation.tcl en SQL. #
#                        #
# By alias_angelius.     #
##########################

# Information relative à Mysql.
set modera(sql:login) "moderator"
set modera(sql:pass) "multipass"
set modera(sql:db) "moderator"
set modera(sql:host) "127.0.0.1"
set modera(sql:sock) "/tmp/mysql.sock"
 
catch {package require mysqltcl}

# Proc - Connexion mySQL #
proc service:connect {} {
set ::mysqlink [mysqlconnect -host $::modera(sql:host) -user $::modera(sql:login) -password $::modera(sql:pass) -sock $::modera(sql:sock)]
mysqluse $::mysqlink $::modera(sql:db)
}
# Proc - Deconnexion mySQL #
proc service:deconnect {} {
mysqlclose $::mysqlink; unset -nocomplain ::mysqlink
}
 
bind pub o|o .moderation modo
proc modo { nick host hand chan arg } {
service:connect
mysqlsel $::mysqlink "SELECT * FROM `help` ORDER BY cmd"
if {[mysqlresult $::mysqlink rows] ne 0} {
while {[set row [mysqlnext $::mysqlink]] != ""} {
set colone(cmd) [lindex $row 0]
set colone(msg) [lindex $row 1]
putserv "privmsg $chan :\00314Liste des Commandes \002\0034Moderation\002\0034"
puthelp "privmsg $chan :\00314$colone(cmd) \0031: \0034$colone(msg)\0034"
}
puthelp "privmsg $chan :\00314Fin de la Liste des Commandes \002\0034Moderation\002\0034"
}
service:deconnect
}



Si quelqu'un aurais une idée/piste sa serait sympa !

Merci d'avance
Vous interdisez les erreurs, vous empêchez ainsi la victoire.

Ma super kikoo-page loll
Répondre Avertir


Messages dans ce sujet
moderation SQL - par aliasangelius - 07/03/2017, 12:51
RE: moderation SQL - par CrazyCat - 07/03/2017, 13:59
RE: moderation SQL - par aliasangelius - 07/03/2017, 14:08
RE: moderation SQL - par aliasangelius - 07/03/2017, 17:57
RE: moderation SQL - par CrazyCat - 08/03/2017, 00:53
RE: moderation SQL - par aliasangelius - 08/03/2017, 14:42
RE: moderation SQL - par CrazyCat - 08/03/2017, 16:47
RE: moderation SQL - par aliasangelius - 08/03/2017, 17:42
RE: moderation SQL - par CrazyCat - 08/03/2017, 18:37
RE: moderation SQL - par aliasangelius - 08/03/2017, 19:24
RE: moderation SQL - par CrazyCat - 09/03/2017, 01:06
RE: moderation SQL - par aliasangelius - 09/03/2017, 01:27
RE: moderation SQL - par CrazyCat - 09/03/2017, 13:00
RE: moderation SQL - par aliasangelius - 09/03/2017, 15:45
RE: moderation SQL - par CrazyCat - 10/03/2017, 00:48
RE: moderation SQL - par aliasangelius - 10/03/2017, 14:43

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté