bleep bloop

This commit is contained in:
Jan-Stefan Janetzky 2016-12-04 22:08:37 +01:00
parent 7904c8a4f7
commit 1249831508

View File

@ -51,8 +51,8 @@ p.run = function (o) {
let db = this.db; let db = this.db;
//let level = client.chans[o.to] ? client.chans[o.to].users[o.from] : undefined; //let level = client.chans[o.to] ? client.chans[o.to].users[o.from] : undefined;
let level = client.chans["#w0bm"] ? client.chans["#w0bm"].users[o.from] : undefined; let level = client.chans["#w0bm"] ? client.chans["#w0bm"].users[o.from] : undefined;
level = typeof level != "undefined" ? level.split("").map(x=>userLevels.indexOf(x)).sort().pop() : -1; level = level !== undefined ? level.split("").map(x=>userLevels.indexOf(x)).sort().pop() : -1;
if (level === null) level = -1; if (level === null || level === undefined) level = -1;
switch(o.cmd) { switch(o.cmd) {
case ".level": case ".level":
client.say(o.to, o.from + " dein level: " + userLevelNames[level]); client.say(o.to, o.from + " dein level: " + userLevelNames[level]);