- fix a typo which I missed earlier
authorAndreas Scherbaum <andreas@scherbaum.biz>
Fri, 25 May 2012 21:41:05 +0000 (23:41 +0200)
committerAndreas Scherbaum <andreas@scherbaum.biz>
Fri, 25 May 2012 21:41:05 +0000 (23:41 +0200)
docbot.pl

index 97d3761876c9892a6ac3b9c6339354ce8c86a2d3..a555c36047807e3a8a1db2a31cf3786674e48b9e 100755 (executable)
--- a/docbot.pl
+++ b/docbot.pl
@@ -1396,7 +1396,7 @@ sub translate_text_for_channel {
     my $text = $default_text;
 
     # translate text
-    if (is_a_channel($channe)) {
+    if (is_a_channel($channel)) {
         my $channel_language = config_get_key3('channels', $channel, 'language');
         if (defined($channel_language)) {
             $text = translate_with_default($channel_language, $text_key, $default_text);
@@ -2223,8 +2223,8 @@ sub on_message {
     print_msg("on_message($msg), session: $session", DEBUG);
 
 
-    # recognize valid command (both admin and unprivileged)
-    my ($command, $string) = find_command($msg, (substr($channel, 0, 1) eq '#') ? $channel : undef);
+    # recognize valid command (admin, operator and unprivileged)
+    my ($command, $string) = find_command($msg, (is_a_channel($channel)) ? $channel : undef);
 
 
     if (defined($command)) {