equal
deleted
inserted
replaced
92 m_game_connected = false; |
92 m_game_connected = false; |
93 |
93 |
94 NetSocket.disconnectFromHost(); |
94 NetSocket.disconnectFromHost(); |
95 } |
95 } |
96 |
96 |
97 void HWNewNet::CreateRoom(const QString & room) |
97 void HWNewNet::CreateRoom(const QString & room, const QString & password) |
98 { |
98 { |
99 if(netClientState != InLobby) |
99 if(netClientState != InLobby) |
100 { |
100 { |
101 qWarning("Illegal try to create room!"); |
101 qWarning("Illegal try to create room!"); |
102 return; |
102 return; |
103 } |
103 } |
104 |
104 |
105 myroom = room; |
105 myroom = room; |
106 |
106 |
107 RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room)); |
107 if(password.isEmpty()) |
|
108 RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room)); |
|
109 else |
|
110 RawSendNet(QString("CREATE_ROOM%1%2%1%3").arg(delimeter).arg(room).arg(password)); |
|
111 |
108 isChief = true; |
112 isChief = true; |
109 } |
113 } |
110 |
114 |
111 void HWNewNet::JoinRoom(const QString & room) |
115 void HWNewNet::JoinRoom(const QString & room) |
112 { |
116 { |