1) There is an OPConnected and an NewUserConnected Sub, but I don't think there is an OPDisconnected Sub. Someone posted an exhaustive list of all subs and objects not too long ago, but I can't get my hands on it anymore. Argh ! Well, the OPDisconnected Sub isn't mentioned in the help.script "documentation" anyway; so unless I'm mistaken, it doesn't exist, and you should instead use the DataArival Sub and check for a $Quit string.
2) curUser typically refers to the "curent user" (the one who trigered the sub). That's one single user, so you can't "CurUser.SendToAll". You were probably thinking of colUsers, which is a collection of all the users in the hub and has indeed a "SendToAll" method.
So replace the line :
curUser.SendToAll "<[uF]> Paul_Don has left"
With the line :
colUsers.SendToAll "<[uF]> Paul_Don has left"
3) The line :
Code: Select all
ChatToAll curUser, "[uF]", "" & curUser.sName & " Went bye byes
has a few errors in it :
a) First, unless you actually have a Sub or a Function in your script called ChatToAll, you can't just "ChatToAll" out of nowhere =) I will assume you wanted to go with colUsers.SendChatToAll
b) SendChatToAll has 2 parameters, the person apparently sending (apparently, because it's actually the script sending it), and the message. Those 2 parameters are separated by 1 comma. In your command, you use 2 commas, so you actually send 3 parameters. I will assume you intended to have the message sent by [uF], and consequently drop your first parameter (i.e. curUser).
c) you don't need to start the message string with a blank string and the name of the current user ("" &curUser.sName) ... You can go directly with curUser.sName
d) & " Went bye byes is an unfinished string. You need to finish it with a lill " at the end. Like that : & "went bye byes"
e) If I guessed your intentions properly, that line should consequently become :
Code: Select all
colUser.SendChatToAll "[uF]", curUser.sName &" went byes bye"