Here\'s one that I made for the nicklist,http://www.hawkee.com/snippet.php?snippet_id=670 and one xdaemon made for the command linehttp://www.hawkee.com/snippet.php?snippet_id=696
Just for examples of how this code could be made a bit shorter.