The second code pasted may appear to "not work" because it will only trigger for channel messages. If the rest of your code works, then that will work. If your ".login" displays "You are already logged in", then you need to think about initialising %adminstatus because it might evaluate (return isn't quite the right word) to $null. In this case you're also likely to recieve "You aren't logged in" when you try to ".logout".

edit: read /help moar, and manually iterate over each branch putting "echo" code around the place if you want to debug it quickly.

Last edited by s00p; 03/09/09 11:25 AM.