Frequently Asked Questions (FAQ)

Server went down with error `Can't use an undefined value as a symbol reference at /usr/lib/perl5/5.00503/i386-linux/IO/Select.pm line 204.'

Install 1.14 or later version of IO::Select perl module.

How to change the points players get?

Points are calculated at WinlistCalculate() function in the pts.pl. Especially the following lines calculate the normal game's points:

    my $winners = scalar @{$rank[0]}; # the number of winner players
    my $starters = scalar @{$ch->{game}{start}}; # the number of started players
    my $points = round(($starters / $winners) * 0.5, SCOREDECIMAL);

How to add a new command?

For example, if you want a command `/features' that displays `features.txt',

  1. In all files in the locale directory, add the following two lines:
    FormatFeatures=%0%1
    ExplainFeatures=Displays features
  2. In `pts.ini', add the following two options: `[Command] Features=1' and `[FilePath] features=features.txt'.
  3. In `pts.pl', at first add a line
        features => \&OnPlFeatures,
    in PlCommands() function. Secondly, add a function OnPlFeatures():
    sub OnPlFeatures {
      my ($s, $msg, $page) = @_;
      my ($cmd) = split(/ +/, $msg, 2);
    
      SendFromFile($s, 'features');
    }

That's all.


Copyleft 2001-2002 DEQ <deq@oct.zaq.ne.jp>