Commit Graph
139 Commits
Author SHA1 Message Date
ac-stef 68c3ea43b1 improved http error handling
* don't treat 404 as http error
* real errors return -1 and disconnect
* -1 is treated as real error
2015-09-07 14:53:57 +02:00
ac-stef 7bdd91bc9f improved timeout handling and progress bar for autodownloads
http get now uses two timeout values: one for the max time since last
server response, and one for total download time.

When AC is waiting for a server response (before a http header was
received), the progress bar will show the timeout "completion".
2015-09-07 14:53:57 +02:00
ac-stef 50369fe920 use new http get to retrieve list from masterserver
curl ite domum
2015-09-07 14:53:56 +02:00
ac-stef 7988443b1d partial autodownload rewrite
* own source file for autodownload
* use cleaned up zip functions
* use new http get function (no more curl)
* enforce strict file naming rules and file size limits
* ping all package servers on every game start to determine ping times
* support media file update lists (also kept on package servers)
* allow users to manually prioritise package servers
* automatically select server with newest media file revision

new or changed commands:

addpckserver hostname [priority]
  Adds a host name to the list of package servers. If a priority is given,
  it influences the sorting of servers. Servers with higher priority are
  queried first. If servers have the same priority, they are sorted by
  ping. Default priority is zero.

getpackageserver
  Returns a table with four columns of all configured package servers. The
  columns are: host name, priority, ping and resolved.
  "resolved" is a flag, indicating, if the server answered the ping during
  game start.

removed cubescript idents: sortpckservers gamestarts
DOCREF addpckserver getpckserver
2015-09-07 14:53:56 +02:00
aurhat c27e5e05d2 Fix displaying LAN servers
LAN servers should be always visible, when user opens serverbrowser with
LAN servers only. And don't allow to switch from there to alternate views,
because for searchlan = 2 it doesn't make sense.
2015-08-22 13:50:20 +02:00
ac-stef 06f59e0559 use safe strings
(cleanup)
2015-08-21 15:51:36 +02:00
ac-stef 826499c12d enable gcc to check arguments of printf-like functions
Check printf-like functions like conoutf, if format strings and argument
lists match.

This commit also fixes a lot of code parts that actually had mismatching
argument lists - or did things, that this check does not like.

numtime() was rewritten in an ugly but very portable fashion (it's
recommended to stay away from "long long" format entries, because errors
usually only come up at runtime).

(some code was copied from sauer)
2015-08-02 19:40:41 +02:00
ac-stef fe6f9e92a7 tab and formfeed cleanup 2015-06-10 14:28:50 +02:00
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +02:00
ac-stef cb9169ab0a remove double filtering of richtext
cubescript quotes ("") already filter richtext
2015-06-10 14:27:52 +02:00
ac-stef 47f71f1288 allow symbolic arguments for some commands
* new command "listoptions" lists the argument options for several
  argument types like entities, weapons and teamnames
* "burstshots", "weapon", "magcontent", "magreserve", "fragmessage" and
  "gibmessage" now allow guns to be specified by name
* "addpunct" allows plaintext arguments like "brackets" and "quotes"
* the "team" command now understands numeric teams
* entity types can now be specified by type index number
* removed some lists from the config files (now provided by listoptions)
* added argument completion for several commands
* change nextprimary from integer to string variable

DOCREF listoptions burstshots weapon addpunct
DOCREF fragmessage gibmessage magcontent magreserve
DOCREF nextprimary
2015-02-23 18:52:04 +01:00
aurhat 6e0e7bb333 Optimize and fix autodownload feature
The commit:
1. fixes value of download speed in KB;
2. introduces unique names of progress_callback() functions;
3. removes one unnecessary write_callback() function;
4. removes duplicated code/info in loadmodel().
2014-11-26 21:05:07 +01:00
aurhat b6a5418c24 Add alternative views in serverbrowser and improve favourites
Alternative views in the serverbrowser are implemented with use favourites.
Categories (names) of favourite servers, which will be displayed on the
views, have to be included in "serverbrowseraltviews" alias (accessible
in menu).
Switching between views is possible with use Alt + Mouse wheel and
Alt + Up/Down (or eventually "[" and "]", if they are dedicated keys
on your keyboard).

The commit also:
1. adds MATCH category to favourites;
2. shows category name in settings of favourites;
3. shows weights in serverbrowser instead of favourites image,
when showweights = 1;
4. cleans up some tabs.
2014-11-11 21:07:19 +01:00
aurhat 931c442f67 Improve "favourite servers" feature
The commit:
1. does serverdescription keyword case insensitive for
showonlyfavourites > 0;
2. fixes typo in argument of alias in keyword;
3. fixes disabling background color for servers of the category, when
alpha is changed to 0;
4. shows 0 instead of 10 in info about digit, which toggles 10th category;
5. adds info about "image" attribute in favourites.cfg;
6. adds new feature: "Search for servers".
2014-10-04 20:25:44 +02:00
aurhat 69cbf95401 Prevent displaying remote servers on startup of LAN servers browser
After startup of LAN servers browser there appeared sometimes also remote
servers, instead of only LAN servers.
I such case "si.lastpingmillis=servermenumillis" for all remote servers.
So this commit changes a little existing condition, to prevent above
problem.
2014-07-08 22:51:33 +02:00
ac-stef 29dd50bde6 fix: keep path and uppercase in demo filenames
votes now distinguish between demo and map votecalls and filter the
filename appropriately

also: remove paths from map names cleanly
2014-05-25 00:35:22 +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
ac-stef eb60302e67 cleanup
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
2014-05-14 22:54:37 +02:00
Lucas GAUTHERON 8361e43415 escape special characters in MS requests
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7685 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-12-16 12:50:50 +00:00
RandumKiwi 86a63fc554 Fix for some buggy libcurl versions (linux).
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-10 18:54:27 +00:00
Lucas GAUTHERON 994061553e gma no longer known
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7641 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 15:16:40 +00:00
Lucas GAUTHERON f0b6fe3249 clfail fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7640 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 15:14:59 +00:00
Lucas GAUTHERON ab294c1b2d MS now writes to servers.cfg directly and progress bar is fixed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7638 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 14:07:51 +00:00
Ronald Reagan ae80a42505 Adding grenadier's HTTP MS fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7637 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-09 02:20:23 +00:00
Ronald Reagan de65e51bd0 Adding --mastertype switch. Allows switching between UDP and HTTP style masterserver
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7633 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-11-08 05:53:01 +00:00
Lucas GAUTHERON 2070fe4b79 MS: serverlist requested with HTTP
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7601 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-10-12 21:09:42 +00:00
Bukz 7480f036d3 persistidents fixes (plz review/test)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7213 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-16 01:43:47 +00:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus bd9a5b801a fixed windows build errors
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6796 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-04-25 17:31:20 +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
sireus 34e56ae7d1 use var lang instead of alias LANG, and some cleanup in language detection
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6774 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-03-30 12:44:07 +00:00
Rafael Barreto aa10c09bd3 sending defs to ms
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6756 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-02-09 16:16:16 +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
Lucas GAUTHERON 3a9d59ceb3 colored ping in serverbrowser?
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6421 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-11 15:50:15 +00:00
flowtron 9aac0c29e0 fix connect-by-console not working w/o updatefrommaster - Brahma, please re-check your fix is still working!
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5820 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-09 21:40:44 +00:00
Rafael Barreto 6a194a9680 differentiating masterserver real states
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5805 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-11-04 17:40:17 +00:00
RandumKiwi bc87883a01 git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5545 e016b1c5-ed68-44aa-a2f7-31cac88cffde 2010-08-05 12:07:54 +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
flowtron 8328407439 using CC for i18n strings (note: replace non-CC '%c' with %s for clarity)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5357 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-13 17:17:05 +00:00
flowtron 131e5ad7c3 fixed menu-item-mapload
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5350 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-12 20:43:39 +00:00
flowtron 94dc526837 lots of whitespace
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5265 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-02 16:49:20 +00:00
Rafael Barreto 7fc926a3bb this is not so effective, so, undoing partially
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5136 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-06-02 18:24:28 +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 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 09466ff2ac avoid usage of ntohl/htonl
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5105 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-30 01:12:37 +00:00
Lee Salzman 74b60550fa maxservpings fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4865 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-15 18:40:13 +00:00
Lee Salzman b407a4c557 removing some old stuff
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4809 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 20:21:22 +00:00
Lee Salzman 005a7c591c mastername type fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4804 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-04 19:50:11 +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 3b5e6f38bd Central Moderation (client side)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4801 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-05-03 18:37:36 +00:00