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