xmppRoomInviteUser()

This function allows you to invite a user to a chat room.

Synopsis

int xmppRoomInviteUser(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 ) to which the invitation is sent.
jid The jabber id of the user e.g. winccoa.etm@jabber.at
reason The reason to invite a user to a room.

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 invite a user to a chat room.

The following example shows how to invite the user "maxMustermann@jabber.at" to 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!
#uses "CtrlXmpp"
int p;
main(mapping event)
{
  p = xmppOpen("winccoa.etm@jabber.at","123677", "callback", m);
  DebugN("xmppOpen:", p);
  int d = xmppRoomInviteUser(p, "general chat", "maxMustermann@jabber.at", "Join me in the room");
  DebugN("Join me in the room maxMustermann:", d);
  /* Send an invitation to the specified user (jid).*/
}

Assignment

XMPP functions

Availability

CTRL