about summary refs log tree commit diff stats
path: root/js/blotbotboot/node_modules/irc/example/bot.js
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-06-19 12:27:59 -0400
committerelioat <hi@eli.li>2023-06-19 12:27:59 -0400
commit1cbdbcff09387f1185e40fa48fd3801e54e5ba86 (patch)
treed8ab8872a81c0656c62334fb43f4bc07db8aa807 /js/blotbotboot/node_modules/irc/example/bot.js
parent00761c368216e401eb5b17a677ae51db643d818b (diff)
downloadtour-1cbdbcff09387f1185e40fa48fd3801e54e5ba86.tar.gz
Removed node_modules folder because I am an idiot
Diffstat (limited to 'js/blotbotboot/node_modules/irc/example/bot.js')
-rwxr-xr-xjs/blotbotboot/node_modules/irc/example/bot.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/js/blotbotboot/node_modules/irc/example/bot.js b/js/blotbotboot/node_modules/irc/example/bot.js
deleted file mode 100755
index d897ce8..0000000
--- a/js/blotbotboot/node_modules/irc/example/bot.js
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env node
-
-var irc = require('../');
-
-var bot = new irc.Client('irc.dollyfish.net.nz', 'nodebot', {
-    debug: true,
-    channels: ['#test', '#othertest']
-});
-
-bot.addListener('error', function(message) {
-    console.error('ERROR: %s: %s', message.command, message.args.join(' '));
-});
-
-bot.addListener('message#blah', function(from, message) {
-    console.log('<%s> %s', from, message);
-});
-
-bot.addListener('message', function(from, to, message) {
-    console.log('%s => %s: %s', from, to, message);
-
-    if (to.match(/^[#&]/)) {
-        // channel message
-        if (message.match(/hello/i)) {
-            bot.say(to, 'Hello there ' + from);
-        }
-        if (message.match(/dance/)) {
-            setTimeout(function() { bot.say(to, '\u0001ACTION dances: :D\\-<\u0001'); }, 1000);
-            setTimeout(function() { bot.say(to, '\u0001ACTION dances: :D|-<\u0001');  }, 2000);
-            setTimeout(function() { bot.say(to, '\u0001ACTION dances: :D/-<\u0001');  }, 3000);
-            setTimeout(function() { bot.say(to, '\u0001ACTION dances: :D|-<\u0001');  }, 4000);
-        }
-    }
-    else {
-        // private message
-        console.log('private message');
-    }
-});
-bot.addListener('pm', function(nick, message) {
-    console.log('Got private message from %s: %s', nick, message);
-});
-bot.addListener('join', function(channel, who) {
-    console.log('%s has joined %s', who, channel);
-});
-bot.addListener('part', function(channel, who, reason) {
-    console.log('%s has left %s: %s', who, channel, reason);
-});
-bot.addListener('kick', function(channel, who, by, reason) {
-    console.log('%s was kicked from %s by %s: %s', who, channel, by, reason);
-});