… | |
… | |
62 | prio => -1000, |
62 | prio => -1000, |
63 | on_login => sub { |
63 | on_login => sub { |
64 | my ($pl) = @_; |
64 | my ($pl) = @_; |
65 | |
65 | |
66 | clean_timeouts $pl->ob; |
66 | clean_timeouts $pl->ob; |
|
|
67 | |
67 | $pl->send_msg ($SAY_CHANNEL); |
68 | $pl->send_msg ($SAY_CHANNEL); |
68 | $pl->send_msg ($CHAT_CHANNEL); |
69 | $pl->send_msg ($CHAT_CHANNEL); |
69 | }, |
70 | }, |
70 | ); |
71 | ); |
71 | |
72 | |
… | |
… | |
706 | |
707 | |
707 | my $pl = $ob->contr; |
708 | my $pl = $ob->contr; |
708 | |
709 | |
709 | cf::async { |
710 | cf::async { |
710 | my $name = $ob->name; |
711 | my $name = $ob->name; |
|
|
712 | $Coro::current->{desc} = "emote handler for $name"; |
711 | |
713 | |
712 | if ($tname eq $name) { |
714 | if ($tname eq $name) { |
713 | my %emote = %{ $emotes->{$emotion}->{self} || {} }; |
715 | my %emote = %{ $emotes->{$emotion}->{self} || {} }; |
714 | |
716 | |
715 | $emote{other} ||= "You look away from <self>."; |
717 | $emote{other} ||= "You look away from <self>."; |
… | |
… | |
776 | |
778 | |
777 | if ($msg) { |
779 | if ($msg) { |
778 | my $name = $ob->name; |
780 | my $name = $ob->name; |
779 | my @plonmap = grep $ob->on_same_map_as ($_->ob), cf::player::list; |
781 | my @plonmap = grep $ob->on_same_map_as ($_->ob), cf::player::list; |
780 | |
782 | |
781 | $_->send_msg ($SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY | ($_ == $ob ? cf::NDI_REPLY : 0)) |
783 | $_->send_msg ($SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY | ($_ == $ob->contr ? cf::NDI_REPLY : 0)) |
782 | for @plonmap; |
784 | for @plonmap; |
783 | |
785 | |
784 | # npcs, magic_ears etc. |
786 | # npcs, magic_ears etc. |
785 | # first find all objects and their first-level inventories |
787 | # first find all objects and their first-level inventories |
786 | # within a 5x5 square that have something resembling |
788 | # within a 5x5 square that have something resembling |