-
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:
-
userIp
IP 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_BOARD
Name of the board to ban a user on. TheBOARD
part of the field name must match it's value. -
banLevel_BOARD
Ban level on the corresponding board. Optional. TheBOARD
part of the field name must match theBOARD
part of the field name of thebanBoard_BOARD
field. Possible values:
-
NONE
Or any other value. The user will not be banned. The default. -
READ_ONLY
The user will only be able to read threads/posts. -
NO_ACCESS
The user will not be able to create or read threads/posts.
-
banExpires_BOARD
Time (in theYYYY/MM/DD HH:mm
format) when the ban expires. Optional. TheBOARD
part of the field name must match theBOARD
part of the field name of thebanBoard_BOARD
field. -
banReason_BOARD
Ban reason. Astring
. Optional. TheBOARD
part of the field name must match theBOARD
part of the field name of thebanBoard_BOARD
field. -
banPostNumber_BOARD
Number of the post for which the user is to be banned. Optional. If specified, the corresponding mark will be added to the post. TheBOARD
part of the field name must match theBOARD
part of the field name of thebanBoard_BOARD
field.
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:
-
userIp
IP 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:
-
password
Either 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:
-
ips
The 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_BOARD
Name of the board to assign the user's access level on. TheBOARD
part of the field name must match it's value. -
accessLevel_BOARD
Access level of the user on the corresponding board. Optional. TheBOARD
part of the field name must match theBOARD
part of the field name of theaccessLevelBoard_BOARD
field. Possible values:
-
NONE
The user will not have any special privileges. The default. -
USER
The user will have minimal registered user priveleges. See Registration and access levels for details. -
MODER
The user will have moderator privileges. See Registration and access levels for details. -
ADMIN
The 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:
-
hashpass
The hashpass of the user.
The optional fields are:
-
ips
The 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_BOARD
Name of the board to assign the user's access level on. TheBOARD
part of the field name must match it's value. -
accessLevel_BOARD
Access level of the user on the corresponding board. Optional. TheBOARD
part of the field name must match theBOARD
part of the field name of theaccessLevelBoard_BOARD
field. Possible values:
-
NONE
The user will not have any special privileges. The default. -
USER
The user will have minimal registered user priveleges. See Registration and access levels for details. -
MODER
The user will have moderator privileges. See Registration and access levels for details. -
ADMIN
The 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:
-
hashpass
The 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"
}