-
Notifications
You must be signed in to change notification settings - Fork 4
III.3.d. Users
- Ban a user
- Delete all user threads and posts on selected boards
- Register a user
- Update a register user access levels
- Unregister a user
/action/banUser
Sets the specified user's ban levels for each of the specified boards. If the ban level for a board is not specified, the user is considered not banned on that board. Ban levels on a board you do not have access to are not changed if not specified (if specified, an error is raised). Returns an empty object.
Note: Your access level must be MODER or higher, and higher than the level of the target user.
The required fields are:
-
userIpIP address of the user to ban. May be specified either in IPv4 or IPv6 form.
Ban levels for each board are specified using the set of the following fields:
-
banBoard_BOARDName of the board to ban a user on. TheBOARDpart of the field name must match it's value. -
banLevel_BOARDBan level on the corresponding board. Optional. TheBOARDpart of the field name must match theBOARDpart of the field name of thebanBoard_BOARDfield. Possible values:
-
NONEOr any other value. The user will not be banned. The default. -
READ_ONLYThe user will only be able to read threads/posts. -
NO_ACCESSThe user will not be able to create or read threads/posts.
-
banExpires_BOARDTime (in theYYYY/MM/DD HH:mmformat) when the ban expires. Optional. TheBOARDpart of the field name must match theBOARDpart of the field name of thebanBoard_BOARDfield. -
banReason_BOARDBan reason. Astring. Optional. TheBOARDpart of the field name must match theBOARDpart of the field name of thebanBoard_BOARDfield. -
banPostNumber_BOARDNumber of the post for which the user is to be banned. Optional. If specified, the corresponding mark will be added to the post. TheBOARDpart of the field name must match theBOARDpart of the field name of thebanBoard_BOARDfield.
Example:
/action/banUser { userIp=192.168.0.2&banBoard_b=b&banLevel_b=READ_ONLY&banReason_b=faggot }
{}
On any error, an error object is returned.
Example:
/action/banUser { userIp=192.168.0.2&banBoard_c=c&banLevel_c=READ_ONLY }
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "Invalid board"
}
/action/delall
Deletes all user's threads and posts on the specified boards. Returns an empty object.
Note: Your access level must be MODER or higher, and higher than the level of the target user.
The required fields are:
-
userIpIP address of the user whose posts are subject to deletion.
Fields specifying the selected boards should follow the template: board_BOARD, where the BOARD part is a board name, and is equal to the field's value.
Example:
/action/delall { userIp=192.168.0.3&board_b=b&board_d=d }
{}
On any error, an error object is returned.
/action/delall { userIp=192.168.0.3&board_b=b&board_c=c }
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "Invalid board"
}
/api/registerUser
Registers a user, assigning the access levels for each board. Returns an object containing the user's hashpass.
Note: Your access level must be SUPERUSER.
The required fields are:
-
passwordEither a password or a hashpass. The password is stored as a SHA-1 hash in the database. Hashpass is recognized automatically.
The optional fields are:
-
ipsThe list of IP addresses separated by spaces. These addresses are used to prevent the deletion of user posts by another user (accidentally or intentionally). May be specified in either IPv4 or IPv6 form.
Access levels for each board are specified using the set of the following fields:
-
accessLevelBoard_BOARDName of the board to assign the user's access level on. TheBOARDpart of the field name must match it's value. -
accessLevel_BOARDAccess level of the user on the corresponding board. Optional. TheBOARDpart of the field name must match theBOARDpart of the field name of theaccessLevelBoard_BOARDfield. Possible values:
-
NONEThe user will not have any special privileges. The default. -
USERThe user will have minimal registered user priveleges. See Registration and access levels for details. -
MODERThe user will have moderator privileges. See Registration and access levels for details. -
ADMINThe user will have administrator privileges. See Registration and access levels for details.
Example:
/api/registerUser { password=****************&accessLevelBoard_b=b&accessLevel_b=MODER&ips=192.168.0.1 }
{
"hashpass": "****************************************"
}
On any error, an error object is returned.
Example:
/api/registerUser { password=****************&accessLevelBoard_c=c&accessLevel_c=MODER }
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "Invalid board"
}
/api/updateRegisteredUser
Updates a registered user access level information, assigning the access levels for each board. Returns an empty object.
Note: Your access level must be SUPERUSER.
The required fields are:
-
hashpassThe hashpass of the user.
The optional fields are:
-
ipsThe list of IP addresses separated by spaces. These addresses are used to prevent the deletion of user posts by another user (accidentally or intentionally). May be specified in either IPv4 or IPv6 form.
Access levels for each board are specified using the set of the following fields:
-
accessLevelBoard_BOARDName of the board to assign the user's access level on. TheBOARDpart of the field name must match it's value. -
accessLevel_BOARDAccess level of the user on the corresponding board. Optional. TheBOARDpart of the field name must match theBOARDpart of the field name of theaccessLevelBoard_BOARDfield. Possible values:
-
NONEThe user will not have any special privileges. The default. -
USERThe user will have minimal registered user priveleges. See Registration and access levels for details. -
MODERThe user will have moderator privileges. See Registration and access levels for details. -
ADMINThe user will have administrator privileges. See Registration and access levels for details.
Example:
/api/updateRegisteredUser { hashpass=****************************************&accessLevelBoard_b=b&accessLevel_b=MODER&ips=192.168.0.1 }
{
"hashpass": "****************************************"
}
On any error, an error object is returned.
Example:
/api/updateRegisteredUser { hashpass=****************************************&accessLevelBoard_b=b&accessLevel_b=MODER }
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "No such user"
}
/api/unegisteredUser
Unregisteres a user. Returns an empty object.
Note: Your access level must be SUPERUSER.
The required fields are:
-
hashpassThe hashpass of the user.
Example:
/api/unegisteredUser { hashpass=**************************************** }
{}
On any error, an error object is returned.
Example:
/api/unegisteredUser { hashpass=**************************************** }
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "No such user"
}