… | |
… | |
71 | mkdir cf::localdir . "/" . cf::uniquedir; |
71 | mkdir cf::localdir . "/" . cf::uniquedir; |
72 | mkdir $RANDOM_MAPS; |
72 | mkdir $RANDOM_MAPS; |
73 | |
73 | |
74 | # a special map that is always available |
74 | # a special map that is always available |
75 | our $LINK_MAP; |
75 | our $LINK_MAP; |
76 | |
76 | our $EMERGENCY_POSITION; |
77 | our $EMERGENCY_POSITION = $cf::CFG{emergency_position} || ["/world/world_105_115", 5, 37]; |
|
|
78 | |
77 | |
79 | ############################################################################# |
78 | ############################################################################# |
80 | |
79 | |
81 | =head2 GLOBAL VARIABLES |
80 | =head2 GLOBAL VARIABLES |
82 | |
81 | |
… | |
… | |
1988 | open my $fh, "<:utf8", cf::confdir . "/config" |
1987 | open my $fh, "<:utf8", cf::confdir . "/config" |
1989 | or return; |
1988 | or return; |
1990 | |
1989 | |
1991 | local $/; |
1990 | local $/; |
1992 | *CFG = YAML::Syck::Load <$fh>; |
1991 | *CFG = YAML::Syck::Load <$fh>; |
|
|
1992 | |
|
|
1993 | $EMERGENCY_POSITION = $CFG{emergency_position} || ["/world/world_105_115", 5, 37]; |
|
|
1994 | |
|
|
1995 | if (exists $CFG{mlockall}) { |
|
|
1996 | eval { |
|
|
1997 | $CFG{mlockall} ? &mlockall : &munlockall |
|
|
1998 | and die "WARNING: m(un)lockall failed: $!\n"; |
|
|
1999 | }; |
|
|
2000 | warn $@ if $@; |
|
|
2001 | } |
1993 | } |
2002 | } |
1994 | |
2003 | |
1995 | sub main { |
2004 | sub main { |
1996 | # we must not ever block the main coroutine |
2005 | # we must not ever block the main coroutine |
1997 | local $Coro::idle = sub { |
2006 | local $Coro::idle = sub { |