Commit graph

2270 commits

Author SHA1 Message Date
heinrich5991 36694d3852 Add a way to call for external moderator help
This is done by HTTP POSTing to a location specified by
`sv_modhelp_url`. We also provide a `src/modhelp/server.py` which can
use theses POSTs to forward them to Discord servers.

The POST contains a JSON object payload, with the keys `"port"` which
contains the server port, `"player_id"` which contains the calling
player's client ID, `"player_name"` which contains the calling player's
nick and `"message"` which is the user-specified message.

Make JSON-escaping function public, add tests and fix bugs uncovered by
these tests.

Supersedes #1129.
2018-06-19 23:27:35 +02:00
heinrich5991 c739aef60e Some style fixes 2018-06-19 14:28:53 +02:00
bors[bot] 048176d043 Merge #1155
1155: fix sv_skinstealaction r=Learath2 a=ZombieToad



Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-06-17 13:03:09 +00:00
bors[bot] 6850fa98bf Merge #1154
1154: Rename 'credit' -> 'credits' r=Learath2 a=ChillerDragon

It's named ConCredits and there are many people credited so i guess the plural is fitting better c;

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-06-17 12:53:18 +00:00
ZombieToad 79c3327199
fix sv_skinstealaction 2018-06-17 07:28:32 +01:00
ChillerDragon bc89e1644d Rename 'credit' -> 'credits' 2018-06-17 05:42:41 +02:00
bors[bot] d52143ffd5 Merge #1151
1151: fix veto r=heinrich5991 a=ZombieToad

before if a player entered the game and stayed before start on a server with a clock over 20 mins he would get veto

Co-authored-by: ZombieToad <25847476+zombietoad@users.noreply.github.com>
2018-06-15 07:44:28 +00:00
ZombieToad 4544d02639
fix veto
before if a player entered the game and stayed before start on a server with a clock over 20 mins he would get veto
2018-06-15 00:49:09 +01:00
ZombieToad 99d0360947
fix pause messages
they were reversed
2018-06-14 22:41:28 +01:00
ZombieToad a858b7ddcd
fix /settings stuff 2018-06-14 00:33:07 +01:00
ChillerDragon 4b6133003b Fix help for showall command
current ddnet doesn't support the '/help showall' command.
This commit should fix that.
2018-06-12 00:30:21 +02:00
Dennis Felsing e72413c43b
Merge pull request #1137 from ChillerDragon/UpdateCredits
Update credits
2018-06-06 09:49:31 +02:00
ChillerDragon 522c893812 Update credits 2018-06-06 02:40:37 +02:00
ChillerDragon 0fe419589e All hail teeworlds convention 2018-06-04 11:16:04 +02:00
Ryozuki 21d6f4f39b use cstdint also in gamecontroller.h 2018-05-29 11:38:52 +02:00
Dennis Felsing 69667d4537 Also use cstdint on non-MSVC instead of stdint.h 2018-05-29 09:15:00 +02:00
Ryozuki d539331c64 use includes first in msc in eventhandler.h 2018-05-29 09:01:35 +02:00
def 59675fe63c Rate-limit /lock (fixes #1122) 2018-05-11 22:05:32 +02:00
def a7b778977a Add sv_sql_validservernames (fixes #1123) 2018-05-11 21:57:47 +02:00
Dennis Felsing 722087ba29
Merge pull request #1091 from heinrich5991/pr_ddnet_mapbugs
Add infrastructure for preserving bugs
2018-05-07 08:27:29 +02:00
bors[bot] 97ce07a1ab Merge #1118
1118: Add vote_ban rcon command r=heinrich5991 a=ChillerDragon

Works the same as muteid.
Vote banned players aren't allowed to start or participate in votes.

Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
2018-05-01 15:04:27 +00:00
ChillerDragon d4b0ad462b Allow vote muted players to vote...
It is a feature not a bug lol. Vote muted players are still not able to call own votes but they now can vote yes or no.
2018-05-01 16:58:03 +02:00
heinrich5991 81aeb30654 Also add a console command to enable map compatibility mode 2018-05-01 12:38:33 +02:00
def 8225077d17 Explicit type conversion 2018-04-30 18:22:31 +02:00
def c594a59569 /timeout without parameter: Try to reclaim using already set timeout code 2018-04-29 16:01:01 +02:00
def 5473012a6d /showall: Only print message if state changed 2018-04-29 15:57:57 +02:00
ChillerDragon d6be41d7ab Fix style and imporve performance 2018-04-21 18:45:33 +02:00
ChillerDragon 32189f8485 Pointer naming convention 2018-04-19 11:51:10 +02:00
ChillerDragon c1952d3ff1 'VoteBan' -> 'VoteMute' 2018-04-19 11:49:18 +02:00
ChillerDragon 6b26751eba Fixes style and shows ban message only in console 2018-04-19 11:01:27 +02:00
ChillerDragon 835f560013 Add vote_ban rcon command 2018-04-18 19:26:49 +02:00
Edgar 2ece3f36b7
remove periods 2018-04-17 19:35:25 +02:00
Ryozuki 07bc652896 add showall message 2018-04-17 17:52:35 +02:00
heinrich5991 f8277267a0 Remove mem_alloc and mem_free, use standard C functions instead
Replace `mem_free` by `free`, and `mem_alloc` by `malloc` or `calloc`
(the latter one being used to allocate a zeroed array of elements,
sometimes, this makes a call to `mem_zero` superfluous).

This results in having to remove `mem_stats` which previously recorded
the number of allocations and their size that the Teeworlds code did
directly.

Remove OOM handling in `src/game/client/components/binds.cpp`.

Remove needless copying in the CSV code in
`src/game/client/components/statboard.cpp`.
2018-04-09 11:56:39 +02:00
def b504ae60fb Improve wording in moderation messages 2018-04-07 16:51:17 +02:00
def 6d3b8f2d36 fix2 2018-04-04 20:41:05 +02:00
def 03ee53eaf1 space 2018-04-04 20:11:24 +02:00
def 30679364f5 Fix 2018-04-04 20:03:05 +02:00
def 8d98bd4e9f Projectiles explode per team 2018-04-04 19:48:46 +02:00
Dennis Felsing 5a53e4c54d Fix compilation 2018-04-03 10:27:19 +02:00
Dennis Felsing f8a00ad8af
Merge pull request #1000 from Ryozuki/pr_modhelp_chat_cmd
Add /modhelp chat command
2018-04-03 10:21:01 +02:00
Dennis Felsing 256845c824
Merge pull request #1072 from ChillerDragon/Broadcasts
Add broadcast importance (fixes #669)
2018-04-03 10:15:01 +02:00
heinrich5991 b9cdacbb37 Try to unfix the grenade bug for the map "Binary" 2018-03-24 14:01:01 +01:00
heinrich5991 4576dae6aa Add infrastructure for special-casing maps 2018-03-24 14:00:41 +01:00
bors[bot] 1e15b97543 Merge #1088
1088: Only count distinct client IP addresses for minimum player vote count r=heinrich5991 a=heinrich5991
2018-03-20 10:21:49 +00:00
heinrich5991 08e2c843a1 Only count distinct client IP addresses for minimum player vote count 2018-03-18 20:53:05 +01:00
Chiller Dragon 74ecdea3ab Add assert on unimportant broadcasts to all players 2018-03-16 13:30:47 +01:00
Chiller Dragon cc70628a49 Static broadcast delay (10 sec) 2018-03-15 22:35:25 +01:00
heinrich5991 d7f6cf2892 Fix some system.c insanity
`str_utf8_isspace` now returns true if the passed code point renders as
a space, instead of when not.

Add `str_utf8_trim_right`, use this function and
`str_utf8_skip_whitespaces` in the server.

Add tests for the three functions
2018-03-14 02:27:15 +01:00
VeH-c 748007d525
Fixed typo 2018-03-09 22:24:56 -08:00
ChillerDragon 8d1e60d5a6 Fix code style 2018-03-07 18:10:57 +01:00
ChillerDragon ab2876743a Make broadcast importance delay configurable 2018-03-07 18:06:39 +01:00
ChillerDragon 052e67c541 Add broadcast importance (fixes #669) 2018-03-07 17:22:41 +01:00
ChillerDragon 57cb136c55 Remove teamkill message on solo teams
For speedrunning alone in a team this "Everyone in your locked team was killed because '%s' %s."
is very annoying. So better only print it if more than 1 tee is in the team.
2018-03-06 14:08:04 +01:00
Dennis Felsing 93f0cd8933 Proper negative top5 calculation (fixes #1064) 2018-03-05 11:53:55 +01:00
bors[bot] e64919ddcb Merge #1058
1058: Add /pausevoted and /specvoted r=heinrich5991 a=def-

- Also fix /pause and /spec with name parameter a bit
- Move out common code between pause/spec
2018-03-02 14:41:31 +00:00
def ad99c58528 Add /pausevoted and /specvoted
- Also fix /pause and /spec with name parameter a bit
- Move out common code between pause/spec
2018-03-01 19:46:07 +01:00
heinrich5991 1387ee9a3a Regenerate version file on git changes
Previously, this file had to be manually deleted if you wanted to have a
new version compiled in.
2018-03-01 16:50:29 +01:00
ChillerDragon c1e3dec980 Remove unused teams function 2018-02-27 16:40:52 +01:00
Learath2 ff872b39cd Forgot to add GameID to the col-list 2018-02-14 01:17:40 +01:00
bors[bot] 6338a05fd3 Merge #1025
1025: Add Teehistorian UUIDs to every record r=heinrich5991 a=Learath2

For statistic collecting purposes, don't merge before updating the SQL Schema.

    ALTER TABLE record_race ADD COLUMN GameID VARCHAR(64) AFTER cp25;
    ALTER TABLE record_teamrace ADD COLUMN GameID VARCHAR(64) AFTER ID;
2018-02-13 16:01:20 +00:00
Learath bc11fc2a35 Add GameUuid to teamscore aswell
Also get GameUuid through an interface.
2018-02-07 16:43:36 +01:00
yangfl 1620fc9b0f Fix typo 2018-02-07 16:10:40 +08:00
Learath 94d98e833a Fix mistakes. Fix CREATE TABLE 2018-02-07 01:10:02 +01:00
Learath 0aeb912db2 Escape the UUID just in case 2018-02-07 00:44:03 +01:00
Learath 4a52bca55d Include the teehistorian uuid instead 2018-02-07 00:35:21 +01:00
Learath 4748d5f065 Add client version to the record 2018-02-06 20:07:42 +01:00
def c73e2a7ba8 New year is on January 1, not February 1 2018-02-01 20:22:18 +01:00
bors[bot] 4b84d7558f Merge #1007
1007: Record rcon authentication stuff into teehistorian r=Learath2 a=heinrich5991

This allows to check moderator actions after-the-fact.
2018-01-30 10:38:01 +00:00
heinrich5991 1c3dc8c316 Record rcon authentication stuff into teehistorian
This allows to check moderator actions after-the-fact.
2018-01-28 03:13:05 +01:00
heinrich5991 a744fe53a2 Remove CPlayer::m_Authed
This can't get out of sync now.
2018-01-27 23:13:17 +01:00
bors[bot] f48a2a395b Merge #947
947: Add support for extra chunks in teehistorian r=Learath2 a=heinrich5991

This allows to add rarely-used chunks without increasing the file format
version.
2018-01-27 21:09:43 +00:00
Ryozuki 214a8ba10a fix votes 2018-01-25 19:36:40 +01:00
Dennis Felsing cb0209d6e3 Reapply "Only make grenades explode once (fix by timakro)" 2018-01-25 02:32:34 +01:00
Dennis Felsing f3256f0b6c Revert "Only make grenades explode once (fix by timakro)"
This reverts commit b9a93a18fb.
2018-01-24 07:50:15 +01:00
Dennis Felsing 8f2ce84f4e
Merge pull request #996 from Ryozuki/pr_cmd_vote_no
Add vote_no command
2018-01-22 20:36:20 +01:00
Dennis Felsing b9a93a18fb Only make grenades explode once (fix by timakro) 2018-01-22 14:15:53 +01:00
def 3033fbb466 Also pass negative numbers 2018-01-21 19:13:20 +01:00
def a731482152 /top5, /top5team, /top5points, /times also show worst results with negative numbers 2018-01-21 19:08:52 +01:00
Ryozuki 79fedff12d add /modhelp chat command 2018-01-21 01:32:55 +01:00
Ryozuki 0f328d6c52
wrong side.. 2018-01-18 18:41:37 +01:00
Ryozuki e039145628
fix pointer naming 2018-01-18 18:30:38 +01:00
Ryozuki e59387a304 revision changes 2018-01-18 16:17:23 +01:00
Ryozuki 6413cab702 forgot newline 2018-01-18 07:58:22 +01:00
Ryozuki 1e88ad92a0 add vote_no command and show auth rank in force vote 2018-01-18 07:56:07 +01:00
Ryozuki 05ece01690 Add more output to mutes and muteid 2018-01-15 19:31:14 +01:00
Dennis Felsing 31bbbaf512 case sensitivity 2018-01-15 09:10:20 +01:00
Dennis Felsing 272e14357c Fix SQL code for points/top5points 2018-01-15 09:08:51 +01:00
def 80cf5eff45 Update credits 2018-01-14 08:11:48 +01:00
def 4bc0d176d3 More reverts.. 2018-01-13 22:22:55 +01:00
def 3ee76bc5ff Revert voting change 2018-01-13 21:40:29 +01:00
def 16117f74d7 People don't like my vote changes 2018-01-13 16:46:31 +01:00
def 4dc118c752 Mutes work independent of port, don't announce IP in chat (fixes #908) 2018-01-13 10:50:31 +01:00
heinrich5991 9d9bfee53f Move to ISO 8601-compliant timestamps
https://en.wikipedia.org/w/index.php?title=ISO_8601&oldid=819129098
2018-01-11 16:01:19 +01:00
heinrich5991 22080c840f Move teehistorian UUIDs into engine 2018-01-11 16:01:13 +01:00
heinrich5991 6c378b972b Add support for extra chunks in teehistorian
This allows to add rarely-used chunks without increasing the file format
version.
2018-01-11 15:59:53 +01:00
def 2ebc993379 Oops 2018-01-11 15:26:41 +01:00
def e29de3295f Vote faster when all press yes 2018-01-10 23:46:14 +01:00
def 37b7f058b2 Fix voting 2018-01-10 23:44:40 +01:00
def 0cc4763a43 Fix crash: Switch tiles with number 0 are handled like non-switch tiles
Thanks to 645654 and phacrum for report
2018-01-10 22:19:38 +01:00
Dennis Felsing d4f5b6ae69 Remove redundant code 2018-01-10 14:36:04 +01:00
Dennis Felsing ea85e0669a Keep vote running until everyone presses f3 or time runs out
Gives enough time for mods to react and for players to save
2018-01-10 14:33:03 +01:00
Ryozuki d6eb604718 add rcon moderate mode 2018-01-05 15:23:08 +01:00
Learath2 8353701789 Add sv_rcon_vote. Fix punctuation.
Add option to only allow authed clients to call votes.
2017-12-27 10:40:51 +03:00
def 627291c510 /pause <name> always switches to watching name
Old behaviour switched you out of pause if you were paused already
Thanks to fokkonaut for suggestion
2017-12-23 20:42:54 +01:00
Dennis Felsing be9a5fc8c8 Update save command description (by marcelherd) 2017-12-21 13:58:09 +01:00
bors[bot] 1d55bbda0e Merge #948
948: Remove deprecated multi commands r=Learath2 a=heinrich5991

You now have to use `/mc;` instead of `/` if you want to bind multiple
commands to one key.
2017-12-08 14:48:32 +00:00
ChillerDragon 3acb650a6f
removed unused comment 2017-12-02 18:26:53 +01:00
heinrich5991 94acac91a0 Overhauled job system
The engine now takes `std::shared_ptr<IJob>`, this will ensure the
appropriate lifetime of the given parameters, it also allows for proper
destruction. Remove the now obsolete `IFetcher` interface and `CFetcher`
class.

Also adds some locks to `CUpdater`, previously it didn't have any locks
at all.
2017-11-23 15:47:38 +01:00
heinrich5991 7fc4a21565 Remove deprecated multi commands
You now have to use `/mc;` instead of `/` if you want to bind multiple
commands to one key.
2017-11-18 16:36:34 +01:00
ChillerDragon a013a59aa6 removed dead function prototype 2017-11-01 14:57:34 +01:00
heinrich5991 dfc53b48cf Fix victim handling 2017-10-17 01:32:40 +02:00
heinrich5991 525b643e18 Fix a syntax error
Sorry. :/
2017-10-13 16:33:23 +02:00
heinrich5991 c439b04a2d teehistorian: Hide chat from teehistorian
There was a missing check that allowed chat messages to be written to
disk.
2017-10-13 16:25:26 +02:00
Learath2 4394933d6c Merge pull request #887 from heinrich5991/pr_ddnet_async
Add asynchronous output system and use it for teehistorian and `dbg_msg()`s
2017-10-13 15:30:24 +02:00
heinrich5991 e989ffad78 Rename async_* to aio_* and add test for nondivisible buffer lengths 2017-10-13 02:48:42 +02:00
heinrich5991 8e778cd9ab Address pull request comments 2017-10-13 02:29:18 +02:00
heinrich5991 4d05a2379b Make teehistorian asynchronous 2017-10-10 04:11:14 +02:00
heinrich5991 be0b52eddc Fix teehistorian crash on startup 2017-10-10 02:39:29 +02:00
Learath2 d15dcd3c58 Merge pull request #871 from heinrich5991/ddnet_teehistorian
Teehistorian
2017-10-09 18:42:27 +02:00
heinrich5991 f16059c0b8 teehistorian: Add a couple of tests, fix uninitialized vars and asserts 2017-09-28 02:42:35 +02:00
heinrich5991 f43480aeed Add testing infrastructure for teehistorian 2017-09-28 02:03:30 +02:00
heinrich5991 1913106f15 teehistorian: Fix a bug with implicit ticks 2017-09-27 20:15:41 +02:00
heinrich5991 be79f14e38 teehistorian: Use m_pController->m_pGameType directly 2017-09-27 19:38:54 +02:00
Dennis Felsing 5b05e558dc Fix grammar (thanks noby) 2017-09-25 09:07:12 +02:00
heinrich5991 9d5ba770e9 teehistorian: Only record non-default config vars 2017-09-24 21:11:04 +02:00
heinrich5991 3efa490cb7 teehistorian: Remove global buffer
This removes the possibility of the buffer filling up and discarding
data.
2017-09-20 02:23:28 +02:00
heinrich5991 9761e9606a Make most user input teehistoric
Exclude private stuff like chat messages and votes.
2017-09-20 02:23:28 +02:00
heinrich5991 6ef9c8dbcd First working version of teehistorian
teehistorian records all inputs from the players as well as the player
positions in each tick. It stores this info in a highly compressible
output format (I've achived 5x compression using xz or bz2).
2017-09-20 02:16:11 +02:00
def 03fa475b5e Implement /pause [name] and /spec [name] 2017-09-18 19:12:01 +02:00
Dennis Felsing 43d0299a45 Merge branch 'master' into pr_ddnet_fix_msvs_warnings 2017-09-16 11:17:39 +02:00
heinrich5991 4d96090770 Fix MSVS warnings
```
warning C4291: no matching operator delete found; memory will not be freed if initialization throws an exception
warning C4305: truncation from 'double' to 'float'
warning C4805: unsafe mix of type 'bool' and type 'int' in operation
```
2017-09-06 10:54:29 +02:00
def 0a09af4b33 str_format instead of sprintf 2017-09-03 09:01:25 +02:00
def 862e26dd08 Clean up time handling a bit 2017-09-03 08:48:21 +02:00
heinrich5991 2682480f8a Rename GetUncompressedDataSize to GetDataSize
Also rename the old `GetDataSize` to `GetFileDataSize`. `GetDataSize`
now returns the actual data size, not the data size before
decompression.
2017-08-30 08:36:17 +02:00
sctt 0849fa6024 fixing map_resave and adding map_replace_image
Update datafile.h

Update datafile.cpp

Update datafile.cpp

Update map_resave.cpp

Update datafile.h

Update map_resave.cpp

Update datafile.h

Update datafile.cpp

Update config_store.cpp

Update config_retrieve.cpp

Update io.cpp

Update gamecontext.cpp

Update config_store.cpp

Update CMakeLists.txt

Create map_replace_image.cpp

Update map_replace_image.cpp

fixing bug with height and witdth
2017-08-29 16:21:16 +02:00
def ac2943a49b utf8mb4 in database for real utf8 2017-08-26 09:00:33 +02:00
def fb252c4940 Fix compilation 2017-08-25 13:27:37 +02:00
heinrich5991 1ae004ba46 Make a copy of the input only after sanitizing it
This fixes a physics bug that allowed players to set their mouse
direction to (NaN, NaN), resulting in funny effects.
2017-08-25 13:20:10 +02:00
def 0e1cc205ef Fix formatting for server chat messages with time in already 2017-08-21 20:48:11 +02:00
def 98520bb407 other kind of fix 2017-08-19 09:36:13 +02:00
def d40dd4f362 Don't try next SQL server when /times returns empty 2017-08-19 09:32:14 +02:00
heinrich5991 33315452c3 Merge branch 'master' into leak_fix 2017-07-31 20:42:32 +02:00
def 0a28556481 A bit nicer birthday message 2017-07-31 18:24:16 +02:00
def d9aeeae3fc Fix sql_score.cpp formatters 2017-07-30 14:23:25 +02:00
def c12082c2ef Not too many messages 2017-07-30 14:15:45 +02:00
def 7a3b7c6228 oops 2017-07-29 23:13:04 +02:00
def f3d4fcf012 Print message when team starts playing to team members 2017-07-29 23:11:33 +02:00
HMH d03e91153c removed unused Dest function for layers 2017-07-28 14:43:03 +02:00
heinrich5991 6247aa0c7f Enable -Wextra and -Wformat=2
Also annotate `dbg_msg`, `str_format` and `str_timestamp_ex` so that the
compiler can determine whether the format strings are correct.

Fix the compiler warnings generated by these extra warnings -- some of
them were security issues.
2017-07-27 20:38:17 +02:00