trollbox-headers

0.0.4 • Public • Published

trollbox-headers

A Simple Package With Headers to Connect In Windows93 Trollbox Server

  • Install the Package
  • Use it with socket.io
  • And you done!

Installation

$ npm install trollbox-headers

Example

var io = require('socket.io-client')
var tbheaders = require('trollbox-headers').headers()
const socket = io('http://www.windows93.net:8081', tbheaders)
socket.on('_connected', function(data){ // and once we're connected...
    socket.emit('user joined', 'examplebot', "#00ff00","","","") // ...our bot can join!
})
socket.on('message', function(data) {
    if (data.msg == "ping") {socket.send('Pong!')}
})

Package Sidebar

Install

npm i trollbox-headers

Weekly Downloads

2

Version

0.0.4

License

ISC

Unpacked Size

2.67 kB

Total Files

3

Last publish

Collaborators

  • kagamox