Ok got it (mostly) working now, it detects the end of users and echos a message to the status window.
It didn't work at 1st, until I realised I had put the raw 366 line within the on join (stupid me). Once I figurred that out, it detects and responds to the message for the identified channel. I didn't use #idlerpg as my test target, too many penalty point for parting and rejoining, but the main thing is it works.
I'll put the logon to game section in place tomorrow, but I am happily relieved that there is a solution.

Thank you very much