This is a simple debugger that toggles 'echo' functionality in mIRC when debugging.
Rather than writing "echo -a your message" in your scripts, you can write $v(your message) instead, and the echo output can be turned on and off via "/verbose on" or "/verbose off".
Supports $v(%things $1 like $2 %this too)
When needing to echo something that would only be needed for deep debugging [e.g. echoing the count in a while loop, or echoing a $read(very large file)], use $vx(your very very long output) instead, and toggle the $vx() output via "/verbose high" or "/verbose low".
To get the status of verbose at any time, type "/verbose status" or include $verbose(status) in your scripts.
; Verbose debugger for mIRC
;
; by fanfare@jollo.org (pgp 0xEB1CDE57)
;
; rather than using "echo" for debugging,
; use: $v(your comment here) and it will echo 'your comment here' just like echo does..
; except, you can toggle your comments with "/verbose on" or "/verbose off"
alias verbose {
if ( $1 = status ) {
;echos verbose status
echo -at $iif(%v,$chr(3) $+ 7 $+ basic verbose is on,$chr(3) $+ 7 $+ basic verbose is off) $chr(3) $+ 8 $+ & $iif(%vx,$chr(3) $+ 13 $+ high verbose is on,$chr(3) $+ 13 $+ high verbose is off)
halt
}
if ( $1 = on ) {
;turns verbose on
set %v 1
echo -at $chr(3) $+ 7 $+ verbose is now on
halt
}
if ( $1 = off ) {
;turns verbose off
unset %v
echo -at $chr(3) $+ 7 $+ verbose is now off
halt
}
if ( $1 = high ) {
;turns high verbose on
set %vx 1
echo -at $chr(3) $+ 13 $+ high verbose is now on
halt
}
elseif ( $1 = low ) {
;turns high verbose off
unset %vx
echo -at $chr(3) $+ 13 $+ high verbose is now off
halt
}
if (%v) {
;toggles verbose
unset %v
echo -at $chr(3) $+ 7 $+ verbose is now off
halt
}
else {
;toggles verbose
set %v 1
echo -at $chr(3) $+ 7 $+ verbose is now on
halt
}
}
alias vx {
;high verbose output for deep debugging!!!
;use $vx() sparingly on output that is line-intensive (e.g. used in a while loop, or reading a file, etc)
if (%v) && (%vx) {
echo -at $1-
}
else {
return
}
}
alias v {
if (%v) {
echo -at $1-
}
else {
return
}
}
I hope this script might be handy for you.
I personally don't see a need for this comment.