ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/chat.ext
(Generate patch)

Comparing deliantra/server/ext/chat.ext (file contents):
Revision 1.26 by root, Mon Jul 23 21:53:21 2007 UTC vs.
Revision 1.27 by root, Tue Jul 24 16:42:35 2007 UTC

831 $ob->contr->ns->send_msg ($SAY_CHANNEL => "What do you want to say?", 0, reply => 1); 831 $ob->contr->ns->send_msg ($SAY_CHANNEL => "What do you want to say?", 0, reply => 1);
832 } 832 }
833}; 833};
834 834
835cf::register_command chat => sub { 835cf::register_command chat => sub {
836 my ($pl, $msg) = @_; 836 my ($ob, $msg) = @_;
837 837
838 utf8::decode $msg; 838 utf8::decode $msg;
839 839
840 my $pl = $ob->contr;
841
840 return if $pl->contr->invoke (cf::EVENT_PLAYER_CHAT, $msg); 842 return if $pl->invoke (cf::EVENT_PLAYER_CHAT, $msg);
841 843
842 if ($msg) { 844 if ($msg) {
843 my $name = $pl->name; 845 my $name = $pl->name;
844 my $NOW = time; 846 my $NOW = time;
845 847
857cf::register_command shout => sub { 859cf::register_command shout => sub {
858 my ($pl, $msg) = @_; 860 my ($pl, $msg) = @_;
859 861
860 utf8::decode $msg; 862 utf8::decode $msg;
861 863
864 my $pl = $ob->contr;
865
862 return if $pl->contr->invoke (cf::EVENT_PLAYER_SHOUT, $msg); 866 return if $pl->invoke (cf::EVENT_PLAYER_SHOUT, $msg);
863 867
864 if ($msg) { 868 if ($msg) {
865 my $NOW = time; 869 my $NOW = time;
866 my $name = $pl->name; 870 my $name = $pl->name;
867 871

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines