*/
/* enable in admin->plugins
* you will then have "irc chatroom" listed at yoursite/apps
* and the app will run at yoursite/irc
* documentation at http://tonybaldwin.me/hax/doku.php?id=friendica:irc
* admin can set popular chans, auto connect chans in settings->plugin settings
*/
function irc_install() {
register_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
register_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
register_hook('plugin_settings_post', 'addon/irc/irc.php', 'irc_addon_settings_post');
}
function irc_uninstall() {
unregister_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
unregister_hook('plugin_settings', 'addon/irc/irc.php', 'irc_addon_settings');
}
function irc_addon_settings(&$a,&$s) {
if(! is_site_admin())
return;
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '' . "\r\n";
/* setting popular channels, auto connect channels */
$sitechats = get_config('irc','sitechats'); /* popular channels */
$autochans = get_config('irc','autochans'); /* auto connect chans */
$s .= '';
$s .= '