The core functionality of the code was written by another a couple of years ago. I was taking what I was understanding of it and editing it slightly (like personal messages and channels to apply it to etc). Don't know enough about mirc to accurately begin to debug

This wasn't the entire code being used hence mismatched {} being shown. The rest is either redundant or completely irrelevant so I didn't add it to the example.