--- deliantra/server/ext/irc.ext 2007/05/18 13:56:50 1.1 +++ deliantra/server/ext/irc.ext 2007/09/24 22:55:59 1.6 @@ -36,11 +36,11 @@ sub handle_fcmd { my ($name, $me, $msg) = @_; - utf8::decode $msg; - if ($msg eq "!who") { - do_notice $_ - for ext::commands::who_listing (); + # clobbers irc, http is available + do_notice "see http://cf.schmorp.de/userlist.crossfire.schmorp.de.html"; +# do_notice $_ +# for ext::commands::who_listing (0, "."); } elsif ($msg =~ /^\!tell/) { my (undef, $target, $tmsg) = split / /, $msg, 3; @@ -55,8 +55,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 +79,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;