Skip to content

Instantly share code, notes, and snippets.

@jonathansadowski
Created November 28, 2012 17:41
Show Gist options
  • Save jonathansadowski/4162783 to your computer and use it in GitHub Desktop.
Save jonathansadowski/4162783 to your computer and use it in GitHub Desktop.
var channels=["#shoutletdev"]
, irc = require('irc')
, client = new irc.Client('chat.freenode.net','WalkrKarmaRanger',{
userName: 'WalkrKarmaRanger',
realName: 'WalkrKarmaRanger',
floodProtection: true,
floodProtectionDelay: 250,
channels: channels
});
client.addListener('message', function(from, to, message) {
if(from=="theTexan"){
client.say(to,"theTexan--");
}
var re = new RegExp("theTexan++","i");
var match = re.exec(message);
if(match){
client.say(to,"theTexan--\ntheTexan--\ntheTexan--");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment