reconnect.pl

来自「Unix下的MUD客户端程序」· PL 代码 · 共 31 行

PL
31
字号
# Automatically reconnect when the MUD drops the link on you# THIS IS NOT WORKING TOO WELL. USE AT OWN RISK.# Commands that quell reconnection for 30 seconds@QuellCommands = qw/quit reboot/;$quell_reconnect_time = 0;sub reconnect_action {    return if $now < $quell_reconnect_time;    # Dont try again for a while    $quell_reconnect_time = $now + 30;    print "Reconnecting in 5 seconds.\n";    $ReconnectCancelled = 0;    callout_once(sub {mcl_reopen(); }, 5);}sub quell_reconnect {    print "Quelling reconnect.\n";    $quell_reconnect_time = $now + 30;    return 0;}loselink_add(\&reconnect_action);foreach (@QuellCommands) {    command_add(\&quell_reconnect,$_);}1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?