xmppRoomSetSubject()

This function allows you to set a subject of a chat room.

Synopsis

int xmppRoomSetSubject(int clientId, string room, string subject);

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 subject is set .("roomname@conference.jabber.at")
subject The subject that is opened in the chat 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 set a subject of a chat room.

The following example shows how to set a subject of a chat room.

Anmerkung:

You have to replace the code: p = xmppOpen("winccoa.etm@jabber.at","123677"); DebugN("xmppOpen:", p); as well as the code: int s = xmppRoomJoin(p,"generalchat@conference.jabber.at", "WinCCOA"); and "general chat", "Test" by your own code (user, password, chat and subject). This code is an example!

#uses "CtrlXmpp"
int p;
main(mapping event)
{
  p = xmppOpen("winccoa.etm@jabber.at","123677");
  DebugN("xmppOpen:", p);
  int s = xmppRoomJoin(p,"generalchat@conference.jabber.at", "WinCCOA");
  DebugN("Joined the room:", s);
  int m = xmppRoomSetSubject(p, "general chat", "Test");
  DebugN("Subject of the general chat:", m);
  /*Set the room's subject */
}

Assignment

XMPP functions

Availability

CTRL