… | |
… | |
68 | . ($pl->peaceful ? " [peaceful]" : " [HOSTILE]") |
68 | . ($pl->peaceful ? " [peaceful]" : " [HOSTILE]") |
69 | . ($ns->afk ? " [AFK]" : "") |
69 | . ($ns->afk ? " [AFK]" : "") |
70 | . ($ob->flag (cf::FLAG_WIZ) ? " [WIZ]" : "") |
70 | . ($ob->flag (cf::FLAG_WIZ) ? " [WIZ]" : "") |
71 | . " [" . $pl->ns->version . "]" |
71 | . " [" . $pl->ns->version . "]" |
72 | . " [" . ($pl->peaceful || $privileged ? $ob->map->visible_name : $ob->region->name) . "]" |
72 | . " [" . ($pl->peaceful || $privileged ? $ob->map->visible_name : $ob->region->name) . "]" |
73 | . (sprintf " [rtt %.3fs]", $pl->ns->rtt * 1e-6) |
73 | . (sprintf " [rtt %.3fs]", $pl->ns->tcpi_rtt * 1e-6) |
74 | . ($privileged ? " " . $pl->ns->host : "") |
74 | . ($privileged ? " " . $pl->ns->host : "") |
75 | } sort { (lc $a->ob->name) cmp (lc $b->ob->name) } @pl |
75 | } sort { (lc $a->ob->name) cmp (lc $b->ob->name) } @pl |
76 | ), |
76 | ), |
77 | eval { "* IRC: " . join ", ", ext::irc::users }, |
77 | eval { "* IRC: " . join ", ", ext::irc::users }, |
78 | ) |
78 | ) |
… | |
… | |
288 | |
288 | |
289 | return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK) |
289 | return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK) |
290 | unless $arg > 0; |
290 | unless $arg > 0; |
291 | |
291 | |
292 | # minimum is 5k/s |
292 | # minimum is 5k/s |
|
|
293 | # maximum is 100k/s, this should be configurable |
293 | $ob->contr->ns->max_rate ((List::Util::max 5000, $arg) * $cf::TICK); |
294 | $ob->contr->ns->max_rate ((List::Util::max 5000, List::Util::min 100000, $arg) * $cf::TICK); |
294 | $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK); |
295 | $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK); |
295 | |
296 | |
296 | 1 |
297 | 1 |
297 | }; |
298 | }; |
298 | |
299 | |