Merge branch 'f0ckdev' into 'master'

Revert "Revert "Revert "sysmsgs as notice test"""

This reverts commit e658e13d6a

See merge request !63
This commit is contained in:
Flummi 2017-01-23 14:08:45 +00:00
commit 8c15e16ee2

View File

@ -17,7 +17,7 @@ module.exports = (lib) => {
case "reset":
lib.cfg.trigger[e.network+e.channel] = lib.genStdTrigger();
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
e.replyNotice("trigger resetted");
e.reply("trigger resetted");
});
break;
default:
@ -26,21 +26,21 @@ module.exports = (lib) => {
if(triggerexists(trigger)) {
lib.cfg.trigger[e.network+e.channel][trigger] = !lib.cfg.trigger[e.network+e.channel][trigger];
lib.config.write('trigger', e.network+e.channel, lib.cfg.trigger[e.network+e.channel], 'json', cbwc => {
e.replyNotice(!cbwc?"trigger "+ trigger +" in channel "+e.channel.getName() + lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][trigger]?'green':'red')+" "+(lib.cfg.trigger[e.network+e.channel][trigger]?'activated':'deactivated'):cbwc);
e.reply(!cbwc?"trigger "+ trigger +" in channel "+e.channel.getName() + lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][trigger]?'green':'red')+" "+(lib.cfg.trigger[e.network+e.channel][trigger]?'activated':'deactivated'):cbwc);
});
}
else
e.replyNotice("trigger "+trigger+" not found D:");
e.reply("trigger "+trigger+" not found D:");
}
break;
}
}
else {
var output = "";
e.replyNotice("Trigger in "+e.channel.getName()+" (green: activated, red: deactivated):");
e.reply("Trigger in "+e.channel.getName()+" (green: activated, red: deactivated):");
for(var key in lib.cfg.trigger[e.network+e.channel])
output += lib.bot.format.get(lib.cfg.trigger[e.network+e.channel][key]?'green':'red')+" "+key;
e.replyNotice(output);
e.reply(output);
}
},
desc: 'muh'