allow help and terms commands without being identified

This commit is contained in:
unek
2014-02-23 17:17:29 +01:00
parent aad1053b90
commit e3330ececc
2 changed files with 14 additions and 14 deletions
+11 -12
View File
@@ -153,6 +153,17 @@ client.addListener('message', function(from, channel, message) {
// if pms, make sure to respond to pms instead to itself
if(channel == client.nick) channel = from;
// comands that don't require identifying
if(command == 'help' || command == 'help')
{
for(var i = 0; i < settings.messages[command].length; i++) {
var message = settings.messages[command][i];
client.say(channel, message.expand({}));
}
return;
}
// if not that, message will be undefined for some reason
// todo: find a fix for that
var msg = message;
@@ -320,18 +331,6 @@ client.addListener('message', function(from, channel, message) {
}
});
break;
case 'help':
for(var i = 0; i < settings.messages.help.length; i++) {
var message = settings.messages.help[i];
client.say(channel, message.expand({}));
}
break;
case 'terms':
for(var i = 0; i < settings.messages.terms.length; i++) {
var message = settings.messages.terms[i];
client.say(channel, message.expand({}));
}
break;
}
});
});