Before I spend more time on this two things:
1. the code I gave you last, does that do sorta what you want to do?
2. one big problem you have with your code that keeps coming back is that you echo the nick the moment you are detecting it is offline, therefor it will always echo regardless of whether he's online on another server. You have to fix that the way I described in my last post.