|
|
@@ -487,11 +487,15 @@ QuizzBot.prototype.onMessageInternal = function(username, user, msg) {
|
|
|
}
|
|
|
else if (lmsg.startsWith("!report list")) {
|
|
|
if (user.admin) {
|
|
|
- var questions = Cache.getReportedQuestions();
|
|
|
- for (var i in questions)
|
|
|
- for (var j in questions[i])
|
|
|
- questions[i][j] = (new Date(questions[i][j])).toLocaleString();
|
|
|
- this.bot.sendNotice(username, JSON.stringify(questions));
|
|
|
+ var questions = Cache.getReportedQuestions(),
|
|
|
+ questionObj = {};
|
|
|
+
|
|
|
+ for (var questionId in questions) {
|
|
|
+ questionObj[questionId] = {};
|
|
|
+ for (var username in questions[questionId])
|
|
|
+ questionObj[questionId][username] = new Date(questions[questionId][username]).toLocaleString();
|
|
|
+ }
|
|
|
+ this.bot.sendNotice(username, JSON.stringify(questionObj));
|
|
|
}
|
|
|
else
|
|
|
this.bot.sendMsg(this.room, "Must be channel operator");
|