Skip to content

Instantly share code, notes, and snippets.

@giuseppeg
Created March 23, 2021 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuseppeg/96700340d0d12f9b5675bf427e14436b to your computer and use it in GitHub Desktop.
Save giuseppeg/96700340d0d12f9b5675bf427e14436b to your computer and use it in GitHub Desktop.
Old mIRC script to check for lag I wrote when I was a teenager
on 1:connect: {
if (%Lagchk == on) { .timerLAG 0 %Lag.secs lagcheck }
}
alias lagcheck { .ctcpreply $me LAGGC $ticks }
on *:CTCPREPLY:LAGGC*: { if ($nick == $me) { set %lag $round($calc((($ticks - $2) / 2) / 1000),2) | echo -a $timestamp lag: %lag $+ secs.. | halt } }
alias lag {
if ($1 == on) { /set %lagchk on | echo -a Lag Meter: on. | goto { end } }
if ($1 == off) { /set %lagchk off | echo -a Lag Meter: off. | goto { end } }
if ($1 == delay) { set %Lag.secs $2 | echo -a Lag Meter: checking every: $2 $+ secs. | goto { end } }
if ($1 == help) { goto { help } }
if ($1 == stats) { goto { stats } }
if ($1 != on) && ($1 != off) && ($1 != delay) && ($1 != help) && ($1 != stats) { goto { help } }
:stats
echo -a -
echo -a Lag Meter..
echo -a $chr(160) $chr(160) status: %Lagchk
echo -a $chr(160) $chr(160) delay: %Lag.secs $+ secs..
echo -a -
goto { end }
:help
echo -a -
echo -a Lag Checker..
echo -a digita /lag più:
echo -a $chr(160) $chr(160) on - per attivare il lag checker
echo -a $chr(160) $chr(160) off - per disattivare il lag checker
echo -a $chr(160) $chr(160) delay sec(s) - per impostare il delay tra un check e l'altro
echo -a $chr(160) $chr(160) stats - per visualizzare le informazioni sullo stato del lag checker
echo -a $chr(160) $chr(160) help - per visualizzare la guida
echo -a -
:end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment