diff --git a/chatCommands.js b/chatCommands.js index 78edfdf..380a806 100644 --- a/chatCommands.js +++ b/chatCommands.js @@ -32,7 +32,7 @@ setInterval(x=>{ }, 10000); let sbhead = "\"use strict\";const mett=9000,belst=Math.random()*mett|0;"; - sbhead += Object.getOwnPropertyNames(Math).map(function(v){return "const " + v + "=Math." + v + ";" + (typeof Math[v] == "function" ? v + ".bind(Math);" : "")}).join(""); + sbhead += Object.getOwnPropertyNames(Math).map(function(v){return "const " + v + "=Math." + v + ";"}).join(""); let handleChatCommands = function (irc, db) { this.irc = irc; @@ -54,6 +54,17 @@ p.run = function (o) { level = typeof level != "undefined" ? level.split("").map(x=>userLevels.indexOf(x)).sort().pop() : -1; if (level === null) level = -1; switch(o.cmd) { + case ".level": + client.say(o.to, o.from + " dein level: " + userLevelNames[level]); + return true; + case ".reboot": + if (level < getLevel("admin") || o.args != "yourself") { + client.say(o.to, o.from + " go kill yourself"); + break; + } + client.say(o.to, "kthx bai"); + setTimeout(process.exit, 100); + return true; case ".reg": if (level < getLevel("admin")) { client.say(o.to, o.from + ": dein level: " + userLevelNames[level] + ", benötigtes level: admin"); @@ -181,6 +192,11 @@ p.run = function (o) { googleSearch(client, o); return true; + case ".die": + o.args += " site:die.net"; + googleSearch(client, o); + return true; + //case "google": case ".google": googleSearch(client, o);