buttsbot should not ignore its own commands
This commit is contained in:
parent
f3fca52be4
commit
0fa257237e
4
bot.js
4
bot.js
|
|
@ -36,8 +36,6 @@ function isNumeric(n) {
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
function onMessageHandler (channel, userstate, message, self) {
|
function onMessageHandler (channel, userstate, message, self) {
|
||||||
if (self) { return; }
|
|
||||||
|
|
||||||
var trimmedMessage = message.trim();
|
var trimmedMessage = message.trim();
|
||||||
|
|
||||||
if (trimmedMessage.startsWith("!buttsbot")) {
|
if (trimmedMessage.startsWith("!buttsbot")) {
|
||||||
|
|
@ -116,6 +114,8 @@ function onMessageHandler (channel, userstate, message, self) {
|
||||||
console.log(`* buttsbot: User not authorized`);
|
console.log(`* buttsbot: User not authorized`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (self) return;
|
||||||
|
|
||||||
if (trimmedMessage.startsWith("!"))
|
if (trimmedMessage.startsWith("!"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user