… | |
… | |
66 | $Storable::canonical = 1; # reduce rsync transfers |
66 | $Storable::canonical = 1; # reduce rsync transfers |
67 | Coro::State::cctx_stacksize 256000; # 1-2MB stack, for deep recursions in maze generator |
67 | Coro::State::cctx_stacksize 256000; # 1-2MB stack, for deep recursions in maze generator |
68 | |
68 | |
69 | $Coro::main->prio (Coro::PRIO_MAX); # run main coroutine ("the server") with very high priority |
69 | $Coro::main->prio (Coro::PRIO_MAX); # run main coroutine ("the server") with very high priority |
70 | |
70 | |
71 | { |
71 | # make sure c-lzf reinitialises itself |
72 | # very ugly, but ensure we acquire the storable lock |
|
|
73 | |
|
|
74 | sub net_mstore { |
|
|
75 | my $guard = Coro::Storable::guard; |
|
|
76 | &Storable::net_mstore |
|
|
77 | } |
|
|
78 | |
|
|
79 | sub mretrieve { |
|
|
80 | my $guard = Coro::Storable::guard; |
|
|
81 | &Storable::mretrieve |
|
|
82 | } |
|
|
83 | |
|
|
84 | Compress::LZF::set_serializer "Coro::Storable", "cf::net_mstore", "cf::mretrieve"; |
72 | Compress::LZF::set_serializer "Storable", "Storable::net_mstore", "Storable::mretrieve"; |
85 | Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later |
73 | Compress::LZF::sfreeze_cr { }; # prime Compress::LZF so it does not use require later |
86 | } |
|
|
87 | |
74 | |
88 | sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload |
75 | sub WF_AUTOCANCEL () { 1 } # automatically cancel this watcher on reload |
89 | |
76 | |
90 | our %COMMAND = (); |
77 | our %COMMAND = (); |
91 | our %COMMAND_TIME = (); |
78 | our %COMMAND_TIME = (); |
… | |
… | |
2784 | id => "infobox", |
2771 | id => "infobox", |
2785 | title => "Body Parts", |
2772 | title => "Body Parts", |
2786 | reply => undef, |
2773 | reply => undef, |
2787 | tooltip => "Shows which body parts you posess and are available", |
2774 | tooltip => "Shows which body parts you posess and are available", |
2788 | }, |
2775 | }, |
|
|
2776 | "c/skills" => { |
|
|
2777 | id => "infobox", |
|
|
2778 | title => "Skills", |
|
|
2779 | reply => undef, |
|
|
2780 | tooltip => "Shows your experience per skill and item power", |
|
|
2781 | }, |
2789 | "c/uptime" => { |
2782 | "c/uptime" => { |
2790 | id => "infobox", |
2783 | id => "infobox", |
2791 | title => "Uptime", |
2784 | title => "Uptime", |
2792 | reply => undef, |
2785 | reply => undef, |
2793 | tooltip => "How long the server has been running since last restart", |
2786 | tooltip => "How long the server has been running since last restart", |