Commit Graph

31 Commits

Author SHA1 Message Date
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Robert Adam
923045ac60 FORMAT: Run clang-format 10 on all source files 2021-04-16 21:05:52 +02:00
Robert Adam
27dbee8e62 FEAT(client): Plugin framework
This commit introduces a new plugin framework into the codebase of the
Mumble client. Note that "plugin" here really refers to a (more or less)
general purpose plugin and is therefore not to be confused with the
previously available positional data plugins (only responsible for
fetching positional data from a running game and passing that to
Mumble).

The plugin interface is written in C, removing the compiler-dependence
the old "plugins" had. Instead plugins can now be written in an
arbitrary language as long as that language is capable of being compiled
into a shared library and also being capable of being C-compatible.

As already indicated a plugin is essentially a shared library that
provides certain functions that allow Mumble to interface with it.

Inside Mumble the so-called PluginManager is responsible for managing
the plugins and relaying events to the respective callbacks. Plugins
themselves can also interact with Mumble on their own initiative by
using the provided API functions.

Fixes #2455
Fixes #2148
Fixes #1594
Fixes #2051
Fixes #3742
Fixes #4575
Fixes #4751
2021-04-16 20:15:44 +02:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
freddii
9889a0fa99 DOCS: fixed typos 2021-01-20 22:17:38 +01:00
Robert
af7dac72f4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
Popkornium18
410837526c REFAC(server): replace NULL with nullptr
This changes all occurances of NULL in the murmur source
dir to nullptr. Additionally explicit comparisons with NULL were
removed.
2020-07-02 00:55:36 +02:00
Robert Adam
029b9802f9 src/murmur/ServerUser: Improve implementation of the leaky bucket algorithm
The most important change is to use a timer that is based on a monotonic
clock in order to avoid time jumps and this inconsistent measurements
of time intervals (see
https://github.com/mumble-voip/mumble/issues/3985#issuecomment-601754212).

Furthermore the code-style has been adapted (m_ prefix instead of usage
of this->) and documentation has been added / extended.
2020-03-21 14:17:41 +01:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Mikko Rantanen
d50a20fc53
Use QDateTime to avoid time underflow 2019-10-28 02:50:12 +02:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
According to Qt's documentation the PCH header doesn't need to be included.

From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:

"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."

"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
2019-09-12 00:13:35 +02:00
Vitaly Sinilin
2825a4da9e Get rid of unused variable "records"
This variable has been unused since 0fc5d55, which is the very same
commit where it was introduced.
2019-09-10 01:15:27 +03:00
Davide Beatrici
da7baf5313 ServerUser: use QTime instead of std::chrono and ctime
The legacy implementation (with ctime), used when std::chrono is not available (C++ < 11), caused the client's messages to be permanently blocked until it reconnected.
More specifically, millisecondsBetween() always returned 0.

This commit replaces both implementations with a simpler one which makes use of QTime.
2019-05-25 21:33:58 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
MadMaurice
73a0b2f888 Make Rate limiter configurable.
This adds messagelimit and messageburst to the configuration file murmur.ini as
well as the ability to set these live.

Though adjusting these live is entirely possible, they only take effect for new connections.
2018-09-08 01:58:23 +02:00
MadMaurice
4761ca41ab Lower bucket params
Use 1 tokens per second and 5 burst instead of 4 tokens per second and 30 burst
2018-08-31 00:56:46 +02:00
MadMaurice
0daec57f5c Prevent instability and crash due to message flood
This patch adds a rate limiting to selected patches. The underlying rate limiter
used is the Leaky-Bucket algorithm. It allows for a burst of messages, but
limits them after a specified amount of messages within a time frame.
2018-08-30 19:53:05 +02:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
91ebb8b0b5 Update tree copyrights to 2017. 2017-01-08 21:05:57 +01:00
Mikkel Krautz
cb446f1808 Server: convert bUdp to use QAtomicInt for proper synchronization. 2016-06-24 00:03:12 +02:00
Mikkel Krautz
9dfca42ab9 Add Mutex internal to BanwidthRecord. 2016-06-24 00:03:12 +02:00
Mikkel Krautz
54c28d3ee1 src/murmur: update to use LICENSE.header. 2016-05-10 22:42:02 +02:00
Mikkel Krautz
39aebda1ad Channel, ServerUser: make cast operator non-const.
Places that use the QString() conversion operator
for Channel and ServerUser sometimes end up using
the QString move constructor, which doesn't take
const strings.

Example of an error:

	Messages.cpp:1055:65: error: no viable conversion from 'Channel' to 'QString'
				log(uSource, QString("Renamed channel %1 to %2").arg(QString(*c),

Fixes C++11 build on OS X (clang/libc++).
2016-05-09 23:49:43 +02:00
Thorvald Natvig
86fc793a5d Opus codec negotiation (server) 2011-11-06 19:00:33 -08:00
Kissaki
5fe6801b1b handle some cppcheck-found issues:
* uninitialized membervars,
* AudioOutput.cpp: fix delete on array to delete[]
* OSS.cpp: close file descriptor in false data case
* OverlayEditorScene.cpp: rm duplicate logic
* fix ifndef to match usage of declared variable
* member var initializations
* check for null (ds in d3d9 as some lines above),
* lower scope of var decl.,
* swap bufsize check and array dereference so check is before! deref,
* initialize member vars in constr.
2011-10-09 14:01:58 +02:00
Benjamin Jemlich
7529297760 Fix uppercase vs lowercase vs PCH include problems 2011-05-15 17:15:54 +02:00
Thorvald Natvig
07bf14614a Use TCP destination as UDP source 2011-05-11 07:25:56 +02:00
Thorvald Natvig
f3437a6ba7 Update copyright year ranges of dev team. 2011-03-18 05:52:51 +01:00
Stefan Hacker
2e816c7177 Make idleseconds not only reset on voice but on all actions caused by the user 2010-02-02 18:29:06 +01:00
Thorvald Natvig
7d8100275d Split ServerUser from Server.cpp 2010-01-28 12:34:38 +01:00