xmppRoomKickUser()
This function allows you to kick a specified user (jid) out of a chat room.
Synopsis
int xmppRoomKickUser(int clientId, string room, string jid [, string
reason]);
Parameter
Parameter | Description |
---|---|
clientid | The unique client id for the client channel. The id is returned by the xmppOpen() function. |
room | The room (name ) whose user is kicked out .("roomname@conference.jabber.at") |
jid |
Jabber ID of a user such as winccoa.etm@jabber.at. The jid must be of the form "room@service/nickName" |
reason | The reason why a user is kicked out.. |
Return Value
Returns 0 when the function was successfully executed or -1 in case of errors
Errors
Errors can be queried via getLastError().
Description
This function allows you to kick a specified user (jid) out of a chat room.
The following example shows how to kick a user out of a chat room.
Note: You have to replace the code:
p =
xmppOpen("winccoa.etm@jabber.at","123677", "callback", m); DebugN("xmppOpen:",
p);
by your own user and password. This code is an example!Note: In order to kick out a user, the user has join the chat room first.
#uses "CtrlXmpp"
int p;
main(mapping event)
{
p = xmppOpen("winccoa.etm@jabber.at","123677");
DebugN("xmppOpen:", p);
int s = xmppRoomJoin(p,"testraum@conference.jabber.at", "WinCCOA");
DebugN("Joined the room:", s);
int ks = xmppRoomKickUser(p, "testraum@conference.jabber.at", "winccoa.etm@jabber.at", "Sorry - kicking you out");
/*Kick the specified user (jid) from the chat room. */
}
Assignment
Availability
CTRL