Fixes missing comment.
Fixes bugs introduced in converting the AI module format. Also implements getTriggers().
Fixes stray $ from last commit.
Merge branch 'refactor-modules'
Move debugging output settings from index.php to config.php.
Made debugging optional and an option that can be enabled in the config file.
Fixes a bunch of notices & errors generated during normal operation.
Merge branch 'refactor-config' into true-refactor

Conflicts:
	index.php
Clean up index.php and remove all usages of write_socket and replace with functions that abstract basic IRC functions like nick changes, connection registration and identifying.
Fixes problem with the parameters of the authenticate function.
Moved the QUIT command to a function in functions.php
Moved the PING response (PONG) to a function in functions.php
Hide away more common raw commands (KICK, NAME)
Improve closing output with properly closed HTML or plain text (depending on debugging type) and numeric exit codes.
Fixes undefined variable in peak module caused by a typo... again.
Fixes message parser issues which solves numerous undefined offset notices in index.php.
Simplified & consolidated message parsing logic.
Update documentatoin of BaseBotModule
Ensure modules directory is loaded and modules are loaded. If not it's an error and we quit.
Fixes all known undefined index warnings in index.php.