From 8c67d1a07eead9994a06e94c6bd0b010204a66c9 Mon Sep 17 00:00:00 2001 From: Tristan Dunn Date: Thu, 9 Jun 2011 21:33:26 -0700 Subject: [PATCH] Missed some quotes. --- examples/growl.js | 24 ++++++++++++------------ examples/ping.js | 16 ++++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/growl.js b/examples/growl.js index bb4cfac..05d856c 100644 --- a/examples/growl.js +++ b/examples/growl.js @@ -1,36 +1,36 @@ -var system = require('sys'); -var Campfire = require('../lib/campfire').Campfire; +var system = require("sys"); +var Campfire = require("../lib/campfire").Campfire; var instance = new Campfire({ ssl : false, - token : 'YOUR_TOKEN', - account : 'YOUR_ACCOUNT' + token : "YOUR_TOKEN", + account : "YOUR_ACCOUNT" }); instance.join(ROOM_ID, function(error, room) { room.listen(function(message) { // Ignore emotes, sounds, timestamps, etc. - if (message.type != 'TextMessage') { + if (message.type != "TextMessage") { return; } // Ignore your own messages. - // if (message.user.name == 'YOUR_NAME') { + // if (message.user.name == "YOUR_NAME") { // return; // } // Only notify on keywords. - // var keywords = ['YOUR_NAME', 'URGENT', 'Whatever']; + // var keywords = ["YOUR_NAME", "URGENT", "Whatever"]; // - // if (!message.body.match(new RegExp(keywords.join('|')))) { + // if (!message.body.match(new RegExp(keywords.join("|")))) { // return; // } var - command = '/usr/local/bin/growlnotify'; - command += ' -t "' + message.user.name + '"'; - command += ' -m "' + message.body.replace('"', "'") + '"'; - command += ' --image "examples/images/icon.png"'; + command = "/usr/local/bin/growlnotify"; + command += " -t '" + message.user.name + "'"; + command += " -m '" + message.body.replace("'", "'") + "'"; + command += " --image 'examples/images/icon.png'"; system.exec(command); }); diff --git a/examples/ping.js b/examples/ping.js index 8b8c435..3d2f4e2 100644 --- a/examples/ping.js +++ b/examples/ping.js @@ -1,21 +1,21 @@ -var Campfire = require('../lib/campfire').Campfire; +var Campfire = require("../lib/campfire").Campfire; var instance = new Campfire({ ssl : false, - token : 'YOUR_TOKEN', - account : 'YOUR_ACCOUNT' + token : "YOUR_TOKEN", + account : "YOUR_ACCOUNT" }); instance.join(ROOM_ID, function(error, room) { room.listen(function(message) { - if (message.body == 'PING') { - console.log('PING received.'); + if (message.body == "PING") { + console.log("PING received."); - room.speak('PONG', function(error, response) { - console.log('PONG sent at ' + response.message.created_at + '.'); + room.speak("PONG", function(error, response) { + console.log("PONG sent at " + response.message.created_at + "."); }); } else { - console.log('Received unknown message:'); + console.log("Received unknown message:"); console.log(message); } });