… | |
… | |
120 | if ($msg) { |
120 | if ($msg) { |
121 | my $name = $who->name; |
121 | my $name = $who->name; |
122 | my $NOW = time; |
122 | my $NOW = time; |
123 | |
123 | |
124 | utf8::encode $msg; # ->message not yet utf8-ified |
124 | utf8::encode $msg; # ->message not yet utf8-ified |
125 | # cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", $name, $msg; |
125 | cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", $name, $msg; |
126 | ext::schmorp_irc::do_notice (sprintf "[%s] %s", $name, $msg); |
126 | ext::schmorp_irc::do_notice (sprintf "[%s] %s", $name, $msg); |
127 | |
127 | |
128 | $_->ob->message ("$name chats: $msg", cf::NDI_BLUE) |
128 | $_->ob->message ("$name chats: $msg", cf::NDI_BLUE) |
129 | for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; |
129 | for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; |
130 | |
130 | |
… | |
… | |
142 | |
142 | |
143 | if ($msg) { |
143 | if ($msg) { |
144 | my $NOW = time; |
144 | my $NOW = time; |
145 | my $name = $who->name; |
145 | my $name = $who->name; |
146 | |
146 | |
147 | # cf::LOG cf::llevDebug, sprintf "QBERT {%s} %s\n", $name, $msg; |
147 | cf::LOG cf::llevDebug, sprintf "QBERT {%s} %s\n", $name, $msg; |
148 | ext::schmorp_irc::do_notice (sprintf "{%s} %s\n", $name, $msg); |
148 | ext::schmorp_irc::do_notice (sprintf "\0034{%s} %s\n", $name, $msg); |
149 | |
149 | |
150 | utf8::encode $msg; # ->message not yet utf8-ified |
150 | utf8::encode $msg; # ->message not yet utf8-ified |
151 | $_->ob->message ("$name shouts: $msg", cf::NDI_RED) |
151 | $_->ob->message ("$name shouts: $msg", cf::NDI_RED) |
152 | for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 2 } cf::player::list; |
152 | for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 2 } cf::player::list; |
153 | |
153 | |
… | |
… | |
169 | |
169 | |
170 | if ($target =~ /irc\//) { |
170 | if ($target =~ /irc\//) { |
171 | my (undef, $nick) = split /\//, $target, 2; |
171 | my (undef, $nick) = split /\//, $target, 2; |
172 | $who->message ("You tell $target: $args"); |
172 | $who->message ("You tell $target: $args"); |
173 | ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg); |
173 | ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg); |
174 | } |
|
|
175 | |
|
|
176 | elsif (my $other = cf::player::find $target) { |
174 | } elsif (my $other = cf::player::find $target) { |
177 | |
175 | |
178 | if ($msg) { |
176 | if ($msg) { |
179 | if ($target eq $name) { |
177 | if ($target eq $name) { |
180 | $who->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE); |
178 | $who->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE); |
181 | } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { |
179 | } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { |
… | |
… | |
207 | |
205 | |
208 | if ($who->{ext_last_tell} =~ /irc\//) { |
206 | if ($who->{ext_last_tell} =~ /irc\//) { |
209 | my (undef, $nick) = split /\//, $who->{ext_last_tell}, 2; |
207 | my (undef, $nick) = split /\//, $who->{ext_last_tell}, 2; |
210 | $who->message ("You tell " . $who->{ext_last_tell} . ": $args"); |
208 | $who->message ("You tell " . $who->{ext_last_tell} . ": $args"); |
211 | ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args); |
209 | ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args); |
212 | } |
|
|
213 | |
|
|
214 | elsif (my $other = cf::player::find $who->{ext_last_tell}) { |
210 | } elsif (my $other = cf::player::find $who->{ext_last_tell}) { |
215 | |
211 | |
216 | if ($args) { |
212 | if ($args) { |
217 | $other->ob->{ext_ignore_tell}{$name} >= time |
213 | $other->ob->{ext_ignore_tell}{$name} >= time |
218 | or delete $other->ob->{ext_ignore_tell}{$name}; |
214 | or delete $other->ob->{ext_ignore_tell}{$name}; |
219 | |
215 | |