--- deliantra/server/lib/cf.pm 2007/07/27 10:10:51 1.322 +++ deliantra/server/lib/cf.pm 2007/07/28 14:32:22 1.325 @@ -1923,6 +1923,9 @@ $self->activate; } + $self->{last_save} = $cf::RUNTIME; + $self->last_access ($cf::RUNTIME); + $self->in_memory (cf::MAP_IN_MEMORY); } @@ -2514,7 +2517,7 @@ $msg = $self->pl->expand_cfpod ($msg); - $color &= ~cf::NDI_UNIQUE; # just in case... + $color &= cf::NDI_CLIENT_MASK; # just in case... if (ref $channel) { # send meta info to client, if not yet sent @@ -2529,19 +2532,26 @@ return unless @extra || length $msg; if ($self->can_msg) { - $self->send_packet ("msg " . $self->{json_coder}->encode ([$color, $channel, $msg, @extra])); - } else { - # replace some tags by gcfclient-compatible ones - for ($msg) { - 1 while - s/([^<]*)<\/b>/[b]${1}[\/b]/ - || s/([^<]*)<\/i>/[i]${1}[\/i]/ - || s/([^<]*)<\/u>/[ul]${1}[\/ul]/ - || s/([^<]*)<\/tt>/[fixed]${1}[\/fixed]/ - || s/([^<]*)<\/fg>/[color=$1]${2}[\/color]/; - } + # default colour, mask it out + $color &= ~(cf::NDI_COLOR_MASK | cf::NDI_DEF) + if $color & cf::NDI_DEF; + $self->send_packet ("msg " . $self->{json_coder}->encode ( + [$color & cf::NDI_CLIENT_MASK, $channel, $msg, @extra])); + } else { if ($color >= 0) { + # replace some tags by gcfclient-compatible ones + for ($msg) { + 1 while + s/([^<]*)<\/b>/[b]${1}[\/b]/ + || s/([^<]*)<\/i>/[i]${1}[\/i]/ + || s/([^<]*)<\/u>/[ul]${1}[\/ul]/ + || s/([^<]*)<\/tt>/[fixed]${1}[\/fixed]/ + || s/([^<]*)<\/fg>/[color=$1]${2}[\/color]/; + } + + $color &= cf::NDI_COLOR_MASK; + if (0 && $msg =~ /\[/) { $self->send_packet ("drawextinfo $color 4 0 $msg") } else {