Working proof of concept.

Hardcoded to connect to server irc.dsm.org for now.
Added README.
Edit README.
Edit README.
Many bugfixes and improvements.
Bugfix to spIrcClient::socketReadLine() dropping lines correctly in some cases.  Now entire MOTD displays.
Bugfix ircweb2init.php partly rewritten to handle connection testing (connect=0) properly without affecting session state.
Bugfix to ircweb2recv.php to set maximum message processing per call.  Prevents accidental endless loop of message parsing.
Bugfix RPL_TIME response fixed in spIrcClient::parseMsg().
Improved error logging with static 'log' class that forwards to error_log with associated script file.
CSS updated with white-space:pre-wrap in .ircChannel so that a series of spaces will display verbatim, instead of being condensed to single space.
Some unwanted commented out code removed.
Bugfixes and improvements
Bugfix ircweb2init.php was not properly resuming an existing socket connection.
Cleaned up some excessive debug logging.
CSS tweaks to server messages to use monospace font.
Many bugfixes and improvements.
Bugfix activation now properly reports whether the connection was created new or resumed.
Text in channel is linkified if it looks like a URL.
config.php has debug setting to control whether ircweb2recv.php returns raw IRC messages in its result; not normally needed by client.
Set background process to 1M memory limit.  Seems to only require ~200-500k while running.  This should allow many concurrent sessions by cutting down overhead.
CSS improved readability in channel window by using a 50% black background overlay over the gradient.
Many bugfixes and improvements.
Bugfix client now properly recognizes a nick highlighting without case sensitivity.
Client side checks for activity timeout and will automatically deactivate if no messages are processed in 5 seconds.
Server side maintains structured user and channel data collected by message responses and is then transferred to client side.  Will include joined channels and its members.
HTML DOM/CSS restructured to reference elements by class, instead of ID, where possible.
All javascript will reference elements based on a known parent element, not IDs.  This will later be useful when if converting to a JQuery plugin and possibly supporting multiple chat controls.
Added activation status indicator to user entry mode line.  Green icon for activated, big red icon for deactivated.
Added support for receiving notice messages.
Added auto message reply by pressing tab on an empty line to auto complete to "/msg <nick> ", where nick is the user who sent the last received private message or notice.
Working on autocompletion of users by pressing tab on a non-empty line -- work in progress.
Cleaned up regex syntax in PHP, i.e. use "\s" instead of "\\s".
Support for /quit.
/quit [message] will end the IRC connection and client will deactivate.
If the IRC connection drops for any reason, the background process will die and the client will also respond by deactivating.
Now displays other users' quit messages.
Client side now displays MODE messages.
Client side polling implements a rudimentary non-atomic locking flag.  It should cut down on any overlapping ircweb2recv.php calls that cause duplicate messages.
Bugfix cause of random ping timeouts.
Also fixed missing channel name when displaying an empty channel topic.
More bugfixing to ping timeout issue.
Updated spSocketProxy to manage multiple client connections so that read and write threads don't interfere.  Previously, a newly accepted connection would reset the existing client socket, causing random read or write failures.
Bugfix to ping timeout issue.  Better validation on data returned from ircweb2recv.php.
Added smooth scrolling.
Bugfixes and improvements.
Recoded client side polling so call ircweb2recv.php iteratively, rather than at timed intervals.  ircweb2recv.php has been configured to block for up to 'n' seconds until data is read from the socket.  These changes significantly reduce TCP overhead of frequent client side polling while still staying responsive to incoming data.
Removed buggy smooth scrolling animation.
Switched PHP session save handler to sqlite.  The files handler was found to not support concurrent PHP scripts, which caused blocking issues when sending from the client while waiting for received data.
spIrcClient class now buffers sent messages and requires a call to flushSendBuffer() to send to the socket.  This allows queuing of data before sending as a batch.  This is also required to properly handle socket errors in fewer locations of the project; not at every point where a message needs to be sent.
ircweb2recv.php now returns a simpler array of messages by removing a level of nesting.
Refactored client side Javascript.
Split ircweb2.js into ircClientUI.js and chatmore.js.
chatmore.js manages the client to server connectivity and triggers events on IRC activity.
ircClientUI.js controls the UI visuals, client commands, and talks to chatmore.js to send/receive IRC messages.
This design makes it easier to customize the UI without affecting how the network connectivity functions and vice versa.
The app is functional, however some minor bugs still remain to be fixed.
Bugfix and improvements.
Bugfix ircweb2recv.php now returns Connection Not Open error if the socket file is missing, indicating the background process quit.
Bugfix IRC client state now correctly updates when a nick change occurs, channel members are listed on join, topic is displayed, and user mode after initial registration.
Will now auto decorate nicks and channels in chat messages based on known users and channel-like strings.
Can now auto /query nicks and channels by doubleclicking.
Refactored nick highlighting.
Moved implementation of nick highlighting from template conditional markup to writeLine().  This approach is a little cleaner by design.
Fixed activation status icon not changing on successful activation.
Many bugfixes and improvements.
Client now stable enough, I enabled auto-activate on load.
Fixed issues with dropped incoming messages after resuming connection on activation.
- To fix this, I redesigned how spSocketProxy accepts client connections.  It now maintains two domain socket connections: primary/secondary.  Each can maintain only one client connection, bumping off previously accepted connections.  Primary is read/write, secondary is write-only by the client side.
- This allows ircweb2recv.php to wait for an incoming message and when it comes, decide it may send a response on the same socket.  Then, if the user enters a command or message at the UI, it is sent over the secondary connection by ircweb2send.php.
- If the user refreshes the browser and resumes the connection, the newly instantiated aja call to ircweb2recv.php will disconnect the old, stale ajax call that may still be connected to spSocketProxy.  This way, there's no other listeners that may intercept incoming messages and the wrong ircweb2recv.php receive it.
- The stale ircweb2recv.php will simply timeout and exit on its own.
Turned on log_errors option, so notices/warnings/errors are now logged.  This is typically a server php.ini setting, but it's not on by default for me and for now I put it in config.php
Bugfix index.php needed headers to disable caching if ?x suffix was provided.
Bugfix rendering issues around decorating nicks and channels in messages.  Restricted this feature to only channel messages.
Refined auto decoration of nicks and channels in messages.
CSS hover styles to indicate they are clickable.
When doubleclicking decorated channel names, if the channel hasn't been joined yet, join it.