Skip to content

Commit

Permalink
client: code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoopiie committed Jul 7, 2015
1 parent 12f33a1 commit 829d150
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ client.prototype.handleMessage = function handleMessage(message) {

// The moderators of this room are [...]
case "room_mods":
var splitted = message.params[1].split(':');
var mods = splitted[1].replace(/,/g, '').split(':').toString().toLowerCase().split(' ');
var splitted = message.params[1].split(":");
var mods = splitted[1].replace(/,/g, "").split(":").toString().toLowerCase().split(" ");

for(var i = mods.length - 1; i >= 0; i--) {
if(mods[i] === '') {
if(mods[i] === "") {
mods.splice(i, 1);
}
}

self.eventMods = mods;

self.emit('mods', message.params[0], mods);
self.emit("mods", message.params[0], mods);
break;

// There are no moderators for this room.
Expand Down Expand Up @@ -433,22 +433,22 @@ client.prototype.handleMessage = function handleMessage(message) {
}
// New subscriber..
else if (contains(message.params[1], "just subscribed")) {
self.emit('subscription', message.params[0], message.params[1].split(' ')[0]);
self.emit("subscription", message.params[0], message.params[1].split(" ")[0]);
}
// Subanniversary..
else if (contains(message.params[1], "subscribed") && contains(message.params[1], "in a row")) {
var splitted = message.params[1].split(' ');
var splitted = message.params[1].split(" ");
var length = splitted[splitted.length - 5];

self.emit('subanniversary', message.params[0], splitted[0], length);
self.emit("subanniversary", message.params[0], splitted[0], length);
}
}

// Message from JTV..
else if (message.tags.username === "jtv") {
// Someone is hosting my channel..
if (contains(message.params[1], "is now hosting you")) {
self.emit('hosted', message.params[0], utils.normalizeUsername(message.params[1].split(' ')[0]));
self.emit("hosted", message.params[0], utils.normalizeUsername(message.params[1].split(" ")[0]));
}
}
break;
Expand Down Expand Up @@ -709,13 +709,13 @@ client.prototype.utils = {

var split = false;
try {
split = !('0')[0];
split = !("0")[0];
} catch (e) {
split = true;
}
if (split) {
s1 = s1.split('');
s2 = s2.split('');
s1 = s1.split("");
s2 = s2.split("");
}

var p1 = new Array(l2 + 1);
Expand Down

0 comments on commit 829d150

Please sign in to comment.