lag bar:
ping the server and return the info the way you want?
clone scan:
who #channel
store & parse raw results

and with google you can find both of these scripts within minute, with so many comments that even my granny can write a script out of 'em

//if ( khaled isgod ) echo yes | else echo no