--- deliantra/Deliantra-Client/DC/Protocol.pm 2007/09/01 08:01:08 1.170 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2007/09/02 08:44:28 1.174 @@ -12,8 +12,6 @@ use CFPlus::Macro; use CFPlus::Item; -use Crossfire::Protocol::Base 0.95; - use base 'Crossfire::Protocol::Base'; sub new { @@ -23,8 +21,9 @@ setup_req => { extmap => 1, excmd => 1, - xwidget2 => 1,#d# + #xwidget2 => 1,#d# %{$arg{setup_req} || {}}, + msg => 0, }, ); @@ -971,7 +970,11 @@ local $_ = shift; # we now weed out all tags we do not support - s%<(?!/?i>|/?u>|/?b>|fg |/fg>)%<%g; + s{ <(?! /?i> | /?u> | /?b> | /?big | /?small | /?s | /?tt | fg\ | /fg>) + }{ + "<" + }gex; + # now all entities s/&(?!amp;|lt;|gt;|apos;|quot;|#[0-9]+;|#x[0-9a-fA-F]+;)/&/g; @@ -1036,14 +1039,18 @@ for (split /\n/, $text) { ::message ({ - fg => $fg, - markup => $_, - type => $type, - extra => [@extra], - color_flags => $color + fg => $fg, + markup => $_, + type => $type, + extra => [@extra], + color_flags => $color, #d# ugly, kill }); $color &= ~NDI_CLEAR; # only clear once for multiline messages + # actually, this is an ugly design. _we_ should control the channels, + # not some random other widget, as the channels are clearly protocol-specific. + # then we could also react to flags such as CLEAR without resorting to + # hacks such as color_flags, above. } $self->{statusbox}->add ($text, @@ -1051,7 +1058,7 @@ fg => $fg, timeout => $color >= 2 ? 180 : 10, tooltip_font => $::FONT_FIXED, - ); + ) if $type eq "info"; } }