Class BanUsersFromRoomRequest

java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.BanUsersFromRoomRequest
All Implemented Interfaces:
sfs3.client.requests.IClientRequest

public class BanUsersFromRoomRequest extends BaseRequest
Allows to ban one or more Users from the current Room for a certain amount of time. You must be the Room's owner or another User with Moderator/Admin privileges.

You can ban a single User or a group of Users (max 10), providing a time interval after which they will be able to return to the Room.

  • Field Details

  • Constructor Details

    • BanUsersFromRoomRequest

      public BanUsersFromRoomRequest(User user, Room theRoom, String message)
      Bans a User from the Room for 1 hour. To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges.

      NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).

      Parameters:
      user - the User
      theRoom - the Room where the User should be banned
      message - an optional ban message
    • BanUsersFromRoomRequest

      public BanUsersFromRoomRequest(List<User> users, Room theRoom, String message)
      Bans a group of Users from the Room for 1 hour. To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges

      NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).

      Parameters:
      users - a list of Users (max 10)
      theRoom - the Room where the User should be banned
      message - an optional ban message
    • BanUsersFromRoomRequest

      public BanUsersFromRoomRequest(User user, Room theRoom, String message, int timeInterval, TimeUnit timeUnit)
      Ban a User for up to 24 hours. Ban time can be expressed in minutes (1..60) or hours(1..24). An optional moderator message can be sent to the users just banned.

      To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges

      NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).

      Parameters:
      user - The User to ban
      theRoom - The target Room
      message - (optional) A message for the banned users
      timeInterval - the time interval
      timeUnit - the unit of time (minutes or hours)
    • BanUsersFromRoomRequest

      public BanUsersFromRoomRequest(List<User> users, Room theRoom, String message, int timeInterval, TimeUnit timeUnit)
      Ban up to 10 users for up to 24 hours. Ban time can be expressed in minutes (1..60) or hours(1..24). An optional moderator message can be sent to the users just banned.

      To be able to ban a User the sender must be the owner of the Room or have Moderator/Admin privileges

      NOTE: if a message is not provided the ban happens immediately. If a message is provided the message is sent first (as moderator message) then the users is kicked out, with a short delay (2-3 seconds).

      Parameters:
      users - A list of Users (max 10)
      theRoom - The target Room
      message - (optional) A message for the banned users
      timeInterval - the time interval
      timeUnit - the unit of time (minutes or hours)
  • Method Details