Permalink
Browse files

[fix] Fixes for JShint compliance in event listeners.

  • Loading branch information...
1 parent 82ac1e4 commit 43fc5d8eee4b67cca0319d2b92a99604e160a6f8 @AvianFlu AvianFlu committed Oct 28, 2011
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/listeners/beer.js
  2. +1 −1 lib/listeners/twitter.js
View
10 lib/listeners/beer.js
@@ -1,4 +1,4 @@
-/*
+/*
*
* listeners/beer.js - Event listener for IRC events, providing you with cold
* beer
@@ -14,21 +14,21 @@ var beer = module.exports = function () {
self.preferences = self.config.get('karma:preferences') || {};
self.on('*::gotMessage', function (data) {
- var re = /^[\+-]?(\w+)([:, ]){0,3}(\+\+|--)/,
+ var re = /^[\+\-]?(\w+)([:, ]){0,3}(\+\+|--)/,
res;
if (res = re.exec(data.text)) {
- if (res[1] == data.nick) {
+ if (res[1] === data.nick) {
return self.emit('sendMsg', {
dest: data.to,
msg: "You can't give karma to yourself!"
});
}
self.karma[res[1]] || (self.karma[res[1]] = 0);
- if (res[3] == '++') {
+ if (res[3] === '++') {
++self.karma[res[1]];
}
- else if (res[3] == '--') {
+ else if (res[3] === '--') {
--self.karma[res[1]];
}
View
2 lib/listeners/twitter.js
@@ -20,4 +20,4 @@ var twitter = module.exports = function () {
self.on('*::blocked', function (data) {
self.emit('sendMsg', {dest: data.to, msg: 'I have blocked ' + data.name + '.'});
});
-}
+};

0 comments on commit 43fc5d8

Please sign in to comment.