示例#1
0
	void RoomHandler::SetRole (RoomParticipantEntry *entry,
			QXmppMucItem::Role newRole, const QString& reason)
	{
		QXmppMucItem item;
		item.setNick (entry->GetNick ());
		item.setReason (reason);
		item.setRole (newRole);
		Account_->GetClientConnection ()->Update (item, Room_->jid ());
	}
示例#2
0
	void RoomCLEntry::TrySetPerm (const QString& userId,
			const QByteArray& permClass,
			const QByteArray& targetPerm,
			const QString& reason)
	{
		QXmppMucItem item;
		if (permClass == "role")
			item.setRole (Role2Str_.key (targetPerm));
		else if (permClass == "aff")
			item.setAffiliation (Aff2Str_.key (targetPerm));
		else
			return;

		item.setJid (userId);
		item.setReason (reason);

		Account_->GetClientConnection ()->Update (item, RH_->GetRoomJID ());
	}