Skip to content

Instantly share code, notes, and snippets.

@flores
Created June 25, 2012 17:34
Show Gist options
  • Save flores/2990059 to your computer and use it in GitHub Desktop.
Save flores/2990059 to your computer and use it in GitHub Desktop.
opsangeles-bot @cwebberOps
#!/usr/bin/env node
var Client = require('irc').Client;
// configuration
// irc. server names, guys to auto-op, etc
var botname = "opsangeles-bot";
var server = "chat.freenode.com";
var channel = [ "#opsangeles" ];
var opusers = [
"lolcatstevens",
"alrs",
"cwebber",
"blovett",
"goodwill",
"llakey",
"jsnby",
"retr0h",
"up_the_irons",
"solarce",
"s0larce"
];
// set up the irc clients
var irc = new Client(
server,
botname,
{ channels: channel }
);
irc.on('join', function(to, nick) {
if ( opusers.indexOf( nick ) >= 0 ) {
irc.send('mode', to, '+o', nick);
}
});
/* placeholder for bot interaction
irc.on('message', function (nick, to, text) {
});
*/
irc.on('error', function(text) {
console.log(text);
});
@flores
Copy link
Author

flores commented Jun 25, 2012

@cwebberOps really just node-irc and no router or tweet/email notifications as with Snake-Eyes

@cwebberOps
Copy link

You should throw this into a repo anyway. Then we can all add to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment