- use internal config functions
authorAndreas Scherbaum <andreas@scherbaum.biz>
Tue, 17 Jan 2012 01:00:15 +0000 (02:00 +0100)
committerAndreas Scherbaum <andreas@scherbaum.biz>
Tue, 17 Jan 2012 01:00:15 +0000 (02:00 +0100)
docbot.pl

index 004b09d7605559f217a76968b8bcafe029d48ff5..62add8022a965dc72577a7cbb1c385ac71facf62 100755 (executable)
--- a/docbot.pl
+++ b/docbot.pl
@@ -651,12 +651,12 @@ sub init_sessions {
 
 
 sub sort_irc_channels_into_sessions {
-    my @channels = $main::config->config_get_keys1('channels');
+    my @channels = config_get_keys1('channels');
 
     foreach my $channel (@channels) {
         # FIXME: find out if this channel is already joined
         # FIXME: if session changes, reassign the channel
-        my $session = $main::config->config_get_key3('channels', $channel, 'session');
+        my $session = config_get_key3('channels', $channel, 'session');
         push(@{$main::sessions{$session}{'irc_channels'}}, $channel);
         print_msg("assign irc channel '$channel' to session '$session'", DEBUG);
     }
@@ -1105,14 +1105,14 @@ sub find_translation {
         $lowercase = shift;
     }
 
-    my @languages = $main::config->config_get_keys1('translations');
+    my @languages = config_get_keys1('translations');
 
     # find a word in one or all languages
     foreach my $tmp (@languages) {
         if (!defined($language) or (defined($language) and $language eq $tmp)) {
-            my @tmp2 = $main::config->config_get_keys2('translations', $tmp);
+            my @tmp2 = config_get_keys2('translations', $tmp);
             foreach my $tmp2 (@tmp2) {
-                my $tmp3 = $main::config->config_get_key3('translations', $tmp, $tmp2);
+                my $tmp3 = config_get_key3('translations', $tmp, $tmp2);
                 my @tmp3 = ($tmp3);
                 if ($tmp3 =~ /\|/) {
                     @tmp3 = split(/\|/, $tmp3);