Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
d0e832b0
Commit
d0e832b0
authored
Jun 27, 2011
by
Max-Wilhelm Bruker
Browse files
limit game name length to 50 characters
parent
7bfa3e6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_protocolhandler.cpp
View file @
d0e832b0
...
...
@@ -475,7 +475,10 @@ ResponseCode Server_ProtocolHandler::cmdCreateGame(Command_CreateGame *cmd, Comm
for
(
int
i
=
0
;
i
<
gameTypeList
.
size
();
++
i
)
gameTypes
.
append
(
gameTypeList
[
i
]
->
getData
());
Server_Game
*
game
=
room
->
createGame
(
cmd
->
getDescription
(),
cmd
->
getPassword
(),
cmd
->
getMaxPlayers
(),
gameTypes
,
cmd
->
getOnlyBuddies
(),
cmd
->
getOnlyRegistered
(),
cmd
->
getSpectatorsAllowed
(),
cmd
->
getSpectatorsNeedPassword
(),
cmd
->
getSpectatorsCanTalk
(),
cmd
->
getSpectatorsSeeEverything
(),
this
);
QString
description
=
cmd
->
getDescription
();
if
(
description
.
size
()
>
50
)
description
=
description
.
left
(
50
);
Server_Game
*
game
=
room
->
createGame
(
description
,
cmd
->
getPassword
(),
cmd
->
getMaxPlayers
(),
gameTypes
,
cmd
->
getOnlyBuddies
(),
cmd
->
getOnlyRegistered
(),
cmd
->
getSpectatorsAllowed
(),
cmd
->
getSpectatorsNeedPassword
(),
cmd
->
getSpectatorsCanTalk
(),
cmd
->
getSpectatorsSeeEverything
(),
this
);
Server_Player
*
creator
=
game
->
getPlayers
().
values
().
first
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment