From 8630395dfbd3d3fa2c6e9e32bf3853f1f3e0e71b Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 15 Mar 2017 11:39:54 +0100 Subject: [PATCH] fix level < 0 --- src/trigger/level.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/trigger/level.js b/src/trigger/level.js index e73a273..c516d2a 100644 --- a/src/trigger/level.js +++ b/src/trigger/level.js @@ -11,6 +11,7 @@ module.exports = (lib) => { if(userlevel >= 100) { var name = args[1].replace('@',''); var level = (args[2]>=100)?100:args[2]; + level = (level<0)?0:level; if(name.toLowerCase() != lib.bot.me.nick.toLowerCase()) { if( name in e.channel.names ) {