'// BANKICKUNBAN '// Returns a string corresponding to the success or failure of a ban attempt. '// Responses should be directly queued using AddQ(). '// Example response strings: '// That user is safelisted. '// The bot does not have ops. '// /ban thePerson Your mother! '// Variable descriptions: '// INPT - Contains the username of the person followed by any extension to it, such as ban message '// - Examples: "thePerson Your Mother has a very extremely unequivocally long ban message!" '// - "thePerson" '// - "thePerson Short ban message '// SPEAKERACCESS contains the access of the person attempting to ban/kick. This is not applied in '// unban situations. '// In Kick and Ban situations, the target's access must be less than or equal to '// this value -- use it to control inherent safelisting (ie all users with > 20 access '// are not affected by it) '// MODE contains the purpose of the subroutine call. The same routine is used to ban, kick and '// unban users, so make that choice when calling it. '// Ban = 0; Kick = 1; Unban = 2. Any other value will cause the function to die a horrible '// death. (not really, it just won't do anything.) Public Function BanKickUnban(ByVal Inpt As String, ByVal SpeakerAccess As Integer, _ Optional ByVal Mode As BanTypes = 0) As String BanKickUnban = Ban(Inpt, SpeakerAccess, CByte(Mode)) End Function
This function can be used to ban, kick, or unban a user.
Response = BanKickUnban(Inpt, SpeakerAccess, [Mode])
- Inpt is the name of the user, or the name of the user with a reason, separated by a space.
- SpeakerAccess is the numeric rank of the speaker's action. If it is less than the user who is being banned or kicked, this function will fail.
- Mode is an integer you provide to choose which action to execute.
- 0 = ban the user with the reason.
- 1 = kick the user with the reason.
- 2 = unban the user.
This function will return a string that you normally send to Battle.net as a response to the ban, kick, or unban action. It is the "/ban", "/kick", or "/unban" command, or an "Error: error message" message.