If you could answer the following questions it may help narrow down the issue:
Does this issue happen with a clean install of the official version of mIRC v6.35 from the mIRC website, with no scripts or addons? If you are using anything else, it will be impossible to track down the issue.
Are you downloading large files? If you are, your anti-virus software will freeze mIRC at the end of each download while it scans the downloaded files.
Are you connecting to the server using an SSL secure connection? If you are, does the issue still happen if you use a non-SSL connection?