implemented gp-authed lobbies. Still needs some GUI

This commit is contained in:
csoler 2015-08-26 23:35:36 -04:00
parent 260da99955
commit 040b4fb949
5 changed files with 115 additions and 47 deletions

View file

@ -128,6 +128,7 @@ void CreateLobbyDialog::createLobby()
case GxsIdChooser::NoId:
case GxsIdChooser::None:
return ;
default: break ;
}
// add to group
@ -136,6 +137,9 @@ void CreateLobbyDialog::createLobby()
if(ui->security_CB->currentIndex() == 0)
lobby_flags |= RS_CHAT_LOBBY_FLAGS_PUBLIC ;
if(ui->pgp_signed_CB->isChecked())
lobby_flags |= RS_CHAT_LOBBY_FLAGS_PGP_SIGNED ;
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name,gxs_id, lobby_topic, shareList, lobby_flags);
std::cerr << "gui: Created chat lobby " << std::hex << id << std::dec << std::endl ;

View file

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>787</width>
<width>1315</width>
<height>486</height>
</rect>
</property>
@ -86,7 +86,7 @@
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Security policy:</string>
<string>Visibility:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -110,6 +110,29 @@
<item row="2" column="2">
<widget class="GxsIdChooser" name="idChooser_CB"/>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="pgp_signed_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you check this, only PGP-signed ids can be used to join and talk in this lobby. This limitation prevents anonymous spamming as it becomes possible for at least some people in the lobby to locate the spammer's node.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>require PGP-signed identities</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Security:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>