phpircd v0.4.15 this readme is a changelog lololol 06/27/2012 - * Added error code 464: ERR_PASSWDMISMATCH * Added error code 491: ERR_NOOPERHOST * Added OPER command functionality, minus userhost-checking and mode stuff. * Changed opers.ini: 'pass-enc' previously 'enc' * Removed some lingering single-quites in ircd::error() 01/13/2012 - * Fixed NAMES not adding prefixes correctly. * Fixed "Client Exited" not being shown when conditions are right. * Hushed ircd::write()'s fwrite(). * Added bitwise permissions system. - Added Channel::hasPrivs() method. - Added Mode::CHANNEL_* constants. - Added some hookpoint checks. * Fixed new channel create giving user +O when they should have +o. * Changed Channel::getUserPrefix() to use new Mode::$prefix. * Removed Channel::is[Qop|Aop|Op|Hop](). * Changed Channel::hasVoice() to use Mode::CHANNEL_VOICE privilege. * Added error 499 ERR_CHANOWNPRIVNEEDED. * Version is now 0.4.14 01/11/2012 - * Modes now have one of five types: A (list), B (requires parameter for set/unset), C (requires parameter for set), D (toggle), or P (list, special). * Converted all channel modes to the new format and added usermodes +is. * Re-wrote/created user::setModes(), user::setMode(), channel::setModes(), and channel::setMode(). setMode() sets ONE mode, setModes() is passed the mask. * Fixed issue with channel::getModes(). * Added user::getModes(). * Changed all instances of user::setMode() to user::setModes(), minus the one in user::setModes(). * Added ircd::isupport(). Handles creating and sending of the 005 RPL_ISUPPORT message. * MODE now works almost to RFC. You can check channel modes and your own user mode, as well as set your own user mode and channel modes (assuming privs). * Fixed an issue causing hostmasking to be applied twice upon connection. * Made 004 RPL_MYINFO list actual usermodes available. * Added missing config options. * Version is now 0.4.11 (edit 1) * Added all usermodes that will be used. * Version is now 0.4.12 (edit 2) * Fixed hostmasking- now masks IPv4 addresses, short addresses like slowbro.org, and long addresses like node01.phx.somecompany.com differently. * Fixed ircd::__destruct() still using a socket function. * Added ircd::$ipv4Regex and replaced faulty IPv4 regex in ircd::createSocket(). * Fixed Channel::hasMode(). * Fixed TYPE_A and TYPE_P modes not ignoring unsetting values that aren't set. * Version is now 0.4.13 01/10/2012 - * Cleaned up channel::setModes() a bit. * Added 'set' and 'unset' hookpoints for channel modes. * Fixed how modes are announced when doing multiple actions (like +oo-h slo slo2 slo) * Changed hook parameters. Now takes one array passed by ref. Can contain 'user','chan','extra' at the moment. * Added error code 482, ERR_CHANOPRIVSNEEDED, and 485, ERR_UNIQOPRIVSNEEDED. (edit 1) * Added hostmasking * Added user mode x and connect hook * Added hostmask* stuff in config.ini 01/09/2012 - * Slowly working on converting modes to class format * Added channel::is[Owner|Aop|Op|Hop](), channel::hasVoice(), channel::getUserPrefix() * Prefix is no longer stored in channel::$users, and is instead calculated by channel::getUserPrefix() * Made channel modes +qaohbvz work-ish. * Added channel::isBanned() debug shell function. * Added channel:nick() to update nicks in any array modes like +qaohv. * Added checking for unknown mode chars. 01/08/2012 - * Condense user and channel modes into one file. * Add new Mode class. * Add hookpoints for 'connect', 'privmsg', and 'join'. * Made +m, +R, and +v channel modes, as well as +z user mode, work-ish. * Fixed mis-spelling of User::disconnect() (was User::diconnect()). * Fixed ircd::$rnRegex to include the period as an allowed character. * Added User::hasMode() * Added testing User::setMode(). Will be fixed in a future push. * Fixed LUSERS issues. * Added $override arg to ircd::error() to override messages. * Fixed (read: silenced) some complaining in Channel::setMode() when un-setting modes. * Thanks to PwnFlakes for the help testing. 01/04-05/2012 - * Fixed MODE #channel outputting array modes. * LUSERS now reports half-decent information * Fixed issue #2. The server now doesn't assume line-buffering on the client side. * Added User::readBuffer 11/08/2011 - * Fixed user disconnect- using socket function on a stream. * Fixed user QUIT not being acknowledged due to not calling User::writeBuffer() before disconnect. 7/24/2011 - * Half of MODE works- at least the mode-setting part. Only for channels, too. * WHO now works. * Fixed bug where users attempting to join a channel they were already joined to was not ignored. 7/22/2011 - * SSL works now. * Switch to all stream_* functions. No more socket_*. * Probably going to do some fancy branching things in the future. (edit 1) * Work on channel modes. * MODE for channels works now- will display modes and created time. * MODE is very granular right now and only works for modes not requiring extra stuff likl +l or +L. * MODE still does nothing for user modes. Need to find a way to set mode related stuff- such as restricted (+aoO) and whatnot. (edit 2) * Unknown channel mode now throws error. * New file for storing channel modes and properies. * Channel mode missing extra (like +l, +L) is ignored. * Going to do regex checking for extra. (edit 3) * Added WHO support for channels. 7/21/2011 - * Fixed PRIVMSG when PMing (Issue #1). * Removed extraneous (and bugged) strpos in file 'ircd' (Issue #3). * Fixed posible issue when writing to sockets- now uses user::$buffer and user::writeBuffer() (Issue #4). * More core::* to ircd. * core::init is now ircd::__construct. * Moved on-die code to ircd::__destruct. * Trying to clean up the main file as much as possible. 7/20/2011 - * Cleaned up the main file (ircd) a bit- compiled an un-needed foreach into another, amongst other things. * Fixed checking for 'Client Exited' socket status when quitting spontaneously. * Fixed possible but in regex (sytax error?). * Using ircd::$allowed instead of ircd::$forbidden. * Cleaned up some stuff in the ircd class * Added ircd::nickInUse() for better nick checking. * Did away with core::$_nicks. * I don't remember what else :( (edit 1) * Fixed some bugs with PHP 5.1.6 - Regex escaping and finding users with keys (not preserved) * Added ircd::getUserBySocket() (edit 2) * Removed double read-loop in file 'ircd'- now all processed by 1. * Moved accept code to ircd::accept(). * Fixed NAMES- was trying to access Channel::$nick which does not exist. * Various bugfixes. 7/19/2011 - * Thanks again to cedr and Kuro for testing. * QUIT now works as expected. Need to tweak it for ping timeouts/etc. * TOPIC now properly announces. * NAMES fixed again. * More later! (edit 1) * Added fix for ipv6-enabled boxes with ipv4 addresses (adds ::ffff:). * Changed config.ini to all double-qoutes, as the single quotes broke everything on some boxes. * Changed core::close() to ircd::quit() when server full. (edit 2) * Fixed issue with NICK where leading colon was not stripped. * Added utility method ircd::stripColon * Added utility method ircd::checkRealName * Object-ized users. Each user is now stored as an object so it's cleaner (and easier) to do things. Will move methods later. * Added messages for being disconnected on Ping Timeout/etc. * New versioning concept: (major).(minor).(build). Still in major version 0 as we're not even a complete IRCd yet. Minor will change whenever I feel like flexing my version-changing muscle. (edit 3) * Thanks to Pedrobear for some pointers. * Class ircd now extends core. No more `global $core;'! * Added Channel class and methods. * Added methods to User class. * Almost all sending is now done through User::send() or Channel::send(). * Channel::send(msg[, excl]) accepts optional 'excl'- a User object to exclude in sending (as in PRIVMSG). 7/18/2011 - * Thanks for all the help from #Frantech: cedr, InsDel, Corbin, and others! * NAMES now announces on join and tracks nick changes properly * Fixed part of TOPIC having a wrong variable name, however TOPIC is still broken. * PART now announces, and passes through custom PART mesages * Some work on QUIT, however it's still hopelessly broken as well. * NICK now announces properly to the whole channel, instead of announcing to you once for everyone in the channel (oops). * NICK now ignores you when "changing" your nick to what it already is. * Removed NAMESX from message 005 since we don't actually support it, yet. 4/18/2011 - * Bored in Java class * Fixed some weird spacing * Added die() for config parse failure * Fixed core::write(): was turncating at 513, not 512, characters. Derp. * Hopefully I can make some headway on this soon 7/20/2010 - * JOIN progress. Error checking, you can now `join' a channel, +k doesn't work yet, you can't chat on the channel, no topic, no names etc.. but it's progress. 40+ hour work weeks have me a bit tied up so I'm doing what I can with the time I have available. (edit 1) * Added client field for ip address. * JOIN now creates the channel in $core->_channels if it doesn't exist. * TOPIC added, minus support for chaning the topic (so far). * PRIVMSG now supports sending messages to channels (YAY). Bug needs to be fixed: users remain in the channel array when disconnected, casuing errors galore. (edit 2) * Fixed issue with NICK where users were told their nick was erroneous if it was too long (instead of just shortening it for them). * NAMES support added. Splits messages that are >510 characters. * $core->write() automatically turncates strings at 512 characters (including \r\n) per rfc requirements. 7/17/2010 - * PRIVMSG works for inter-user communication on the same server only. * $core->_nicks array for keeping track of in-use nicks more efficiently. * More error codes added. * Fixed the PING timeout error for reals this time. * Typo fixes. (edit 1) * Fixed missing leading colon on PRIVMSG commands. * Made last activity (lastpong) update on every command, valid or not. * Fixed asthetic error where command errors were not returned uppercase. 7/13/2010 - * NICK command now works, minus sending it to channels, seeing as JOIN hasn't been made yet. * QUIT command also works, with the same current caveats of NICK. * Fixed space in 005 message after PREFIX * Fixed PING issue where command were not being treated as activity. * Added more error messages, including ERR_NOTREGISTERED, ERR_UNKNOWNCOMMAND and ERR_NICKNAMEINUSE. * Version is now 0.2b because I have no scheme to the version numbers and like to change them frequently. 7/12/2010 - * Sorta-finished welcome sequence. MOTD displays, if there is one (motd.txt), if not it throws ERR_NOMOTD. * Working on NOTICE AUTH to make the welcome complete. Not implementing ident, for reasoning read here: http://web.archive.org/web/20050828200336/http://www.clock.org/~fair/opinion/identd.html * More configuration options added to config.ini, not implemented yet. * opers.ini added with example syntax, though also not implemented yet. * fixed an error with the socket becoming unavailable for re-use if the program is inturrupted mid-communication with a client or shut down with clients still connected. (edit 1) * PING/PONG works now. Or at least the important parts (making sure the user still responds to PING). * Users can also now PING the server. * Pingfreq and pingout variables in the conf now utilized. * Fixed a bug where sending multiple commands in one message (i.e. NICK slowbro\r\nUSER h h h :Real Name) would cause immense amounts of errors and headaches. * Fixed MOTD display to remove extra newlines. * Fixed post-registration USER command; it now throws ERR_ALREADYREGISTERED. * NOTICE AUTH functionality complete, and working 100%. * Fixed an bug causing external networks to not be able to remain connected to the server due to using PHP_NORMAL_READ instead of PHP_BINARY_READ on the socket_read() function. * Version is now 0.2a 7/11/2010 - * Fixed security hole (already) in ircd.class.php that would allow clients to call functions they weren't supposed to such as newConnection(). * Fixed a performance issue with socket_select() and its if bracket. 7/10/2010 - * Error handling function introduced. (edit 1) * Welcome message(s) progress. Need to figure out the 005 numeric which is now RPL_ISUPPORT, probably going to just fill it with nonsense for now until the server is more complete and it is needed. * More error checking added on initial connect, check for parameter amount, and checks params against some regex. * Dicks everywhere. 7/9/2010 - * Basically a plain socket server at the moment. (edit 1) * Babysteps towards actual irc stuff. Closes link on ping timeout, working on initial connect sequence. * Expect ircd.class.php rolled out within a day or so. (edit 2) * Initial ircd class release. * NICK error checking working for initial connect. USER next. * Still need to legitimately NOTICE AUTH instead of just sending that junk. 7/8/2010 - * Initial alpha-absolutely-nothing-is-done-at-all release.