How to ignore unwanted messages:
/mode your-nick-here +Rc will block unregisrered users (R), and those who are not in the same rooms you are in (c)
/ignore nickname for messages in the channel from the specified nickname
/ignore nickname 3 for messages in the channel from the specified nickname's IP
/silence +nickname to block pvts and notices from that nickname.
/silence + without any nickname will usually block ALL private messages.
You can also try mode d (example: /mode your-nick +d ), This will block ALL messages and notices from any nicks. (essentially the same as /silence +)
/silence +nickname a (including the "a" at the end, will block you from having to read what the nickname says in the channel.
The /silence commands are usually the best to use if you are repeatedly harassed, as they block at the server level, however, if you use the /silence options, they reset if you or the person you are blocking disconnects.
Using the /ignore commands only block at your pc end, however, if you are using an mIRC-based script, most such scripts will 'save' your ignore settings, until you change them, so you may not have to keep resetting the nicknames you put on ignore.