Wouldn't curuser.kick kick the person who used the !kick command?
Anyway, by looking at other works is how i figured out how to fix it; in fact, that's how i started the bot in the first place. Anyway, I have another problem on my hands now. See, I want it to PM the person being kicked when they get kicked, but that doesn't work. No matter where I put the line to PM them, if the kick is successful, they don't get the message:
Code: Select all
Case "!kick"
If sText="" Then
curUser.PrivateMessage cstr(sBotName), "On whom would you like to cast kick???"
colUsers.SendChatToAll cstr(sBotName), cstr(curUser.sName)+" has attempted to cast kick on... nobody"
Else
sUser=cstr(sText)
If curUser.bOperator Then
curUser.PrivateMessage CStr(sBotName), "Attempting to cast Kick on "+sUser+"."
If colUsers.Online(CStr(sUser)) Then
colUsers.ItemByName(cstr(sUser)).PrivateMessage cstr(sBotName), cstr(curUser.sName)+" has attempted to cast Kick on you."
If colUsers.ItemByName(cstr(sUser)).bOperator Then
curUser.PrivateMessage CStr(sBotName), sUser+" is an Operator. Operators are immune to the Kick spell >:("
Else
curUser.PrivateMessage CStr(sBotName), sUser+" is present."
colUsers.ItemByName(CStr(sUser)).Kick
colUsers.SendChatToAll cstr(sBotName), "Kick has been successfully cast on "+cstr(sUser)+" by "+curUser.sName+" XD."
curUser.PrivateMessage CStr(sBotName), "Spell Successful"
End If
Else
curUser.PrivateMessage CStr(sBotName), sUser+" is NOT present. Spell was unsuccessful."
End If
Else
curUser.PrivateMessage CStr(sBotName), "You do not have enough MP to cast the Kick spell!"
End If
End If
It's supposed to send the message to the person right after it finds out if they're online, happens before they actually get kicked, but it doesn't send the message. It does send the message to other operators, and myself, when someone uses it.
--SKoRPioN9x, Thy superior.