+ if($_POST['irc-submit']) {
+ set_config('irc','autochans',trim($_POST['autochans']));
+ set_config('irc','sitechats',trim($_POST['sitechats']));
+ /* stupid pop-up thing */
+ info( t('IRC settings saved.') . EOL);
+ }
+}
+function irc_plugin_admin (&$a, &$o) {
+ $sitechats = get_config('irc','sitechats'); /* popular channels */
+ $autochans = get_config('irc','autochans'); /* auto connect chans */
+ $t = get_markup_template( "admin.tpl", "addon/irc/" );
+ $o = replace_macros($t, array(
+ '$submit' => t('Save Settings'),
+ '$autochans' => array( 'autochans', t('Channel(s) to auto connect (comma separated)'), $autochans, t('List of channels that shall automatically connected to when the app is launched.')),
+ '$sitechats' => array( 'sitechats', t('Popular Channels (comma separated)'), $sitechats, t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') )
+ ));
+}