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

Comparing cf.schmorp.de/server/lib/cf.pm (file contents):
Revision 1.290 by root, Mon Jul 2 03:15:30 2007 UTC vs.
Revision 1.293 by root, Tue Jul 3 05:14:15 2007 UTC

1400 # replace G<male|female> tags 1400 # replace G<male|female> tags
1401 || s{G<([^>|]*)\|([^>]*)>}{ 1401 || s{G<([^>|]*)\|([^>]*)>}{
1402 $self->gender ? $2 : $1 1402 $self->gender ? $2 : $1
1403 }ge 1403 }ge
1404 # replace H<hint text> 1404 # replace H<hint text>
1405 || s/H<([^\>]*)>/<fg name="lightblue">[$1]<\/fg>/g; 1405 || s{H<([^\>]*)>}
1406 {
1407 ("<fg name=\"lightblue\">[$1 (Use hintmode to suppress hints)]</fg>",
1408 "<fg name=\"lightblue\">[Hint suppressed, see hintmode]</fg>",
1409 "")
1410 [$self->{hintmode}]
1411 }ge;
1406 1412
1407 # create single paragraphs (very hackish) 1413 # create single paragraphs (very hackish)
1408 s/(?<=\S)\n(?=\w)/ /g; 1414 s/(?<=\S)\n(?=\w)/ /g;
1409 1415
1416 # compress some whitespace
1417 1 while s/\s*\n\s*\n\s*/\n/;
1418
1419 s/^\s+//;
1420 s/\s+$//;
1421
1410 $_ 1422 $_
1423}
1424
1425sub hintmode {
1426 $_[0]{hintmode} = $_[1] if @_ > 1;
1427 $_[0]{hintmode}
1411} 1428}
1412 1429
1413=item $player->ext_reply ($msgid, %msg) 1430=item $player->ext_reply ($msgid, %msg)
1414 1431
1415Sends an ext reply to the player. 1432Sends an ext reply to the player.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines