osslate / irc-message Goto Github PK
View Code? Open in Web Editor NEWPerformant, streaming IRC message parser
License: BSD 2-Clause "Simplified" License
Performant, streaming IRC message parser
License: BSD 2-Clause "Simplified" License
Don't seem to be getting join and part messages.
Allow the option to be set somewhere to just return false or null instead of throwing errors.
> ircMessage.parseMessage(":nick@kcin!user!resu@host!tsoh@host PRIVMSG #channel :message").parseHostmaskFromPrefix()
{ nickname: 'nick', username: 'kcin', hostname: 'user' }
It should be:
{ nickname: 'nick@kcin', username: 'user!resu', hostname: 'host!tsoh@host' }
Chances are, if the user is checking if a user sent the message, they'll want to parse it.
> new IrcMessage('nick!user@host AWAY');
{ tags: {},
prefix: 'nick!user@host',
command: 'AWA',
params: [ 'nick!user@host AWAY' ] }
Is returned when params should be equal to '', like so;
> new IrcMessage('nick!user@host AWAY :');
{ tags: {},
prefix: 'nick!user@host',
command: 'AWAY',
params: [ '' ] }
Unfortunately I can't seem to reproduce what caused this error as your library is being used in another library I'm using (twitch-irc), but I just thought I'd share. Maybe throw in some error/sanity checking.
Currently, the parser is a mix of returns and error throwing. #7 highlighted lack of proper error handling in irc-message, this needs to be sorted. Not sure how I should go about it; ideas welcome.
paring IRC messages is working great. what is the recommended method to build IRC messages to send back to the server? Is there a popular serialization library (for example), or is there support in this library for writing?
Nice module, I'm currently looking for a good node irc module to use, and I see lots of people that have forked node-irc
and made their own modifications, but haven't seen any collaboration of merging of those branches to a new fork of the project.
I was wondering if you had any suggestions as to what npm module to use for IRC interfacing?
Probably going to be closed, but command is a weird name for the fact that it's a declaration of what type of message it is, and not a declaration to do something.
Since to use the hostmask, you must already know that those three properties are all names, it would be nice to not have to say 'nickname' or 'hostname' or 'username' when referring to them. No useful information is stored in the common suffix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.