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
571cf91e
Commit
571cf91e
authored
Jan 03, 2011
by
Max-Wilhelm Bruker
Browse files
translation update; made server status update optional
parent
62ccd51f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
cockatrice/translations/cockatrice_de.ts
View file @
571cf91e
This diff is collapsed.
Click to expand it.
cockatrice/translations/cockatrice_en.ts
View file @
571cf91e
This diff is collapsed.
Click to expand it.
cockatrice/translations/cockatrice_es.ts
View file @
571cf91e
This diff is collapsed.
Click to expand it.
cockatrice/translations/cockatrice_fr.ts
View file @
571cf91e
This diff is collapsed.
Click to expand it.
cockatrice/translations/cockatrice_pt.ts
View file @
571cf91e
This diff is collapsed.
Click to expand it.
servatrice/servatrice.ini.example
View file @
571cf91e
[server]
port=4747
statusupdate=15000
[authentication]
method=none
...
...
@@ -12,15 +13,12 @@ database=servatrice
user=servatrice
password=foobar
[messages]
login="Example line"
[chatchannels]
[rooms]
size=1
1\name="General
Chat
"
1\description="
Discuss
anything here."
1\name="General
room
"
1\description="
Play
anything here."
1\autojoin=true
1\joinmessage="This
is the general chat channel. This
message is only here to show that
channel
s can have a join message."
1\joinmessage="This message is only here to show that
room
s can have a join message."
[game]
max_game_inactivity_time=120
...
...
servatrice/src/servatrice.cpp
View file @
571cf91e
...
...
@@ -33,16 +33,22 @@ Servatrice::Servatrice(QObject *parent)
connect
(
pingClock
,
SIGNAL
(
timeout
()),
this
,
SIGNAL
(
pingClockTimeout
()));
pingClock
->
start
(
1000
);
statusUpdateClock
=
new
QTimer
(
this
);
connect
(
statusUpdateClock
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
statusUpdate
()));
statusUpdateClock
->
start
(
15000
);
ProtocolItem
::
initializeHash
();
settings
=
new
QSettings
(
"servatrice.ini"
,
QSettings
::
IniFormat
,
this
);
int
statusUpdateTime
=
settings
->
value
(
"server/statusupdate"
).
toInt
();
statusUpdateClock
=
new
QTimer
(
this
);
connect
(
statusUpdateClock
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
statusUpdate
()));
if
(
statusUpdateTime
!=
0
)
{
qDebug
()
<<
"Starting status update clock, interval "
<<
statusUpdateTime
<<
" ms"
;
statusUpdateClock
->
start
(
statusUpdateTime
);
}
tcpServer
=
new
QTcpServer
(
this
);
connect
(
tcpServer
,
SIGNAL
(
newConnection
()),
this
,
SLOT
(
newConnection
()));
tcpServer
->
listen
(
QHostAddress
::
Any
,
settings
->
value
(
"server/port"
,
4747
).
toInt
());
int
port
=
settings
->
value
(
"server/port"
,
4747
).
toInt
();
qDebug
()
<<
"Starting server on port"
<<
port
;
tcpServer
->
listen
(
QHostAddress
::
Any
,
port
);
QString
dbType
=
settings
->
value
(
"database/type"
).
toString
();
dbPrefix
=
settings
->
value
(
"database/prefix"
).
toString
();
...
...
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