michaelowens/NodeJS-IRC-Bot — Issue #4: potential features
Author: ktiedt
Created: 2011-12-20 07:00:08+00:00
State: open

Hi Michael, I was hoping you might be interested in some work I did on my local fork of your IRC bot -- I haven't committed them to my fork yet (work is almost complete on it) but I wanted to get the ball rolling to see if you might be interested in a pull request once I do.

1) irc.send(target, msg) method
-- removes excessive need to use irc.raw("PRIVMSG", .....)

2) track users and channels via irc.users = {} and irc.channels = {}
-- this includes major updates to channel.js as well as a new user.js
---- these each have context senstive msg() functions as well as .send() messages to make sending PRIVMSG simple
---- User() tracks channels a user is in and provides an isOn() method to test channels against their list
---- Channel() tracks users
---- Both classes implement join/part() methods to ensure proper tracking of each state

3) Prior to finding the onReply example I rewrote irc.parse() to allow for Regex matching so IRCD Numerics could be trapped via onNumeric event (which allows a slightly cleaner method of keeping Numeric events callbacks in scope

I'm really happy I found your project, its made my endeavor into this bot project much simpler (I was expecting to have to re-implement RFC 1459 specs to talk to irc)