Browse Source

Refs #7 confirmation on successful !rename

isundil 6 years ago
parent
commit
d422abf640
1 changed files with 4 additions and 2 deletions
  1. 4 2
      quizz.js

+ 4 - 2
quizz.js

@@ -463,7 +463,7 @@ QuizzBot.prototype.onMessageInternal = function(username, user, msg) {
         else
             this.bot.sendMsg(this.room, "Must be channel operator");
     }
-    else if (lmsg.startsWith("!rename")) {
+    else if (lmsg.startsWith("!rename ")) {
         if (!user.admin) {
             this.bot.sendMsg(this.room, "Must be channel operator");
             return;
@@ -492,7 +492,9 @@ QuizzBot.prototype.onMessageInternal = function(username, user, msg) {
         }
         if (!userToMod) {
             userToMod = this.users[target] = this.bot.createUser(target);
-            this.bot.sendMsg(this.room, "Created user " +target);
+            this.bot.sendMsg(this.room, "Created user " +target +" with " +sum +" points");
+        } else if (sum) {
+            this.bot.sendMsg(this.room, "Added " +sum +" points to " +target);
         }
         userToMod.score += sum;
         Cache.SetScores(this.users);