{"action":"created","issue":{"url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/50","labels_url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/50/comments","events_url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/50/events","html_url":"https://github.com/Schmoopiie/twitch-irc/issues/50","id":59321278,"number":50,"title":"Hash not stripped in this.moderators object","user":{"login":"designgears","id":799451,"avatar_url":"https://avatars.githubusercontent.com/u/799451?v=3","gravatar_id":"","url":"https://api.github.com/users/designgears","html_url":"https://github.com/designgears","followers_url":"https://api.github.com/users/designgears/followers","following_url":"https://api.github.com/users/designgears/following{/other_user}","gists_url":"https://api.github.com/users/designgears/gists{/gist_id}","starred_url":"https://api.github.com/users/designgears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/designgears/subscriptions","organizations_url":"https://api.github.com/users/designgears/orgs","repos_url":"https://api.github.com/users/designgears/repos","events_url":"https://api.github.com/users/designgears/events{/privacy}","received_events_url":"https://api.github.com/users/designgears/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-28T02:40:26Z","updated_at":"2015-02-28T05:02:56Z","closed_at":null,"body":"Error\r\n```\r\n[19:24:15] error - typeerror: cannot read property 'indexof' of undefined at client.ismod (c:\\bot\\node_modules\\twitch-irc\\libraries\\client.js:631:48)\r\n    at client.<anonymous> (c:\\bot\\bot.js:29:14)\r\n    at client.emit (events.js:118:17)\r\n    at c:\\bot\\node_modules\\twitch-irc\\libraries\\client.js:484:30\r\n    at object.createchanneluserdata (c:\\bot\\node_modules\\twitch-irc\\libraries\\data.js:48:2)\r\n    at client._handlemessage (c:\\bot\\node_modules\\twitch-irc\\libraries\\client.js:472:22)\r\n    at stream.emit (events.js:107:17)\r\n    at drain (c:\\bot\\node_modules\\twitch-irc\\node_modules\\through\\index.js:36:16)\r\n    at stream.stream.queue.stream.push (c:\\bot\\node_modules\\twitch-irc\\node_modules\\through\\index.js:45:5)\r\n    at linestream.<anonymous> (c:\\bot\\node_modules\\twitch-irc\\libraries\\modules\\messages.js:42:16)\r\n```\r\n```\r\n/* Check if username is moderator on channel */\r\nclient.prototype.isMod = function isMod(channel, username) {\r\n    if (this.moderators[utils.remHash(channel)].indexOf(username.toLowerCase()) >= 0) {\r\n        return true;\r\n    }\r\n    return false;\r\n};\r\n```\r\n\r\nConsole log:\r\n```\r\n{ '#designgears': [] }\r\n```"},"comment":{"url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/comments/76510940","html_url":"https://github.com/Schmoopiie/twitch-irc/issues/50#issuecomment-76510940","issue_url":"https://api.github.com/repos/Schmoopiie/twitch-irc/issues/50","id":76510940,"user":{"login":"enilsen16","id":5035876,"avatar_url":"https://avatars.githubusercontent.com/u/5035876?v=3","gravatar_id":"","url":"https://api.github.com/users/enilsen16","html_url":"https://github.com/enilsen16","followers_url":"https://api.github.com/users/enilsen16/followers","following_url":"https://api.github.com/users/enilsen16/following{/other_user}","gists_url":"https://api.github.com/users/enilsen16/gists{/gist_id}","starred_url":"https://api.github.com/users/enilsen16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enilsen16/subscriptions","organizations_url":"https://api.github.com/users/enilsen16/orgs","repos_url":"https://api.github.com/users/enilsen16/repos","events_url":"https://api.github.com/users/enilsen16/events{/privacy}","received_events_url":"https://api.github.com/users/enilsen16/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T05:02:56Z","updated_at":"2015-02-28T05:02:56Z","body":"However as @Schmoopiie says said before I recommend using something like this @designgears -\r\n\r\n```javascript\r\nclient.addListener('chat', function (channel, user, message) {\r\n    if (user.special.indexOf('mod') >= 0) {\r\n        // User is a mod..\r\n    }\r\n});\r\n```"}}