--- deliantra/server/ext/chat.ext 2007/07/23 21:17:14 1.25 +++ deliantra/server/ext/chat.ext 2007/07/24 16:42:35 1.27 @@ -828,16 +828,18 @@ } } else { - $ob->contr->send_msg ($SAY_CHANNEL => "What do you want to say?", 0, reply => 1); + $ob->contr->ns->send_msg ($SAY_CHANNEL => "What do you want to say?", 0, reply => 1); } }; cf::register_command chat => sub { - my ($pl, $msg) = @_; + my ($ob, $msg) = @_; utf8::decode $msg; - return if $pl->contr->invoke (cf::EVENT_PLAYER_CHAT, $msg); + my $pl = $ob->contr; + + return if $pl->invoke (cf::EVENT_PLAYER_CHAT, $msg); if ($msg) { my $name = $pl->name; @@ -859,7 +861,9 @@ utf8::decode $msg; - return if $pl->contr->invoke (cf::EVENT_PLAYER_SHOUT, $msg); + my $pl = $ob->contr; + + return if $pl->invoke (cf::EVENT_PLAYER_SHOUT, $msg); if ($msg) { my $NOW = time;