--- deliantra/server/ext/irc.ext 2007/05/18 13:56:50 1.1 +++ deliantra/server/ext/irc.ext 2007/07/28 14:23:16 1.4 @@ -36,8 +36,6 @@ sub handle_fcmd { my ($name, $me, $msg) = @_; - utf8::decode $msg; - if ($msg eq "!who") { do_notice $_ for ext::commands::who_listing (); @@ -55,8 +53,7 @@ } else { cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg; - $other->ob->message ("$name/$me tells you: $tmsg"); - $other->ob->{ext_last_tell} = "$name/$me"; + $other->ns->send_msg (cf::chat::tell_channel ("$name/$me"), "$name/$me tells you: $tmsg", cf::NDI_DK_ORANGE | cf::NDI_DEF); } } else { do_notice "$me: What do you want to tell $target?"; @@ -80,15 +77,18 @@ my $name = 'irc'; my $nick = Net::IRC3::Util::prefix_nick ($msg); my $NOW = Time::HiRes::time; + my $tmsg = $msg->{trailing}; $tmsg =~ s/\x01[^\x01]*\x01//g; $tmsg =~ s/\015?\012/ /g; - utf8::encode $tmsg; # ->message not yet utf8-ified + + utf8::decode $tmsg; + if ($tmsg =~ /^\!/) { handle_fcmd ($name, $nick, $tmsg); } elsif ($tmsg =~ m/\S/) { - $_->ob->message ( - "$name/".$nick." chats: $tmsg", cf::NDI_BLUE + $_->ns->send_msg ($ext::chat::CHAT_CHANNEL, + "$name/".$nick." chats: $tmsg", cf::NDI_BLUE | cf::NDI_DEF ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; } 1;