I wrote a CtcpEncoder, CtcpDecoder and added some limited support to BnxBot. It now responds to the CTCP VERSION command (though, it doesn't have any real versioning yet).
Today, I created a sourceforge project for it:
http://sourceforge.net/projects/ircbnx/While sourceforge doesn't think there are any files, you can check them out with subversion (I recommend TortoiseSVN on Windows).
For Windows:
EDIT: Redundant
Some porting is still necessary despite using libevent2.
For one, FreeBSD's libstdc++ doesn't support C++11 std::regex and so I used POSIX regex. BnxResponseRule is the only place where regex is used and it would probably be trivial to port this to C++11 std::regex (e.g. I think VS 2010 and 2012 have this).
- regex
FreeBSD's libstdc++ doesn't have C++11 std::regex and so I resorted to POSIX regex. BnxResponseRule is the only place where regex is used and it would be trivial to port it (it's just a header) - Winsock
This project is not yet aware of Winsock and it uses some POSIX functionality (like fcntl) not present on Windows. It even uses signal() to ignore SIGPIPE (which I'm not sure if Windows supports). You'd have to set the socket as non-blocking some other way in Windows.
A list of things that remain to be done:
- RPL_ISUPPORT
At present, I assume ISO646 case mappings as per RFC2812 and the support is implemented in IrcString.h. However, these case mappings can vary between servers (many of which just use ascii now). Need a new helper class that parses RPL_ISUPPORT numerics and provides basic string functionality (e.g. like strcasestr(), strcasecmp()) that respect the case mapping - Internal ignore list
The original BNX would permanently ignore users who told it to "shutup" or who tried to abuse it. - Channel accounting
Need to maintain internal channel lists which is somewhat more challenging than Battle.net. In IRC, channel information is conveyed on JOIN through RPL_NAMEREPLY. More detailed information (such as complete hostmask) is conveyed through RPL_WHOREPLY. XChat, for example, builds a channel list by first populating the nicknames and then occasionally use WHO to collect host and away information. - Access system
Need to implement the BNX access system. This access system would be based on wildcard hostmasks. - BNX Commands
The BNX commands need to be implemented (except for designate). Anyone know the difference between BNX's squelch and ignore? - Configuration files
Lastly, the configuration files need to be implemented. I think INI would be a good choice.
After I get through these, I'll mark the project as Alpha.