}
\r
/**\r
- * FIXME : Cette méthode est attrocement lourde ! A optimiser.\r
+ * FIXME : Cette méthode est attrocement lourde ! A optimiser.
+ * moyenne su échantillon : 234ms\r
*/
Formateur.prototype.traiterSmiles = function(M)
{
this.nickFormat = "nick"
this.pagePrincipale = 1
+ this.ekMaster = false
// les conversations, une conversation est un objet possédant les attributs suivants :
// - racine (entier)
\r
Client.prototype.deconnexion = function()\r
{
- this.flush()\r
+ this.flush()
+ this.delCookie()\r
this.setStatut(statutType.deconnected) // deconnexion\r
this.resetDonneesPersonnelles()\r
- this.delCookie ()\r
}
Client.prototype.chargerDonnees = function(data)
// les conversations
thisClient.conversations = data["conversations"]
+ thisClient.ekMaster = data["ek_master"]
}
this.dernierMessageErreur = data["error_message"]
}
}
}
+Client.prototype.ban = function(userId, minutes)
+{
+ var thisClient = this
+
+ // par défaut un ban correspond à 3 jours
+ if (typeof(minutes) == "undefined")
+ minutes = 60 * 24 * 3
+
+ jQuery.ajax({
+ type: "POST",
+ url: "request",
+ dataType: "json",
+ data: this.util.jsonVersAction(
+ {
+ "action" : "ban",
+ "cookie" : thisClient.cookie,
+ "duration" : minutes,
+ "user_id" : userId
+ }),
+ success:
+ function(data)
+ {
+ if (data["reply"] == "error")
+ thisClient.util.messageDialogue(data["error_message"])
+ }
+ })
+}
+
+Client.prototype.kick = function(userId)
+{
+ this.ban(userId, 15)
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////
function initialiserListeStyles(client)
}
)
}
-
-jQuery.noConflict()
// charge dynamiquement le script de debug
;;; jQuery.ajax({async : false, url : "js/debug.js", dataType : "script"})