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);
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)) {