… | |
… | |
36 | sub handle_fcmd { |
36 | sub handle_fcmd { |
37 | my ($name, $me, $msg) = @_; |
37 | my ($name, $me, $msg) = @_; |
38 | |
38 | |
39 | if ($msg eq "!who") { |
39 | if ($msg eq "!who") { |
40 | do_notice $_ |
40 | do_notice $_ |
41 | for ext::commands::who_listing (); |
41 | for ext::commands::who_listing (0, "."); |
42 | |
42 | |
43 | } elsif ($msg =~ /^\!tell/) { |
43 | } elsif ($msg =~ /^\!tell/) { |
44 | my (undef, $target, $tmsg) = split / /, $msg, 3; |
44 | my (undef, $target, $tmsg) = split / /, $msg, 3; |
45 | |
45 | |
46 | if (my $other = cf::player::find_active $target) { |
46 | if (my $other = cf::player::find_active $target) { |
… | |
… | |
51 | } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) { |
51 | } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) { |
52 | $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN); |
52 | $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN); |
53 | } else { |
53 | } else { |
54 | cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg; |
54 | cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg; |
55 | |
55 | |
56 | $other->ob->message ("$name/$me tells you: $tmsg"); |
56 | $other->ns->send_msg (cf::chat::tell_channel ("$name/$me"), "$name/$me tells you: $tmsg", cf::NDI_DK_ORANGE | cf::NDI_DEF); |
57 | $other->ob->{ext_last_tell} = "$name/$me"; |
|
|
58 | } |
57 | } |
59 | } else { |
58 | } else { |
60 | do_notice "$me: What do you want to tell $target?"; |
59 | do_notice "$me: What do you want to tell $target?"; |
61 | } |
60 | } |
62 | |
61 | |
… | |
… | |
86 | utf8::decode $tmsg; |
85 | utf8::decode $tmsg; |
87 | |
86 | |
88 | if ($tmsg =~ /^\!/) { |
87 | if ($tmsg =~ /^\!/) { |
89 | handle_fcmd ($name, $nick, $tmsg); |
88 | handle_fcmd ($name, $nick, $tmsg); |
90 | } elsif ($tmsg =~ m/\S/) { |
89 | } elsif ($tmsg =~ m/\S/) { |
91 | $_->ob->message ( |
90 | $_->ns->send_msg ($ext::chat::CHAT_CHANNEL, |
92 | "$name/".$nick." chats: $tmsg", cf::NDI_BLUE |
91 | "$name/".$nick." chats: $tmsg", cf::NDI_BLUE | cf::NDI_DEF |
93 | ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; |
92 | ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; |
94 | } |
93 | } |
95 | 1; |
94 | 1; |
96 | }, |
95 | }, |
97 | # registered => sub { |
96 | # registered => sub { |