;This alias counts the number of lines of self written code and messages the channel with the result.
;usage is from a event only that produces a $chan value.
alias codedlines {
;
;Loop Counter set below
var %i = 1
;
;Total lines count set below
var %total = 0
;
;loop untill no file is located using $findfile, based on loop counter number
while $findfile($mircdir,LethPhaos Script -- *.mrc,%i) {
;
; Code enters here only if a file exists
;
;Add tot total lines the number of lines in the current file
%total = $calc($lines($v1) + %total)
;
;increment the loop counter for the next file
inc %i
;
;loop ends return to top of loop
}
;
;Display the number of lines of self-written code to $chan, which means this must be beiong called from a event.
msg $chan My mIRC is extended with %total lines of self-written code.
;
;alias ends.
}