blerp derp

This commit is contained in:
Jan-Stefan Janetzky 2016-12-01 11:47:41 +01:00
parent b755988011
commit 7904c8a4f7

View File

@ -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);