Just for comparison sake, there are other IRCOp snippets:
http://www.hawkee.com/snippet.php?snippet_id=1097