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.73 by root, Sun Oct 1 11:46:51 2006 UTC vs.
Revision 1.76 by root, Mon Oct 2 15:28:36 2006 UTC

26our $TICK = MAX_TIME * 1e-6; 26our $TICK = MAX_TIME * 1e-6;
27our $TICK_WATCHER; 27our $TICK_WATCHER;
28our $NEXT_TICK; 28our $NEXT_TICK;
29 29
30our %CFG; 30our %CFG;
31
32our $uptime;
33
34$uptime ||= time;
31 35
32############################################################################# 36#############################################################################
33 37
34=head2 GLOBAL VARIABLES 38=head2 GLOBAL VARIABLES
35 39
770sub cf::player::exists($) { 774sub cf::player::exists($) {
771 cf::player::find $_[0] 775 cf::player::find $_[0]
772 or -f sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($_[0]) x 2; 776 or -f sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($_[0]) x 2;
773} 777}
774 778
775=item $player->reply ($npc, $msg[, $flags]) 779=item $object->reply ($npc, $msg[, $flags])
776 780
777Sends a message to the player, as if the npc C<$npc> replied. C<$npc> 781Sends a message to the player, as if the npc C<$npc> replied. C<$npc>
778can be C<undef>. Does the right thing when the player is currently in a 782can be C<undef>. Does the right thing when the player is currently in a
779dialogue with the given NPC character. 783dialogue with the given NPC character.
780 784
1035 open my $fh, "<:utf8", cf::confdir . "/config" 1039 open my $fh, "<:utf8", cf::confdir . "/config"
1036 or return; 1040 or return;
1037 1041
1038 local $/; 1042 local $/;
1039 *CFG = YAML::Syck::Load <$fh>; 1043 *CFG = YAML::Syck::Load <$fh>;
1040
1041 use Data::Dumper; warn Dumper \%CFG;
1042} 1044}
1043 1045
1044sub main { 1046sub main {
1045 cfg_load; 1047 cfg_load;
1046 db_load; 1048 db_load;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines