Commit Graph
86 Commits
Author SHA1 Message Date
ac-stef 035d7caf2f thread-safe and fully buffered logging
Uses own thread to actually write to logs, so the main thread can't be
blocked by a slow logfile. Log entries are buffered in two ringbuffers,
one for the main thread and one for all other threads. The main thread
will copy the second buffer to the main buffer periodically. The main
thread buffer is read from the log worker thread.

Since two buffers are kept, there are now several functions to add a log
entry:

  mlog()
    for main thread functions only: will never block

  tlog()
    other threads only: may block, until main thread copied some entries

  xlog()
    automatically determines, which thread it's been called from and
    then writes to the proper buffer (will block accordingly)

To avoid improper usage, mlog and tlog verify, if they are used correctly.
(Only for debug builds. An assert triggers, if necessary.)
2017-06-27 15:15:23 +02:00
ac-stef d6af5be3da add auth to client server connect protocol 2017-06-27 15:15:23 +02:00
ac-stef ac5229dfba server cleanup
* restrict reading of config files to times when the server is empty
* collect entropy
* remove hint how to convert pre-1.0 blacklists
2017-06-27 15:15:21 +02:00
ac-stef c8c310886a fix parsing of commandline switches for servers
also:
 * -Y now sets the private key for the server
 * -m without argument uses default masterserver URL
 * servers run LAN-only by default (set ms URL and private key to
   register with the master)
 * use generic locale "POSIX"
2017-06-27 15:15:21 +02:00
ac-stef 1ca4ce54eb some server changes
tbc
2017-06-27 15:15:20 +02:00
ac-stef 8ece94d5bb allow menu checkboxes to change position
and: fix enumsounds, kill some CR, cleanup

menuitemcheckbox <text> <value> <action> <position>

  Now takes an optional fourth parameter "position" in the range from 0
  to 100, default 0, which moves the position of the checkbox over the
  width of a text input or slider, with 100 being left and 0 being right.

DOCREF menuitemcheckbox
2017-05-24 02:09:17 +02:00
ac-stef 1afd7515ab simplify masterserver type selection
Use a plain cubescript variable instead of a commandline switch.

mastertype
  0: classic direct TCP connection
  1: HTTP connection (via proxy) (default)

DOCREF mastertype "--mastertype="
2017-05-22 20:44:58 +02:00
aurhat a9bf87b1e7 Indexing fix 2015-05-07 21:27:53 +02:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
Lucas GAUTHERON 573eb286c6 prev MS issue fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7639 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 15:00:48 +00:00
sireus cfccba92d1 fixed C++11-related warnings
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6853 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-07-07 22:35:30 +00:00
sireus 9e1437e9bc configurable masterserver port
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6791 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-20 16:49:39 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
flowtron 70250d7d41 clean-up & commentary
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6106 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-15 18:42:26 +00:00
Rafael Barreto a2ff7c857a avoid in game registration
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5579 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-08 21:10:16 +00:00
flowtron 8ded75ea73 avoid excessive M.S.-registration
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5578 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-08 20:51:36 +00:00
flowtron 5c2a282a9f finishing the previous fix - thanks to stef for alerting us of the problem
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5555 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 18:23:12 +00:00
flowtron 45f36abfca respond to pong always, re-register only in intermissions or if >1 hour since last
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5554 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 18:02:30 +00:00
Rafael Barreto ebac2ab0d0 (trying to) check if the server is lagging, avoid ms registration in the middle of a game
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5551 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 04:28:44 +00:00
Rafael Barreto 6cbd7cb554 the correct fix for the maxclient issue
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5436 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-22 00:20:32 +00:00
Rafael Barreto dd59cbc8f1 fix the maxclient issue
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5435 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-21 23:28:32 +00:00
Rafael Barreto 20db26c161 saner string
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5371 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-15 00:10:31 +00:00
Rafael Barreto d7830dbe5d client side lock and version info
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5135 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-02 15:36:43 +00:00
Rafael Barreto af4bfa975b better identification and clean up
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5132 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-01 21:11:08 +00:00
Rafael Barreto fd226ed857 only the first word is needed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5131 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-01 18:03:17 +00:00
Rafael Barreto 094646fcc7 sending the name (no effective effect)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5129 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-01 17:36:33 +00:00
Lee Salzman 28cc51e81a master deps
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4812 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 21:03:09 +00:00
Lee Salzman 7d90c91175 WIP port of sauer master server
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4803 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 19:42:40 +00:00
Rafael Barreto a35ca97f08 New Master Server (server side)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4802 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 04:08:58 +00:00
Rafael Barreto 6472d510d2 Central Moderation
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4800 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-03 01:38:26 +00:00
Lee Salzman e725e5ed8c string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 22:44:32 +00:00
Lee Salzman 54cc44c3db revising pch setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4690 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:42:37 +00:00
ac_stef f1e879e7fd akimbo bug fixed; some new bugs added
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4598 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-08-05 21:21:57 +00:00
ac_stef 7ae3ae8c3e extended serverinfo
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4512 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-15 17:09:02 +00:00
ac_stef be3ab39a36 log logging settings
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4467 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-03 14:30:52 +00:00
ac_stef 7ec8634727 cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4460 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-02 22:22:24 +00:00
ac_stef 374507babf all new logging: optional file log for linux; choose independent logging levels; optional timestamps for console & file logs; cleanup time functions
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4449 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-05-29 16:30:55 +00:00
ac_stef 0650dd3a64 new commands: modconnect, modconnectadmin & modlanconnect
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4391 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-05-16 17:18:17 +00:00
ac_stef ca14425cfd refactored server commandline parsing
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4145 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-18 00:29:15 +00:00
ac_stef 56f2877d17 more serverms logging
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4136 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-12 18:24:40 +00:00
ac_stef 454083ae68 log masterserver reply
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4134 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-12 16:12:28 +00:00
Lee Salzman d503852b84 warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4098 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-02 17:43:40 +00:00
Lee Salzman 04aae7b5da fix ping buf overreading into pong buf
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4056 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-22 16:22:23 +00:00
ac_stef 892803e220 search players by name in serverbrowser
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4039 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-19 02:17:47 +00:00
ac_stef 65d53e48e3 extended server pong message; serverbrowser enhanced
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3990 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-11 15:33:23 +00:00
Lee Salzman 04256b5d33 don't error out if lan socket creation fails
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3818 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-01 22:58:45 +00:00
ac_stef 2841abac26 configurable voting permissions; missing config file warning; fixed kick, ban & forceteam votes; write recorded demos to files; optionally restrict a server to server-provided maps; scoreboard status logging fixed & extended; extended traffic logging; custom server description reset condition modified
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3813 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-12-01 17:37:56 +00:00
driAn ecca453ca4 better master query fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3702 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-20 23:12:04 +00:00
Lee Salzman 71c5082d99 gcc warning fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3684 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-20 20:39:43 +00:00
driAn c030ec3100 fixed timing issue when registering on the master
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3682 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-20 20:19:23 +00:00