bugfix
This commit is contained in:
parent
787c6be5e2
commit
dbb14b3a5c
@ -1,13 +1,33 @@
|
||||
module.exports = (bot, trigger, lib) => {
|
||||
trigger.add({
|
||||
name: 'level',
|
||||
call: /^\!level$/i,
|
||||
call: /^\!level( \@.*)?/i,
|
||||
level: 0,
|
||||
active: 1,
|
||||
func: (e) => {
|
||||
lib.getUserlevel(e, (cb) => {
|
||||
e.reply("level from "+e.user.getNick()+": "+cb.level+" (Channel: "+cb.channel+" DB: "+cb.db+")");
|
||||
});
|
||||
var tmp = e.message.match(/^\!level( +@(.*))?/i);
|
||||
if(tmp[2] !== undefined) {
|
||||
// e nachbauen xD
|
||||
var etmp = {
|
||||
network: e.network,
|
||||
user: {
|
||||
getNick: () => {
|
||||
return tmp[2].trim();
|
||||
}
|
||||
},
|
||||
channel: {
|
||||
names: e.channel.names
|
||||
}
|
||||
};
|
||||
lib.getUserlevel(etmp, (cb) => {
|
||||
e.reply("level from "+etmp.user.getNick()+": "+cb.level+" (Channel: "+cb.channel+" DB: "+cb.db+")");
|
||||
});
|
||||
}
|
||||
else {
|
||||
lib.getUserlevel(e, (cb) => {
|
||||
e.reply("level from "+e.user.getNick()+": "+cb.level+" (Channel: "+cb.channel+" DB: "+cb.db+")");
|
||||
});
|
||||
}
|
||||
},
|
||||
desc: 'get Userlevel'
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ module.exports = (bot, trigger, lib) => {
|
||||
active: 1,
|
||||
func: (e) => {
|
||||
var tmp = e.message.match(/^\!user( +@(.*))?/i);
|
||||
if(tmp[2].length) {
|
||||
if(tmp[2] !== undefined) {
|
||||
// e nachbauen xD
|
||||
var etmp = {
|
||||
network: e.network,
|
||||
|
Loading…
Reference in New Issue
Block a user