git.schokokeks.org
Repositories
Help
Report an Issue
wirc-backend.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
c972b0c
Branches
Tags
master
wirc-backend.git
lib
node
node_modules
irc
test.js
[ini]
Christian Fraß
commited
c972b0c
at 2021-11-18 23:53:54
test.js
Blame
History
Raw
#!/usr/bin/env node var irc = require('./lib/irc.js'); var util = require('util'); var color = require('ansi-color').set; var c = new irc.Client( 'irc.dollyfish.net.nz', 'nodebot', { channels: ['#test'], //debug: true } ); c.addListener('raw', function(message) { console.log('raw: ', message) }); c.addListener('error', function(message) { console.log(color('error: ', 'red'), message) }); var repl = require('repl').start('> '); repl.context.repl = repl; repl.context.util = util; repl.context.irc = irc; repl.context.c = c; repl.inputStream.addListener('close', function() { console.log("\nClosing session"); c.disconnect('Closing session'); });