--- deliantra/server/ext/chat.ext 2007/04/24 18:24:31 1.14 +++ deliantra/server/ext/chat.ext 2007/06/11 22:18:03 1.18 @@ -1,4 +1,4 @@ -#! perl +#! perl # depends=irc #CONVERSION: PARTIAL # implement a replacement for the built-in say/chat/shout/tell/reply commands @@ -766,14 +766,12 @@ if ($msg) { my $name = $pl->name; - utf8::encode $msg; # ->message not yet utf8-ified $_->ob->message ("$name says: $msg", cf::NDI_GREY | cf::NDI_UNIQUE) for grep $pl->on_same_map_as ($_->ob), cf::player::list; - utf8::decode $msg; # npcs, magic_ears etc. - # first find all objects and theirt-level inventories - # within a 5x5 square # that have something resembling + # first find all objects and their first-level inventories + # within a 5x5 square that have something resembling # dialogue or support on_say. my ($map, $x, $y) = ($pl->map, $pl->x - 2, $pl->y - 2); @@ -827,9 +825,8 @@ my $name = $pl->name; my $NOW = time; - utf8::encode $msg; # ->message not yet utf8-ified cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", $name, $msg; - ext::schmorp_irc::do_notice (sprintf "[%s] %s", $name, $msg); + ext::irc::do_notice (sprintf "[%s] %s", $name, $msg); $_->ob->message ("$name chats: $msg", cf::NDI_BLUE) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; @@ -851,9 +848,8 @@ my $name = $pl->name; cf::LOG cf::llevDebug, sprintf "QBERT {%s} %s\n", $name, $msg; - ext::schmorp_irc::do_notice (sprintf "\007\0034{%s} %s\n", $name, $msg); + ext::irc::do_notice (sprintf "\007\0034{%s} %s\n", $name, $msg); - utf8::encode $msg; # ->message not yet utf8-ified $_->ob->message ("$name shouts: $msg", cf::NDI_RED) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 2 } cf::player::list; @@ -875,7 +871,7 @@ if ($target =~ /irc\//) { my (undef, $nick) = split /\//, $target, 2; $pl->message ("You tell $target: $args"); - ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg); + ext::irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg); } elsif (my $other = cf::player::find_active $target) { if ($msg) { @@ -885,7 +881,6 @@ $pl->message ("$target ignores what you say. Give up on it.", cf::NDI_UNIQUE); } else { return if $other->invoke (cf::EVENT_PLAYER_TOLD, $pl->contr, $msg); - utf8::encode $msg; # ->message not yet utf8-ified cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg; $pl->message ("You tell $target: $msg"); @@ -912,7 +907,7 @@ if ($pl->{ext_last_tell} =~ /irc\//) { my (undef, $nick) = split /\//, $pl->{ext_last_tell}, 2; $pl->message ("You tell " . $pl->{ext_last_tell} . ": $args"); - ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args); + ext::irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args); } elsif (my $other = cf::player::find_active $pl->{ext_last_tell}) { if ($args) { @@ -920,7 +915,6 @@ or delete $other->ob->{ext_ignore_tell}{$name}; if ($other->ob->{ext_ignore_tell}{$name} < time) { - utf8::encode $args; # ->message not yet utf8-ified cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $other->ob->name, $args; $pl->message ("You tell " . $other->ob->name . ": $args");