ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.291 by root, Tue Jul 3 00:54:44 2007 UTC vs.
Revision 1.296 by root, Wed Jul 4 07:09:06 2007 UTC

1412 1412
1413 # create single paragraphs (very hackish) 1413 # create single paragraphs (very hackish)
1414 s/(?<=\S)\n(?=\w)/ /g; 1414 s/(?<=\S)\n(?=\w)/ /g;
1415 1415
1416 # compress some whitespace 1416 # compress some whitespace
1417 1 while s/\s*\n\s*\n\s*/\n/; 1417 s/\s+\n/\n/g; # ws line-ends
1418 s/\n\n+/\n/g; # double lines
1419 s/^\n+//; # beginning lines
1420 s/\n+$//; # ending lines
1418 1421
1419 $_ 1422 $_
1420} 1423}
1421 1424
1422sub hintmode { 1425sub hintmode {
1423 warn "hm<$_[0] $_[1]>\n";#d#
1424 $_[0]{hintmode} = $_[1] if @_ > 1; 1426 $_[0]{hintmode} = $_[1] if @_ > 1;
1425 $_[0]{hintmode} 1427 $_[0]{hintmode}
1426} 1428}
1427 1429
1428=item $player->ext_reply ($msgid, %msg) 1430=item $player->ext_reply ($msgid, %msg)
2355 my $hp = $exit->stats->hp; 2357 my $hp = $exit->stats->hp;
2356 my $sp = $exit->stats->sp; 2358 my $sp = $exit->stats->sp;
2357 2359
2358 $self->enter_link; 2360 $self->enter_link;
2359 2361
2362 # if exit is damned, update players death & WoR home-position
2363 $self->contr->savebed ($slaying, $hp, $sp)
2364 if $exit->flag (FLAG_DAMNED);
2365
2360 (async { 2366 (async {
2361 $self->deactivate_recursive; # just to be sure 2367 $self->deactivate_recursive; # just to be sure
2362 unless (eval { 2368 unless (eval {
2363 $self->goto ($slaying, $hp, $sp); 2369 $self->goto ($slaying, $hp, $sp);
2364 2370
2404 2410
2405sub cf::client::send_msg { 2411sub cf::client::send_msg {
2406 my ($self, $color, $type, $msg, @extra) = @_; 2412 my ($self, $color, $type, $msg, @extra) = @_;
2407 2413
2408 $msg = $self->pl->expand_cfpod ($msg); 2414 $msg = $self->pl->expand_cfpod ($msg);
2415
2416 return unless @extra || length $msg;
2409 2417
2410 if ($self->can_msg) { 2418 if ($self->can_msg) {
2411 $self->send_packet ("msg " . $self->{json_coder}->encode ([$color, $type, $msg, @extra])); 2419 $self->send_packet ("msg " . $self->{json_coder}->encode ([$color, $type, $msg, @extra]));
2412 } else { 2420 } else {
2413 # replace some tags by gcfclient-compatible ones 2421 # replace some tags by gcfclient-compatible ones

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines