0.0.23 • Published 8 years ago

ircng v0.0.23

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

ircng

ircng is a javascript library for parsing IRC messages

There are zillions of IRC libraries for javascript, but none that do quite what I wanted, so I wrote one (isn't that what all good developers do?).

You are resposible for making the connection to the IRC server and feeding the parser data. Later it wlil do connections for you but I don't need this functionality at this time.

Very much still a Work In Progess.

Usage:

var stream = new IRCStream();

stream.register({
    nickname: 'cryogen',
    username: 'user',
    realname: 'Real Name'
});

stream.on('message', function(message) {
    // Do stuff with irc messages
    // message.source - who sent the message
    // message.args
});

stream.on('privmsg', function(message) {
    // message.source.nick, message.source.user, message.source.host
    // message.message
    // handle private messages
});

stream.on('numeric', function(message) {
    // handle numerics (they also raise individual messages eg on('001')
    // message.args
});

stream.on('quit', function(message) {
    // message.message - quit message
});

stream.on('nick', function(message) {
    // message.newnick
    // someone changed nickname
})

stream.joinChannel('test'); // join #test
stream.leaveChannel('test'); // leave/part #test
stream.sendMessage('#test', 'testing'); // send a privmsg to channel or nickname
stream.quit(message); // sends a QUIT command

stream.push('SOME IRC DATA');
0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago