Packagecom.electrotank.electroserver5.api
Classpublic class EvictUserFromRoomRequest
InheritanceEvictUserFromRoomRequest Inheritance EsRequest Inheritance EsMessage Inheritance flash.events.Event

By default, the first client joined to a room is the room operator. When the client leaves the room the operator status goes to the next person that has joined the room. As a room operator a client can kick users from the room or ban them from the server, provided the operator's user permissions (as set in ES Admin) allow this to be done. If the kick succeeds, all users in the room get a UserEvictedFromRoomEvent giving the name of the user kicked and the reason.
var eur:EvictUserFromRoomRequest = new EvictUserFromRoomRequest();
eur.userName = userToKick;
eur.ban = false;
eur.duration = -1;
eur.roomId = _room.id;
eur.zoneId = _room.zoneId;
eur.reason = "you smell";
_es.engine.send(eur);



Public Properties
 PropertyDefined By
  ban : Boolean
Set to true if the user should be banned as well.
EvictUserFromRoomRequest
  duration : int
The duration of the ban.
EvictUserFromRoomRequest
 InheritedmessageNumber : int
EsMessage
 InheritedmessageType : MessageType
EsMessage
  reason : String
Reason for the kick or ban.
EvictUserFromRoomRequest
 InheritedrequestId : int
EsMessage
  roomId : int
Id of the room that contains the user.
EvictUserFromRoomRequest
 InheritedserverId : String
EsMessage
  userName : String
EvictUserFromRoomRequest
  zoneId : int
Id of the zone that contains the room that contains the user.
EvictUserFromRoomRequest
Public Methods
 MethodDefined By
  
EvictUserFromRoomRequest(m:MessageType = null, t:TBase = null)
EvictUserFromRoomRequest
  
fromThrift(t_:TBase):void
[override]
EvictUserFromRoomRequest
  
newThrift():TBase
[override]
EvictUserFromRoomRequest
  
toThrift():TBase
[override]
EvictUserFromRoomRequest
Property Detail
banproperty
ban:Boolean

Set to true if the user should be banned as well.


Implementation
    public function get ban():Boolean
    public function set ban(value:Boolean):void
durationproperty 
duration:int

The duration of the ban.


Implementation
    public function get duration():int
    public function set duration(value:int):void
reasonproperty 
reason:String

Reason for the kick or ban. The target user receives this reason.


Implementation
    public function get reason():String
    public function set reason(value:String):void
roomIdproperty 
roomId:int

Id of the room that contains the user.


Implementation
    public function get roomId():int
    public function set roomId(value:int):void
userNameproperty 
userName:String


Implementation
    public function get userName():String
    public function set userName(value:String):void
zoneIdproperty 
zoneId:int

Id of the zone that contains the room that contains the user.


Implementation
    public function get zoneId():int
    public function set zoneId(value:int):void
Constructor Detail
EvictUserFromRoomRequest()Constructor
public function EvictUserFromRoomRequest(m:MessageType = null, t:TBase = null)



Parameters
m:MessageType (default = null)
 
t:TBase (default = null)
Method Detail
fromThrift()method
override public function fromThrift(t_:TBase):void

Parameters

t_:TBase

newThrift()method 
override public function newThrift():TBase

Returns
TBase
toThrift()method 
override public function toThrift():TBase

Returns
TBase