Chat proxies

phpFreeChat proxies look like plugins, they can easily add new functionalities to the chat. This page lists all the official proxies packaged with the latest phpfreechat release.

Log

The log proxy is used to store the chat discussions in a flat file. This log proxy is really basic, if you need a more advanced on, have a look to this contribution: http://www.phpfreechat.net/forum/viewtopic.php?id=2192

Parameters

In 1.1 version the parameters are :

  • path : indicate the directory where the chat logs will be written (by default its value is data/private/logs/)

Usage

By default this proxy is loaded. However your can tell phpfreechat to ignore it:

$params['skip_proxies'] = array('log');

You can also indicate another path to store the chat logs:

$params['proxies_cfg']['log']['path'] = '/my/path/to/store/the/chat/logs/';

Censor

This proxy is used to banish some words. When a user post a banished word, this word is replaced by a character (by default '*' character)

Parameters

  • words : list of words to bannish (by default its value is array(“fuck”,”sex”,”bitch”))
  • replaceby : the character to use to censor the banished words (by default its value is *)
  • regex : if true the words list should be a regex list (by default its value is false)

Usage

By default the censor proxy is loaded. However your can tell phpfreechat to disable it:

$params['skip_proxies'] = array('censor');

You can also indicate other parameters values easily:

$params['proxies_cfg']['censor']['words'] = array('fuck.*');
$params['proxies_cfg']['censor']['replaceby'] = '#';
$params['proxies_cfg']['censor']['regex'] = true;

NoFlood

This proxy is used to avoid flood in the chat. When a user post too many message in a too small time, this proxy just kick the user.

Parameters

  • charlimit : indicate the allowed maximum number of chars that can be send during the delay (by default its value is 450)
  • msglimit : indicate the allowed maximum number of messages (lines) that can be send during the delay (by default its value is 10)
  • delay : if one of the above criteria exceed the limite during this delay value (in seconds), the user will be kicked (by default its value is 5 seconds)

Usage

By default the flood proxy is loaded. However your can tell phpfreechat to disable it:

$params['skip_proxies'] = array('noflood');

You can also indicate other parameters values easily:

$params['proxies_cfg']['noflood']['charlimit'] = 500;
$params['proxies_cfg']['noflood']['msglimit'] = 20;
$params['proxies_cfg']['noflood']['delay'] = 6;

Lock

This proxy is used to close the chat access. Then all the users are redirected to a given url.

Parameters

This proxy is not well written (correct today - 1.2 version) because these parameters are global (not in the 'proxies_cfg' array).

  • islocked : enable/disable the chat lock (by default its value is false)
  • lockurl : the url where the users will be redirected when the chat is locked (by default its value is http://www.phpfreechat.net)

Usage

By default the lock proxy is loaded. You can disable it this way:

$params['skip_proxies'] = array('lock');

or this way

$params['islocked'] = false;

You can also modify easily the “lock url”:

$params['lockurl'] = 'http://www.google.fr';
Fork me on GitHub