Chat room URL : http://chat.ahuiz.com
A while back I decided to add PHPFreeChat to my domain to facilitate communication with my Ft. Riley training team members. I spent a few hours tweeking it to give it the look and feel I wanted and then wrote it off as another task to be removed from my to-do list. The next day I began using it at work and enjoyed chatting with several friends across Afghanistan that I hadn’t spoken to in months. After a couple of hours I began to realize that there were a few things that desperatley needed fixing. Six months later I finally decided that the benefits gained from fixing them far outweighed the effort of actually doing something pseudo-productive. The following problems were adressed and corrected (or intentionally made worse :) )
- Noflood – I still do not know exactly how this works. I have literally been kicked out after sending one message. Sometimes you can send 10 straight before getting the boot. Once you are kicked out you must restart the app and reenter your handle. Long story short, it had to go. A couple more “kicked out by no floods” and I would of had to buy a new monitor.Solution: Fixing the flood problem actually took much longer than I anticipated. Every help doc/forum stated that I simply needed to add it to the Skip Proxies Hash using
$params['skip_proxies'] = array('noflood');
. I attempted tweaking the noflood paramters for about an hour without luck before coming across some information regarding the “/rehash” command. Yahtzee! I learned that I would first need to add myself as an admin so I could make adminitrative changes and rehash the application to bypass server caching. - Admin – I originally did not add my handles in the admin hash. Doing so would allow me to execute all kinds of commands, from the functional to the outright cruel.Solution: I appended the following code (passwords omitted) and whalla, I was all powerful.
$params['admins'] = array('shane' => '*********', 'shanoh' => '*********');
This allowed me to utilize the following chat commands (many of which a quest can use):- ban
Bans an user and kicks it from the room
/ban {nickname} {reason}banlist
This command lists the banished users on the given channel
/banlistclear
Clears the room’s messages
/clearconnect
Connects to the chat
/connect {nickname}debug
Shows debug infos /debug [userconfig|globalconfig|phpserver]help
Shows the command list
/helpidentify
This command will identify the user admin rights
/identify {password}init
Initialize the chat
/initinvite
Invites other users into a channel
/invite {nickname to invite} [ {target channel} ]join
Creates a new channel
/join {channelname}kick
Kicks the user from a channel
/kick {nickname} [ {reason} ]leave
/leave [ch|pv [[{channel|nickname}] {reason}]]me
Writes a notable message
/me {message}nick
Change the nick (rename it) and notify all the joined channels/privmsg
/nick {newnickname}op
Makes the user admin. Just changes the “isadmin” meta flag
/op {nickname}deop
Makes the user no-admin. Just change the “isadmin” meta flag
/deop {nickname}privmsg
/privmsg {nickname}quit
Logouts the user from the chat
/quitredirect
Opens the url in the browser
/redirect urlrehash
This command deletes the cached configuration
/rehashsend
Sends a text to the room
/send {text to send}unban
Will unban the user
/unban {nickname}
/unban all will unban all the users on this channelversion
Shows the script’s version
/versionwho
/who channelwhois
Shows the user’s details
/whois {nickname} - Censors – Curse words are censored by default. When 10 military members were chatting, about every third word was being censored. I figured that this was an adult chatroom so what the hell.Solution: I doubt I need to take too much time explaining how much fun you can with the censor function. I eventually decided to pepper the chat room with Easter eggs. For instance, since nearly all of my friends hate Obama, everytime his name was mentioned they would automatically send something to the effect of “I think President Obama will go down in history as the best…” etc. Presently there are 8 off-limit words that send random messages in their place. Good times. The following code is a simple example of what you can do:$params[‘proxies_cfg’][‘censor’][‘words’] = array(‘navy.*’);
$params[‘proxies_cfg’][‘censor’][‘replaceby’] = ‘I really like having sex with goats’;
$params[‘proxies_cfg’][‘censor’][‘regex’] = true - Multiline Messages – While tweaking my stylesheet the first time around I managed to change the width of the handle pane enough to cut off a word or two on multiline texts. Every now and then someone would type someting long enough that would lead to readers guessing the cut-off words.Solution: I simply re-tooled the stylesheet, and decided while doing so, that I could add a few things which led to ….
- Smile Candy – I wanted to personalize many of the ridiculous emoticons that were applied to the theme I was using.Solution: I uploaded several goofy/raunchy/ridiculous images to replace my innocent smiley faces. Again the sky is the limit here.More information may found @ http://www.phpfreechat.net