Explicitly lower-case irc.caller

This commit is contained in:
binaryatrocity committed 2015-09-06 19:41:14 -05:00
1 parent 705c733114
commit 1ca5a8a797
1 file changed
+3 -3
+3 -3
View File
@@ -275,7 +275,7 @@ IRC.prototype.moderators = function (data) {
if (data[1] === 'MODE') {
if (data[4] !== undefined) {
var user = data[4].charAt(0).toUpperCase() + data[4].slice(1);
var user = data[4].toLowerCase();
switch (data[3]) {
case '+o':
if (__self.mods.indexOf(user) < 0) {
@@ -317,7 +317,7 @@ IRC.prototype.raw = function (data, hide) {
IRC.prototype.caller = function (data) {
var caller = data.split('!');
return caller[0].charAt(1).toUpperCase() + caller[0].slice(2);
return caller[0].slice(1).toLowerCase();
};
// send message to twitch chat
@@ -329,7 +329,7 @@ IRC.prototype.msg = function (msg, options) {
__self.raw('PRIVMSG ' + __self.config.channel + ' :' + msg);
break;
case 1:
if (__self.mods.indexOf(opts.caller) >= 0) {
if (__self.mods.indexOf(opts.caller.toLowerCase()) >= 0) {
__self.raw('PRIVMSG ' + __self.config.channel + ' :' + msg);
}
break;