mirror of
https://github.com/gmod-integration/lua.git
synced 2025-04-30 07:05:26 +00:00
Compare commits
258 Commits
Author | SHA1 | Date | |
---|---|---|---|
d6a378ec45 | |||
91e8b3d2ef | |||
499c382066 | |||
da9b9d2392 | |||
be3a44760d | |||
3ebd9c0989 | |||
06efe727e2 | |||
9e9a2dfe01 | |||
94ebf5cba6 | |||
8231f4a9ac | |||
5aee9272cd | |||
c29a12dfd2 | |||
e7b9953185 | |||
1661173526 | |||
4caed5845f | |||
5c78fae9a6 | |||
d7930c9194 | |||
2ea0bf00e2 | |||
4ab93e1afe | |||
0a7ae28a75 | |||
a6ab55dd4a | |||
4572d64017 | |||
2d2275d0cb | |||
03bb2052f3 | |||
af77c08976 | |||
03c6585cff | |||
d3e5546f14 | |||
f361bd884a | |||
![]() |
34d22baab9 | ||
ef20f7c4f3 | |||
3a2ee67a39 | |||
f65141800f | |||
e708172658 | |||
6d06f5845a | |||
52238a493b | |||
6248aa6853 | |||
ebfef087ac | |||
82e01ef55e | |||
18c494c71a | |||
c3f9697430 | |||
c32be58b94 | |||
3cdfe82207 | |||
b60cf72dbb | |||
9919559b63 | |||
6dbc88911d | |||
568c5c6f5c | |||
![]() |
aab464b3ff | ||
0ca3e89ed4 | |||
65a624a67a | |||
1a7c6a2a14 | |||
55f5b99094 | |||
2542a52051 | |||
3e5e2b3056 | |||
cc3cfd5b3e | |||
4085a5148c | |||
ad58db3878 | |||
5aee45ea48 | |||
c273ed209b | |||
462cb5e102 | |||
f7614450e7 | |||
aaec710197 | |||
cd294bebd9 | |||
eed6ccf2a6 | |||
b39a1e2349 | |||
c97f817a51 | |||
2e0e52eb37 | |||
71686e28b6 | |||
30b46dc1fe | |||
0aa97895c5 | |||
a346ae4b9d | |||
91bfda1c94 | |||
acfc860802 | |||
53d6d002fb | |||
6a7717ad74 | |||
5192167153 | |||
b6cd973e38 | |||
98a2d421bd | |||
b8d6c2e87d | |||
9144bdf977 | |||
1ce99b7e76 | |||
42a216dfb6 | |||
f67ed9e62a | |||
70ef993039 | |||
43a567750e | |||
bc3fae20c2 | |||
80d5a9942c | |||
8351468779 | |||
39b857c1f3 | |||
e3d95296b2 | |||
e6f2b079be | |||
2ab252629a | |||
4ae8735a25 | |||
77f21a6131 | |||
efa2821a70 | |||
f250dba952 | |||
94879952e8 | |||
5127cc2307 | |||
b96777d014 | |||
769e4f0eef | |||
375a96a888 | |||
5984ab5013 | |||
466e3cad4e | |||
e3dfaba296 | |||
b9e2e9fa04 | |||
8a90793b47 | |||
bcbcd03323 | |||
![]() |
c499705d5a | ||
df5701ed4f | |||
e3e4b6a0f7 | |||
d7c1bc5a60 | |||
d7e8fee85f | |||
37d17db78d | |||
4dc2a46dc3 | |||
9324d7c293 | |||
bbe66a70ae | |||
f7bb6d8795 | |||
4c85d84c1a | |||
12c5ef135a | |||
f0f9283341 | |||
9268688cfe | |||
336329d909 | |||
aeca5e4de9 | |||
90de28575c | |||
e7f160df05 | |||
6c7e64a572 | |||
052726e3d6 | |||
66269d39de | |||
ee1e2caf30 | |||
0f7dbb297f | |||
5738d323f2 | |||
4ab1c2768f | |||
8753137c3b | |||
8ce3390666 | |||
7b5a180ba5 | |||
5ffa87a605 | |||
ddd0aeec1d | |||
e140abce96 | |||
12a017630c | |||
8078456b2a | |||
048f70b6b3 | |||
3ecba4cda8 | |||
b708569ff6 | |||
0ae9631880 | |||
e433a1f343 | |||
![]() |
22649687f1 | ||
![]() |
691fdab6fc | ||
![]() |
b93de9c59f | ||
![]() |
b4b93ffd1d | ||
![]() |
581c270446 | ||
![]() |
d77bc64372 | ||
![]() |
6916b91ee7 | ||
![]() |
0048a7cc19 | ||
![]() |
b2c00e0be0 | ||
![]() |
1aac9f7ad3 | ||
![]() |
3cc38b30ff | ||
![]() |
3613cdd255 | ||
![]() |
6324b24b95 | ||
![]() |
843b1ddfcf | ||
![]() |
96fa9f1190 | ||
![]() |
ded2ea4a6a | ||
![]() |
d2a86b2182 | ||
![]() |
40ee52e41b | ||
![]() |
0ffd60ff6d | ||
![]() |
d9340b2436 | ||
![]() |
8cdce17cab | ||
![]() |
aa0b7ebd81 | ||
![]() |
1d813e0562 | ||
![]() |
823bcf9ddc | ||
![]() |
ad609e3ae2 | ||
![]() |
fac8fce32e | ||
![]() |
b51d317d8d | ||
![]() |
336ae27b17 | ||
![]() |
343f00798c | ||
![]() |
3210d70554 | ||
![]() |
797aabd3cf | ||
![]() |
8b5280e736 | ||
![]() |
2b09ea91c9 | ||
![]() |
c53952f163 | ||
![]() |
75001c3ddc | ||
![]() |
2bdf0383dd | ||
![]() |
ffe83a66e4 | ||
![]() |
6699c9f4ae | ||
![]() |
3bb44ccbc0 | ||
![]() |
ce4d1be667 | ||
![]() |
f6f47e2525 | ||
![]() |
b8c04246b9 | ||
![]() |
b654535813 | ||
![]() |
299b07a9ed | ||
![]() |
58d6477d4b | ||
![]() |
471d0ca0a2 | ||
![]() |
d80e92607d | ||
![]() |
007838d7a3 | ||
![]() |
9e2566731e | ||
![]() |
000340cd04 | ||
![]() |
015dee7d38 | ||
![]() |
b6600612d8 | ||
![]() |
eb2a7a2cf3 | ||
![]() |
368f7979af | ||
![]() |
0eba1f0d4d | ||
![]() |
7dea7d5cce | ||
![]() |
de0588d02c | ||
![]() |
a634821f25 | ||
![]() |
09be85b49d | ||
![]() |
8f4249a68d | ||
![]() |
88b5505550 | ||
![]() |
36e2de1883 | ||
![]() |
7a739564f1 | ||
![]() |
e7210a5424 | ||
![]() |
513920baa0 | ||
![]() |
7f8e81c909 | ||
![]() |
c202329f11 | ||
![]() |
a24f1a846d | ||
![]() |
fe44cb1180 | ||
![]() |
bd38456959 | ||
![]() |
89d6d502bb | ||
![]() |
44480a7499 | ||
![]() |
a9f33efd4c | ||
![]() |
0143b77db8 | ||
![]() |
061af311b1 | ||
![]() |
209edbf8a6 | ||
![]() |
0cb1caa020 | ||
![]() |
00880889bf | ||
![]() |
40f7bb8079 | ||
![]() |
4219ebcf12 | ||
![]() |
c38c473762 | ||
![]() |
8e9c4717b6 | ||
![]() |
805b7d3fef | ||
![]() |
51c24d13f5 | ||
![]() |
9a6e29382e | ||
![]() |
11be2c9d06 | ||
![]() |
2b7b01b132 | ||
![]() |
e72fbef924 | ||
![]() |
b20e453e7e | ||
![]() |
74dbccbc0b | ||
![]() |
ee5c170560 | ||
![]() |
d55e160320 | ||
![]() |
92635144b5 | ||
![]() |
d525675e4f | ||
![]() |
b77633275c | ||
![]() |
28c064241a | ||
![]() |
909b429111 | ||
![]() |
d2312f55a9 | ||
![]() |
e694dcddcd | ||
![]() |
93f02e1ac4 | ||
![]() |
31ed05dfb4 | ||
![]() |
0688f74629 | ||
![]() |
51fba632d8 | ||
![]() |
129faacac4 | ||
![]() |
a99acca772 | ||
![]() |
f92c15c925 | ||
![]() |
ac216b558f | ||
![]() |
b2962a06a5 | ||
![]() |
0be3a8bd55 | ||
![]() |
4089d920ab | ||
![]() |
016ad6187b | ||
![]() |
98865fd582 | ||
![]() |
4c6977bede | ||
![]() |
f3aae78525 |
14
.github/FUNDING.yml
vendored
Normal file
14
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [linventif]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
417
LICENSE.md
417
LICENSE.md
|
@ -1,417 +0,0 @@
|
|||
# Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public: wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
28
README.md
28
README.md
|
@ -1,28 +0,0 @@
|
|||
# Gmod Integration
|
||||
|
||||
## Description
|
||||
|
||||
Gmod Integration is a Garry's Mod addon that allows you to connect your Garry's Mod server with your Discord server. From server status and player stats to role synchronization, troll protection, suggestions, leaderboard, and a ticket system, we've thought of everything.
|
||||
|
||||
🛠️・Simplicity at its Best: No need to worry about bot hosting, website maintenance, or database management. We handle all the technicalities, so you can focus on what matters.
|
||||
|
||||
🚀・Straightforward Setup: Install our workshop addon, invite our bot to your Discord, and you're good to go. Configuration is a breeze with our user-friendly website.
|
||||
|
||||
🌟・A Trusted Choice: Over 3,350 users across more than 48 guilds have chosen Gmod Integration. Will you join our growing community?
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Add Workshop Addon](https://gmod-integration.com/workshop)
|
||||
- [Invite Bot](https://gmod-integration.com/invite)
|
||||
|
||||
## Documentation
|
||||
|
||||
You can find the documentation [here](https://docs.gmod-integration.com).
|
||||
|
||||
## Important
|
||||
|
||||
Do not download the addon from GitHub. You must download it from the [Steam Workshop](https://gmod-integration.com/workshop) or you will probably get errors because we actually work on the addon.
|
||||
|
||||
## Support
|
||||
|
||||
If you have any problem with the addon, please contact us on our [Discord server](https://gmod-integration.com/discord).
|
|
@ -1,32 +1,17 @@
|
|||
if game.SinglePlayer() then return end
|
||||
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
|
||||
gmInte = {}
|
||||
gmInte.version = "0.2.1"
|
||||
gmInte.config = {
|
||||
["redownloadMaterials"] = false,
|
||||
}
|
||||
if game.SinglePlayer() then return print("Gmod Integration is not supported in Singleplayer!") end
|
||||
gmInte = gmInte || {}
|
||||
gmInte.version = "0.4.9"
|
||||
gmInte.config = {}
|
||||
gmInte.materials = {}
|
||||
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
local function loadConfig()
|
||||
if (SERVER) then
|
||||
print(" | Loading File | gmod_integration/sv_config.lua")
|
||||
local function loadServerConfig()
|
||||
RunConsoleCommand("sv_hibernate_think", "1")
|
||||
if (!file.Exists("gm_integration", "DATA") || !file.Exists("gm_integration/config.json", "DATA")) then
|
||||
if !file.Exists("gm_integration", "DATA") || !file.Exists("gm_integration/config.json", "DATA") then
|
||||
file.CreateDir("gm_integration")
|
||||
file.Write("gm_integration/config.json", util.TableToJSON(gmInte.config, true))
|
||||
else
|
||||
if (gmInte.config.id && gmInte.config.id != "") then return end
|
||||
|
||||
if gmInte.config.id && gmInte.config.id != "" then return end
|
||||
local oldConfig = util.JSONToTable(file.Read("gm_integration/config.json", "DATA"))
|
||||
if (!oldConfig.version || (oldConfig.version < gmInte.version)) then
|
||||
if !oldConfig.version || (oldConfig.version < gmInte.version) then
|
||||
print(" | Merging Config | gmod_integration/sv_config.lua")
|
||||
table.Merge(gmInte.config, oldConfig)
|
||||
gmInte.config.version = gmInte.version
|
||||
|
@ -35,42 +20,37 @@ local function loadConfig()
|
|||
gmInte.config = oldConfig
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function loadAllFiles(folder)
|
||||
local files, folders = file.Find(folder .. "/*", "LUA")
|
||||
for k, v in SortedPairs(files) do
|
||||
local path = folder .. "/" .. v
|
||||
for k, fileName in SortedPairs(files) do
|
||||
local path = folder .. "/" .. fileName
|
||||
print(" | Loading File | " .. path)
|
||||
if string.StartWith(v, "cl_") then
|
||||
if string.StartWith(fileName, "cl_") then
|
||||
if SERVER then
|
||||
AddCSLuaFile(path)
|
||||
else
|
||||
include(path)
|
||||
end
|
||||
elseif string.StartWith(v, "sv_") then
|
||||
if SERVER then
|
||||
elseif string.StartWith(fileName, "sv_") then
|
||||
if SERVER then include(path) end
|
||||
elseif string.StartWith(fileName, "sh_") then
|
||||
if SERVER then AddCSLuaFile(path) end
|
||||
include(path)
|
||||
end
|
||||
elseif string.StartWith(v, "sh_") then
|
||||
if SERVER then
|
||||
AddCSLuaFile(path)
|
||||
|
||||
if fileName == "sv_config.lua" then
|
||||
loadServerConfig()
|
||||
continue
|
||||
end
|
||||
include(path)
|
||||
end
|
||||
if (path == "gmod_integration/sv_config.lua") then loadConfig() continue end
|
||||
end
|
||||
|
||||
for k, v in SortedPairs(folders, true) do
|
||||
loadAllFiles(folder .. "/" .. v, name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
//
|
||||
// Load Files
|
||||
//
|
||||
|
||||
print(" ")
|
||||
print(" ")
|
||||
print(" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ")
|
||||
|
|
44
lua/gmod_integration/client/cl__color.lua
Normal file
44
lua/gmod_integration/client/cl__color.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
local colorTbl = {
|
||||
["background"] = Color(41, 44, 54),
|
||||
["primary"] = Color(58, 62, 73),
|
||||
["primary-active"] = Color(58, 62, 73, 163),
|
||||
["secondary"] = Color(44, 47, 59),
|
||||
["secondary-active"] = Color(31, 33, 40),
|
||||
["green"] = Color(78, 151, 53),
|
||||
["green-active"] = Color(58, 122, 38),
|
||||
["orange"] = Color(204, 145, 62),
|
||||
["orange-active"] = Color(168, 122, 43),
|
||||
["red"] = Color(201, 59, 59),
|
||||
["red-active"] = Color(168, 43, 43),
|
||||
["blue"] = Color(67, 197, 214),
|
||||
["blue-active"] = Color(41, 152, 167),
|
||||
["purple"] = Color(73, 90, 252),
|
||||
["purple-active"] = Color(47, 63, 159),
|
||||
["font"] = Color(255, 255, 255),
|
||||
["font-secondary"] = Color(179, 179, 179)
|
||||
}
|
||||
|
||||
function gmInte.getColor(name)
|
||||
return colorTbl[name]
|
||||
end
|
||||
|
||||
function gmInte.applyPaint(element, id)
|
||||
if element.DoClick then
|
||||
element:SetTextColor(gmInte.getColor("font"))
|
||||
element.Paint = function(self, w, h)
|
||||
local color = gmInte.getColor("primary")
|
||||
if self:IsHovered() then color = gmInte.getColor("primary-active") end
|
||||
draw.RoundedBox(0, 0, 0, w, h, color)
|
||||
end
|
||||
elseif element.SetTitle then
|
||||
element.Paint = function(self, w, h)
|
||||
draw.RoundedBox(0, 0, 0, w, h, gmInte.getColor("background"))
|
||||
// first 20px = title bar = primary
|
||||
draw.RoundedBox(0, 0, 0, w, 22, gmInte.getColor("primary"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.getFrameName(name)
|
||||
return "Gmod Integration v" .. (gmInte.version || "0.0.0") .. " - " .. name
|
||||
end
|
35
lua/gmod_integration/client/cl_context_menu.lua
Normal file
35
lua/gmod_integration/client/cl_context_menu.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
list.Set("DesktopWindows", "GmodIntegration:DesktopWindows", {
|
||||
icon = "gmod_integration/logo_context.png",
|
||||
title = "GM Integration",
|
||||
width = 960,
|
||||
height = 700,
|
||||
onewindow = true,
|
||||
init = function(icon, window)
|
||||
window:Close()
|
||||
gmInte.openAdminConfig()
|
||||
end
|
||||
})
|
||||
|
||||
list.Set("DesktopWindows", "GmodIntegration:DesktopWindows:ReportBug", {
|
||||
icon = "gmod_integration/logo_context_report.png",
|
||||
title = "Report Bug",
|
||||
width = 960,
|
||||
height = 700,
|
||||
onewindow = true,
|
||||
init = function(icon, window)
|
||||
window:Close()
|
||||
gmInte.openReportBug()
|
||||
end
|
||||
})
|
||||
|
||||
list.Set("DesktopWindows", "GmodIntegration:DesktopWindows:SendScreen", {
|
||||
icon = "gmod_integration/logo_context_screen.png",
|
||||
title = "Screenshot",
|
||||
width = 960,
|
||||
height = 700,
|
||||
onewindow = true,
|
||||
init = function(icon, window)
|
||||
window:Close()
|
||||
gmInte.contextScreenshot()
|
||||
end
|
||||
})
|
|
@ -1,7 +1,7 @@
|
|||
surface.CreateFont("GmodIntegration_Roboto_16", {
|
||||
font = "Roboto",
|
||||
size = 16,
|
||||
weight = 500,
|
||||
weight = 100,
|
||||
antialias = true,
|
||||
shadow = false
|
||||
})
|
||||
|
|
|
@ -1,373 +0,0 @@
|
|||
local function saveConfig(setting, value)
|
||||
gmInte.SendNet("3", {
|
||||
[setting] = value
|
||||
})
|
||||
end
|
||||
|
||||
local configCat = {
|
||||
"Authentication",
|
||||
"Main",
|
||||
"Trust & Safety",
|
||||
"Punishment",
|
||||
"Other"
|
||||
}
|
||||
|
||||
local possibleConfig = {
|
||||
["id"] = {
|
||||
["label"] = "ID",
|
||||
["description"] = "Server ID found on the webpanel.",
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = "Authentication"
|
||||
},
|
||||
["token"] = {
|
||||
["label"] = "Token",
|
||||
["description"] = "Server Token found on the webpanel.",
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = "Authentication"
|
||||
},
|
||||
["sendLog"] = {
|
||||
["label"] = "Logs",
|
||||
["description"] = "Activate or deactivate logs.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Main"
|
||||
},
|
||||
["logBotActions"] = {
|
||||
["label"] = "Log Bot Actions",
|
||||
["description"] = "Activate or deactivate logs for bot actions.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Main"
|
||||
},
|
||||
["filterOnBan"] = {
|
||||
["label"] = "Block Discord Ban Player",
|
||||
["description"] = "Block players banned on the discord server.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Trust & Safety"
|
||||
},
|
||||
["filterOnTrust"] = {
|
||||
["label"] = "Block UnTrust Player",
|
||||
["description"] = "Block players with a trust level lower than the minimal trust level set in the config.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Trust & Safety"
|
||||
},
|
||||
["minimalTrust"] = {
|
||||
["label"] = "Minimal Trust Level",
|
||||
["description"] = "The minimal trust level to be able to join the server.",
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = "Trust & Safety"
|
||||
},
|
||||
["syncChat"] = {
|
||||
["label"] = "Sync Chat",
|
||||
["description"] = "Sync chat between the server and the discord server.",
|
||||
["websocket"] = true,
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Main"
|
||||
},
|
||||
["syncBan"] = {
|
||||
["label"] = "Sync Ban",
|
||||
["description"] = "Sync chat between the server and the discord server.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Punishment"
|
||||
},
|
||||
["syncTimeout"] = {
|
||||
["label"] = "Sync Timeout",
|
||||
["description"] = "Sync chat between the server and the discord server.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Punishment"
|
||||
},
|
||||
["syncKick"] = {
|
||||
["label"] = "Sync Kick",
|
||||
["description"] = "Sync chat between the server and the discord server.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Punishment"
|
||||
},
|
||||
["forcePlayerLink"] = {
|
||||
["label"] = "Force Player Verif",
|
||||
["description"] = "Sync chat between the server and the discord server.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Main"
|
||||
},
|
||||
["supportLink"] = {
|
||||
["label"] = "Support Link",
|
||||
["description"] = "Server ID found on the webpanel.",
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = "Trust & Safety"
|
||||
},
|
||||
["debug"] = {
|
||||
["label"] = "Debug",
|
||||
["description"] = "Activate or deactivate debug mode.",
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value)
|
||||
return value
|
||||
end,
|
||||
["onEdit"] = function(setting, value)
|
||||
saveConfig(setting, value == "Enabled" && true || false)
|
||||
end,
|
||||
["category"] = "Other"
|
||||
},
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
// if data.websocket is false add button to download websocket
|
||||
if !data.websocket then
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText("Download Websocket")
|
||||
button.DoClick = function()
|
||||
gui.OpenURL("https://github.com/FredyH/GWSockets/releases")
|
||||
end
|
||||
button:SetSize(buttonGrid:GetColWide(), buttonGrid:GetRowHeight())
|
||||
buttonGrid:AddItem(button)
|
||||
end
|
||||
|
||||
*/
|
||||
|
||||
local buttonsInfo = {
|
||||
{
|
||||
["label"] = "Open Webpanel",
|
||||
["func"] = function()
|
||||
gui.OpenURL("https://gmod-integration.com/config/server")
|
||||
end,
|
||||
},
|
||||
{
|
||||
["label"] = "Test Connection",
|
||||
["func"] = function()
|
||||
gmInte.SendNet("1")
|
||||
end,
|
||||
},
|
||||
{
|
||||
["label"] = "Buy Premium",
|
||||
["func"] = function()
|
||||
gui.OpenURL("https://gmod-integration.com/premium")
|
||||
end,
|
||||
},
|
||||
{
|
||||
["label"] = "Install Websocket",
|
||||
["condition"] = function(data)
|
||||
return !data.websocket
|
||||
end,
|
||||
["func"] = function()
|
||||
gui.OpenURL("https://github.com/FredyH/GWSockets/releases")
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
function gmInte.openConfigMenu(data)
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(400, (600 / 1080) * ScrH())
|
||||
frame:Center()
|
||||
frame:SetTitle("Gmod Integration - Server Config")
|
||||
frame:SetDraggable(true)
|
||||
frame:ShowCloseButton(true)
|
||||
frame:MakePopup()
|
||||
|
||||
local scrollPanel = vgui.Create("DScrollPanel", frame)
|
||||
scrollPanel:Dock(FILL)
|
||||
|
||||
// add message explain that this config is superiort then the webpanel config
|
||||
local messagePanel = vgui.Create("DPanel", scrollPanel)
|
||||
messagePanel:Dock(TOP)
|
||||
messagePanel:SetSize(300, 60)
|
||||
messagePanel:DockMargin(10, 0, 10, 10)
|
||||
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
|
||||
local messageLabel = vgui.Create("DLabel", messagePanel)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:SetText("This config is superior to the webpanel config.\nIf you change something here you can override the webpanel config.\nSome features require a websocket connection to work properly.")
|
||||
messageLabel:SetWrap(true)
|
||||
|
||||
|
||||
for k, catName in pairs(configCat) do
|
||||
// create DCollapsibleCategory
|
||||
local collapsibleCategory = vgui.Create("DCollapsibleCategory", scrollPanel)
|
||||
collapsibleCategory:Dock(TOP)
|
||||
collapsibleCategory:DockMargin(10, 0, 10, 10)
|
||||
collapsibleCategory:SetLabel(catName)
|
||||
collapsibleCategory:SetExpanded(true)
|
||||
|
||||
// create DPanelList as content of DCollapsibleCategory
|
||||
local configList = vgui.Create("DPanelList", collapsibleCategory)
|
||||
configList:Dock(FILL)
|
||||
configList:SetSpacing(5)
|
||||
configList:EnableHorizontal(false)
|
||||
configList:EnableVerticalScrollbar(false)
|
||||
collapsibleCategory:SetContents(configList)
|
||||
|
||||
for k, v in pairs(possibleConfig) do
|
||||
if v.category == catName then
|
||||
local panel = vgui.Create("DPanel", configList)
|
||||
panel:Dock(TOP)
|
||||
panel:SetSize(300, 25)
|
||||
panel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
|
||||
local label = vgui.Create("DLabel", panel)
|
||||
label:Dock(LEFT)
|
||||
label:SetSize(140, 25)
|
||||
label:SetText(v.label)
|
||||
-- label:SetContentAlignment(5)
|
||||
|
||||
local input
|
||||
|
||||
if v.type == "textEntry" then
|
||||
input = vgui.Create("DTextEntry", panel)
|
||||
input:SetText(v.value(k, data[k]))
|
||||
local isLastID = 0
|
||||
input.OnChange = function(self)
|
||||
isLastID = isLastID + 1
|
||||
local isLocalLastID = isLastID
|
||||
timer.Simple(v.onEditDelay || 0.5, function()
|
||||
if isLocalLastID == isLastID then
|
||||
v.onEdit(k, self:GetValue())
|
||||
end
|
||||
end)
|
||||
end
|
||||
elseif v.type == "checkbox" then
|
||||
input = vgui.Create("DComboBox", panel)
|
||||
// if websocket is required and websocket is not enabled (!GWSockets) then disable the checkbox
|
||||
if v.websocket && !data.websocket then
|
||||
input:SetEnabled(false)
|
||||
end
|
||||
input:AddChoice("Enabled")
|
||||
input:AddChoice("Disabled")
|
||||
input:SetText(v.value(k, data[k]) && "Enabled" || "Disabled")
|
||||
input.OnSelect = function(self, index, value)
|
||||
v.onEdit(k, value)
|
||||
end
|
||||
end
|
||||
|
||||
input:Dock(FILL)
|
||||
input:SetSize(150, 25)
|
||||
|
||||
if v.description then
|
||||
if (v.websocket && !data.websocket) then
|
||||
v.description = v.description .. "\n\nThis feature require a websocket connection to work properly."
|
||||
end
|
||||
input:SetTooltip(v.description)
|
||||
end
|
||||
|
||||
configList:AddItem(panel)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
// grid of buttons (2 buttons per row take 50% of the width)
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(5, 10, 5, 5)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() / 2 - 10)
|
||||
buttonGrid:SetRowHeight(35)
|
||||
|
||||
local buttonsCount = 0
|
||||
for k, v in pairs(buttonsInfo) do
|
||||
if v.condition && !v.condition(data) then continue end
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(v.label)
|
||||
button.DoClick = function()
|
||||
v.func()
|
||||
end
|
||||
button:SetSize(buttonGrid:GetColWide(), buttonGrid:GetRowHeight())
|
||||
buttonGrid:AddItem(button)
|
||||
buttonsCount = buttonsCount + 1
|
||||
end
|
||||
|
||||
if buttonsCount % 2 == 1 then
|
||||
local lastButton = buttonGrid:GetItems()[buttonsCount]
|
||||
lastButton:SetWide(frame:GetWide() - 20)
|
||||
end
|
||||
end
|
||||
|
||||
list.Set("DesktopWindows", "GmodIntegration:DesktopWindows", {
|
||||
icon = "gmod_integration/logo_context.png",
|
||||
title = "GM Integration",
|
||||
width = 960,
|
||||
height = 700,
|
||||
onewindow = true,
|
||||
init = function(icon, window)
|
||||
window:Close()
|
||||
gmInte.openAdminConfig()
|
||||
end
|
||||
}
|
||||
)
|
399
lua/gmod_integration/client/cl_gui_admin.lua
Normal file
399
lua/gmod_integration/client/cl_gui_admin.lua
Normal file
|
@ -0,0 +1,399 @@
|
|||
local function saveConfig(setting, value)
|
||||
gmInte.SendNet("saveConfig", {
|
||||
[setting] = value
|
||||
})
|
||||
end
|
||||
|
||||
local colorTable = {
|
||||
["text"] = Color(255, 255, 255, 255),
|
||||
["background"] = Color(0, 0, 0, 200),
|
||||
["button"] = Color(0, 0, 0, 200),
|
||||
["buttonHover"] = Color(0, 0, 0, 255),
|
||||
["buttonText"] = Color(255, 255, 255, 255),
|
||||
["buttonTextHover"] = Color(255, 255, 255, 255),
|
||||
}
|
||||
|
||||
function gmInte.needRestart()
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(400, 120)
|
||||
frame:Center()
|
||||
frame:SetTitle(gmInte.getFrameName(gmInte.getTranslation("admin.restart_required", "Restart Required")))
|
||||
frame:SetDraggable(true)
|
||||
frame:ShowCloseButton(true)
|
||||
frame:MakePopup()
|
||||
gmInte.applyPaint(frame)
|
||||
local messagePanel = vgui.Create("DPanel", frame)
|
||||
messagePanel:Dock(TOP)
|
||||
messagePanel:SetSize(300, 40)
|
||||
messagePanel:DockMargin(10, 0, 10, 10)
|
||||
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
local messageLabel = vgui.Create("DLabel", messagePanel)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:SetText(gmInte.getTranslation("admin.restart_required_description", "Some changes require a restart to be applied.\nRestart now ?"))
|
||||
messageLabel:SetContentAlignment(5)
|
||||
messageLabel:SetWrap(true)
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(5, 10, 5, 5)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() / 2 - 5)
|
||||
buttonGrid:SetRowHeight(35)
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(gmInte.getTranslation("admin.restart", "Restart"))
|
||||
button.DoClick = function()
|
||||
frame:Close()
|
||||
gmInte.SendNet("restartMap")
|
||||
end
|
||||
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
gmInte.applyPaint(button)
|
||||
buttonGrid:AddItem(button)
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(gmInte.getTranslation("admin.maybe_later", "Maybe Later"))
|
||||
button.DoClick = function() frame:Close() end
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
gmInte.applyPaint(button)
|
||||
buttonGrid:AddItem(button)
|
||||
end
|
||||
|
||||
function gmInte.openConfigMenu(data)
|
||||
local configCat = {gmInte.getTranslation("admin.authentication", "Authentication"), gmInte.getTranslation("admin.main", "Main"), gmInte.getTranslation("admin.trust_safety", "Trust & Safety"), gmInte.getTranslation("admin.advanced", "Advanced")}
|
||||
local possibleConfig = {
|
||||
{
|
||||
["id"] = "id",
|
||||
["label"] = gmInte.getTranslation("admin.server_id", "Server ID"),
|
||||
["description"] = gmInte.getTranslation("admin.server_id_description", "Server ID found on the webpanel."),
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = gmInte.getTranslation("admin.authentication", "Authentication")
|
||||
},
|
||||
{
|
||||
["id"] = "token",
|
||||
["label"] = gmInte.getTranslation("admin.server_token", "Server Token"),
|
||||
["description"] = gmInte.getTranslation("admin.server_token_description", "Server Token found on the webpanel."),
|
||||
["type"] = "textEntry",
|
||||
["secret"] = true,
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = gmInte.getTranslation("admin.authentication", "Authentication")
|
||||
},
|
||||
{
|
||||
["id"] = "maintenance",
|
||||
["label"] = gmInte.getTranslation("admin.maintenance", "Maintenance"),
|
||||
["description"] = gmInte.getTranslation("admin.maintenance_description", "Activate or deactivate maintenance mode."),
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.main", "Main")
|
||||
},
|
||||
{
|
||||
["id"] = "language",
|
||||
["label"] = gmInte.getTranslation("admin.language", "Language"),
|
||||
["description"] = gmInte.getTranslation("admin.language_description", "Language used in the interface."),
|
||||
["type"] = "combo",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["reloadOnEdit"] = true,
|
||||
["category"] = gmInte.getTranslation("admin.main", "Main"),
|
||||
["values"] = {
|
||||
["de"] = "Deutsch",
|
||||
["en"] = "English",
|
||||
["es"] = "Español",
|
||||
["fr"] = "Français",
|
||||
["it"] = "Italiano",
|
||||
["pl"] = "Polski",
|
||||
["ru"] = "Русский",
|
||||
["tr"] = "Türkçe",
|
||||
}
|
||||
},
|
||||
{
|
||||
["id"] = "filterOnBan",
|
||||
["label"] = gmInte.getTranslation("admin.filter_on_ban", "Block Discord Ban Player"),
|
||||
["description"] = gmInte.getTranslation("admin.filter_on_ban_description", "Block players banned on the discord server."),
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "forcePlayerLink",
|
||||
["label"] = gmInte.getTranslation("admin.force_player_link", "Force Player Verif"),
|
||||
["description"] = gmInte.getTranslation("admin.force_player_link_description", "Force player verification."),
|
||||
["type"] = "checkbox",
|
||||
["reloadOnEdit"] = true,
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "supportLink",
|
||||
["label"] = gmInte.getTranslation("admin.support_link", "Support Link"),
|
||||
["description"] = gmInte.getTranslation("admin.support_link_description", "Support Link found on the webpanel."),
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "verifyFamilySharing",
|
||||
["label"] = gmInte.getTranslation("admin.verifyFamilySharing", "Block Family Sharing"),
|
||||
["description"] = gmInte.getTranslation("admin.verifyFamilySharing_description", "Block family sharing players."),
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "verifyOnJoin",
|
||||
["label"] = gmInte.getTranslation("admin.verify_on_join", "Verify on Join"),
|
||||
["description"] = gmInte.getTranslation("admin.verify_on_join_description", "Verify the player when they join the server or on player ready."),
|
||||
["type"] = "checkbox",
|
||||
["condition"] = function(data) return data.forcePlayerLink end,
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "verifyOnReadyKickTime",
|
||||
["label"] = gmInte.getTranslation("admin.verify_on_ready_kick_time", "Kick Time if not Verified"),
|
||||
["description"] = gmInte.getTranslation("admin.verify_on_ready_kick_time_description", "Time in seconds before kicking a player that is not verified."),
|
||||
["type"] = "textEntry",
|
||||
["condition"] = function(data) return data.forcePlayerLink end,
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety")
|
||||
},
|
||||
{
|
||||
["id"] = "clientBranch",
|
||||
["label"] = gmInte.getTranslation("admin.client_force_branch", "Client Force Branch"),
|
||||
["description"] = gmInte.getTranslation("admin.client_force_branch_description", "The branch of the addon that the clients should use."),
|
||||
["type"] = "combo",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.trust_safety", "Trust & Safety"),
|
||||
["values"] = {
|
||||
["any"] = "Any",
|
||||
["dev"] = "Dev",
|
||||
["prerelease"] = "Prerelease",
|
||||
["x86-64"] = "x86-64",
|
||||
}
|
||||
},
|
||||
{
|
||||
["id"] = "debug",
|
||||
["label"] = gmInte.getTranslation("admin.debug", "Debug"),
|
||||
["description"] = gmInte.getTranslation("admin.debug_description", "Activate or deactivate debug mode."),
|
||||
["type"] = "checkbox",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["position"] = 1,
|
||||
["onEdit"] = function(setting, value) saveConfig(setting, value) end,
|
||||
["category"] = gmInte.getTranslation("admin.advanced", "Advanced")
|
||||
},
|
||||
{
|
||||
["id"] = "websocketFQDN",
|
||||
["label"] = gmInte.getTranslation("admin.websocket_fqdn", "Websocket FQDN"),
|
||||
["description"] = gmInte.getTranslation("admin.websocket_fqdn_description", "Websocket FQDN that will be used for the Websocket connection."),
|
||||
["type"] = "textEntry",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["resetIfEmpty"] = true,
|
||||
["defaultValue"] = "ws.gmod-integration.com",
|
||||
["onEdit"] = function(setting, value)
|
||||
if !value || value == "" then return end
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = gmInte.getTranslation("admin.advanced", "Advanced")
|
||||
},
|
||||
{
|
||||
["id"] = "apiFQDN",
|
||||
["label"] = gmInte.getTranslation("admin.api_fqdn", "API FQDN"),
|
||||
["description"] = gmInte.getTranslation("admin.api_fqdn_description", "API FQDN that will be used for the API connection."),
|
||||
["type"] = "textEntry",
|
||||
["resetIfEmpty"] = true,
|
||||
["defaultValue"] = "api.gmod-integration.com",
|
||||
["value"] = function(setting, value) return value end,
|
||||
["onEdit"] = function(setting, value)
|
||||
if !value || value == "" then return end
|
||||
saveConfig(setting, value)
|
||||
end,
|
||||
["onEditDelay"] = 0.5,
|
||||
["category"] = gmInte.getTranslation("admin.advanced", "Advanced")
|
||||
},
|
||||
}
|
||||
|
||||
local buttonsInfo = {
|
||||
{
|
||||
["label"] = gmInte.getTranslation("admin.link.open_webpanel", "Open Webpanel"),
|
||||
["func"] = function() gui.OpenURL("https://gmod-integration.com/dashboard/guilds") end,
|
||||
},
|
||||
{
|
||||
["label"] = gmInte.getTranslation("admin.link.test_connection", "Test Connection"),
|
||||
["func"] = function() gmInte.SendNet("testConnection") end,
|
||||
},
|
||||
{
|
||||
["label"] = gmInte.getTranslation("admin.link.buy_premium", "Buy Premium"),
|
||||
["func"] = function() gui.OpenURL("https://gmod-integration.com/premium") end,
|
||||
},
|
||||
{
|
||||
["label"] = gmInte.getTranslation("admin.link.install_websocket", "Install Websocket"),
|
||||
["condition"] = function(data) return !data.websocket end,
|
||||
["func"] = function() gui.OpenURL("https://github.com/FredyH/GWSockets/releases") end,
|
||||
},
|
||||
}
|
||||
|
||||
local needRestart = false
|
||||
if gmInte.openAdminPanel then return end
|
||||
gmInte.openAdminPanel = true
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(400, (600 / 1080) * ScrH())
|
||||
frame:Center()
|
||||
frame:SetTitle(gmInte.getFrameName(gmInte.getTranslation("admin.server_config", "Server Config")))
|
||||
frame:SetDraggable(true)
|
||||
frame:ShowCloseButton(true)
|
||||
frame:MakePopup()
|
||||
gmInte.applyPaint(frame)
|
||||
local scrollPanel = vgui.Create("DScrollPanel", frame)
|
||||
scrollPanel:Dock(FILL)
|
||||
local messagePanel = vgui.Create("DPanel", scrollPanel)
|
||||
messagePanel:Dock(TOP)
|
||||
messagePanel:SetSize(300, 80)
|
||||
messagePanel:DockMargin(10, 0, 10, 10)
|
||||
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
local messageLabel = vgui.Create("DLabel", messagePanel)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:SetText(gmInte.getTranslation("admin.server_id_description2", "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.", "https://docs.gmod-integration.com"))
|
||||
messageLabel:SetWrap(true)
|
||||
for k, catName in ipairs(configCat) do
|
||||
local collapsibleCategory = vgui.Create("DCollapsibleCategory", scrollPanel)
|
||||
collapsibleCategory:Dock(TOP)
|
||||
collapsibleCategory:DockMargin(10, 0, 10, 10)
|
||||
collapsibleCategory:SetLabel(catName)
|
||||
collapsibleCategory:SetExpanded(catName != gmInte.getTranslation("admin.advanced", "Advanced"))
|
||||
gmInte.applyPaint(collapsibleCategory)
|
||||
local configList = vgui.Create("DPanelList", collapsibleCategory)
|
||||
configList:Dock(FILL)
|
||||
configList:SetSpacing(5)
|
||||
configList:EnableHorizontal(false)
|
||||
configList:EnableVerticalScrollbar(false)
|
||||
collapsibleCategory:SetContents(configList)
|
||||
local categoryConfig = {}
|
||||
for k, v in ipairs(possibleConfig) do
|
||||
if v.category == catName then table.insert(categoryConfig, v) end
|
||||
end
|
||||
|
||||
// Sort by position
|
||||
table.sort(categoryConfig, function(a, b) return (a.position || 0) < (b.position || 0) end)
|
||||
for k, actualConfig in ipairs(categoryConfig) do
|
||||
if actualConfig.condition && !actualConfig.condition(data) then continue end
|
||||
local panel = vgui.Create("DPanel", configList)
|
||||
panel:Dock(TOP)
|
||||
panel:SetSize(300, 25)
|
||||
panel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
local label = vgui.Create("DLabel", panel)
|
||||
label:Dock(LEFT)
|
||||
label:SetSize(190, 25)
|
||||
label:SetText(actualConfig.label)
|
||||
label:SetContentAlignment(4)
|
||||
local input
|
||||
if actualConfig.type == "textEntry" then
|
||||
input = vgui.Create("DTextEntry", panel)
|
||||
local value = actualConfig.value(actualConfig.id, data[actualConfig.id] || "")
|
||||
if actualConfig.secret then
|
||||
input:SetText(gmInte.getTranslation("admin.click_to_show", "*** Click to show ***"))
|
||||
else
|
||||
input:SetText(value)
|
||||
end
|
||||
|
||||
input.OnGetFocus = function(self) if actualConfig.secret then self:SetText(value) end end
|
||||
input.OnLoseFocus = function(self) if actualConfig.secret then self:SetText(gmInte.getTranslation("admin.click_to_show", "*** Click to show ***")) end end
|
||||
local isLastID = 0
|
||||
input.OnChange = function(self)
|
||||
if actualConfig.resetIfEmpty && self:GetValue() == "" && actualConfig.defaultValue then
|
||||
self:SetText(actualConfig.defaultValue)
|
||||
return
|
||||
end
|
||||
|
||||
isLastID = isLastID + 1
|
||||
local isLocalLastID = isLastID
|
||||
timer.Simple(actualConfig.onEditDelay || 0.5, function() if isLocalLastID == isLastID then actualConfig.onEdit(actualConfig.id, self:GetValue()) end end)
|
||||
end
|
||||
elseif actualConfig.type == "checkbox" then
|
||||
input = vgui.Create("DComboBox", panel)
|
||||
if actualConfig.condition && !actualConfig.condition(data) then input:SetEnabled(false) end
|
||||
input:AddChoice(gmInte.getTranslation("admin.enabled", "Enabled"))
|
||||
input:AddChoice(gmInte.getTranslation("admin.disabled", "Disabled"))
|
||||
input:SetText(actualConfig.value(actualConfig.id, data[actualConfig.id]) && gmInte.getTranslation("admin.enabled", "Enabled") || gmInte.getTranslation("admin.disabled", "Disabled"))
|
||||
input.OnSelect = function(self, index, value)
|
||||
if actualConfig.restart then needRestart = true end
|
||||
actualConfig.onEdit(actualConfig.id, value == gmInte.getTranslation("admin.enabled", "Enabled") && true || false)
|
||||
if actualConfig.reloadOnEdit then
|
||||
frame:Close()
|
||||
RunConsoleCommand("gmi_admin")
|
||||
end
|
||||
end
|
||||
elseif actualConfig.type == "combo" then
|
||||
input = vgui.Create("DComboBox", panel)
|
||||
if actualConfig.condition && !actualConfig.condition(data) then input:SetEnabled(false) end
|
||||
local posibilities = {}
|
||||
for k, v in pairs(actualConfig.values) do
|
||||
table.insert(posibilities, k)
|
||||
input:AddChoice(v, k)
|
||||
end
|
||||
|
||||
input:SetText(actualConfig.values[data[actualConfig.id]] || actualConfig.values[actualConfig.defaultValue] || "<nil>")
|
||||
input.OnSelect = function(self, index, value)
|
||||
if actualConfig.restart then needRestart = true end
|
||||
actualConfig.onEdit(actualConfig.id, posibilities[index])
|
||||
if actualConfig.reloadOnEdit then
|
||||
frame:Close()
|
||||
RunConsoleCommand("gmi_admin")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
input:Dock(FILL)
|
||||
input:SetSize(150, 25)
|
||||
if actualConfig.description then
|
||||
if actualConfig.websocket && !data.websocket then actualConfig.description = actualConfig.description .. gmInte.getTranslation("admin.websocket_required", "\n\nThis feature require a websocket connection to work properly.") end
|
||||
if actualConfig.disable then actualConfig.description = actualConfig.description .. gmInte.getTranslation("admin.feature_soon", "\n\nThis feature will be available soon.") end
|
||||
input:SetTooltip(actualConfig.description)
|
||||
end
|
||||
|
||||
configList:AddItem(panel)
|
||||
end
|
||||
end
|
||||
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(5, 10, 5, -5)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() / 2 - 5)
|
||||
buttonGrid:SetRowHeight(45)
|
||||
local buttonsCount = 0
|
||||
for k, v in ipairs(buttonsInfo) do
|
||||
if v.condition && !v.condition(data) then continue end
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(v.label)
|
||||
button.DoClick = function() v.func(data) end
|
||||
gmInte.applyPaint(button)
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight() - 10)
|
||||
buttonGrid:AddItem(button)
|
||||
buttonsCount = buttonsCount + 1
|
||||
end
|
||||
|
||||
if buttonsCount % 2 == 1 then
|
||||
local lastButton = buttonGrid:GetItems()[buttonsCount]
|
||||
lastButton:SetWide(frame:GetWide() - 20)
|
||||
end
|
||||
|
||||
frame.OnClose = function()
|
||||
gmInte.openAdminPanel = false
|
||||
if needRestart then gmInte.needRestart() end
|
||||
end
|
||||
end
|
||||
|
||||
concommand.Add("gmod_integration_admin", function() gmInte.SendNet("getConfig") end)
|
||||
concommand.Add("gmi_admin", function() gmInte.SendNet("getConfig") end)
|
39
lua/gmod_integration/client/cl_gui_link.lua
Normal file
39
lua/gmod_integration/client/cl_gui_link.lua
Normal file
|
@ -0,0 +1,39 @@
|
|||
function gmInte.openVerifPopup()
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(400, 200)
|
||||
frame:Center()
|
||||
frame:SetTitle("Gmod Integration - " .. gmInte.getTranslation("verification.title", "Verification Required"))
|
||||
frame:SetDraggable(false)
|
||||
frame:ShowCloseButton(false)
|
||||
frame:MakePopup()
|
||||
gmInte.applyPaint(frame)
|
||||
local messageLabel = vgui.Create("DLabel", frame)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:DockMargin(10, 0, 10, 0)
|
||||
messageLabel:SetText(gmInte.getTranslation("verification.description", "Hey,\nIt looks like you haven't linked your Steam account to Discord yet. This is required to play on this server. Please click the button below to link your account.\n\nAfter you've done that, click the refresh button."))
|
||||
messageLabel:SetContentAlignment(5)
|
||||
messageLabel:SetFont("GmodIntegration_Roboto_16")
|
||||
messageLabel:SetWrap(true)
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(10, 0, 10, 10)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() / 2 - 10)
|
||||
buttonGrid:SetRowHeight(35)
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(gmInte.getTranslation("verification.open_page", "Open Verification Page"))
|
||||
button.DoClick = function() gui.OpenURL("https://gmod-integration.com/account") end
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
gmInte.applyPaint(button)
|
||||
buttonGrid:AddItem(button)
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText(gmInte.getTranslation("verification.refresh", "Refresh Verification"))
|
||||
button.DoClick = function()
|
||||
gmInte.SendNet("verifyMe")
|
||||
frame:Close()
|
||||
end
|
||||
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
gmInte.applyPaint(button)
|
||||
buttonGrid:AddItem(button)
|
||||
end
|
29
lua/gmod_integration/client/cl_gui_wrong_branch.lua
Normal file
29
lua/gmod_integration/client/cl_gui_wrong_branch.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
function gmInte.openWrongBranchPopup()
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(400, 260)
|
||||
frame:Center()
|
||||
frame:SetTitle("Gmod Integration - " .. gmInte.getTranslation("branch.title", "Wrong Branch"))
|
||||
frame:SetDraggable(false)
|
||||
frame:ShowCloseButton(false)
|
||||
frame:MakePopup()
|
||||
gmInte.applyPaint(frame)
|
||||
local messageLabel = vgui.Create("DLabel", frame)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:DockMargin(10, 0, 10, 0)
|
||||
messageLabel:SetText(gmInte.getTranslation("branch.description", "Hey,\nThis server doesn't not allow your game version '{1}' to join. Please switch to '{2}' in the beta tab of Garry's Mod properties.\n\nSteam -> Library -> Garry's Mod -> Right Click -> Properties -> Betas -> Select '{3}'" .. "\n\nAfter you've done that, exit Garry's Mod and rejoin the server.", BRANCH, gmInte.config.clientBranch, gmInte.config.clientBranch))
|
||||
messageLabel:SetContentAlignment(5)
|
||||
messageLabel:SetFont("GmodIntegration_Roboto_16")
|
||||
messageLabel:SetWrap(true)
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(10, 0, 10, 10)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() - 20)
|
||||
buttonGrid:SetRowHeight(35)
|
||||
local linkButton = vgui.Create("DButton")
|
||||
linkButton:SetText(gmInte.getTranslation("branch.watchTutorial", "Watch Tutorial"))
|
||||
linkButton.DoClick = function() gui.OpenURL("https://www.youtube.com/watch?v=iklZMVnGyQQ") end
|
||||
linkButton:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
buttonGrid:AddItem(linkButton)
|
||||
gmInte.applyPaint(linkButton)
|
||||
end
|
|
@ -1,18 +1,13 @@
|
|||
//
|
||||
// Hook
|
||||
//
|
||||
|
||||
// Player Finish Init
|
||||
hook.Add("InitPostEntity", "gmInte:Ply:Ready", function()
|
||||
gmInte.SendNet(0)
|
||||
gmInte.SendNet("ready", {
|
||||
["branch"] = LocalPlayer():gmInteGetBranch()
|
||||
})
|
||||
end)
|
||||
|
||||
hook.Add("OnPlayerChat", "gmInte:OnPlayerChat:AdminCmd", function(ply, strText, bTeamOnly, bPlayerIsDead)
|
||||
if (ply != LocalPlayer()) then return end
|
||||
|
||||
if ply != LocalPlayer() then return end
|
||||
strText = string.lower(strText)
|
||||
|
||||
if (strText == "/gminte") then
|
||||
if strText == "/gmi" || strText == "!gmi" then
|
||||
gmInte.openAdminConfig()
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -1,37 +1,105 @@
|
|||
//
|
||||
// Main
|
||||
//
|
||||
|
||||
local function formatName(name)
|
||||
// all un down case
|
||||
name = string.lower(name)
|
||||
// first leter in upper case
|
||||
name = string.upper(string.sub(name, 1, 1)) .. string.sub(name, 2)
|
||||
// every letter after a space in upper case
|
||||
name = string.gsub(name, "(%a)([%w_']*)", function(a,b) return string.upper(a) .. string.lower(b) end)
|
||||
return name
|
||||
function gmInte.chatAddText(...)
|
||||
local args = {...}
|
||||
table.insert(args, 1, Color(255, 130, 92))
|
||||
table.insert(args, 2, "[Gmod Integration] ")
|
||||
chat.AddText(unpack(args))
|
||||
end
|
||||
|
||||
function gmInte.discordSyncChatPly(data)
|
||||
chat.AddText(Color(92, 105, 255), "(DISCORD) ", Color(12, 151, 12), formatName(data.name) .. ": ", Color(255, 255, 255), data.content)
|
||||
function gmInte.chatAddTextFromTable(data)
|
||||
local args = {}
|
||||
for _, v in ipairs(data) do
|
||||
table.insert(args, v.color || Color(255, 255, 255))
|
||||
table.insert(args, v.text)
|
||||
end
|
||||
|
||||
gmInte.chatAddText(unpack(args))
|
||||
end
|
||||
|
||||
function gmInte.showTestConnection(data)
|
||||
if (data && data.id) then
|
||||
chat.AddText(Color(255, 130, 92), "[Gmod Integration] ", Color(63, 102, 63), "Connection Successfull", Color(255, 255, 255), ", server logged as '" .. data.name .. "'")
|
||||
if data && data.id then
|
||||
gmInte.chatAddText(Color(89, 194, 89), gmInte.getTranslation("chat.authentication_success", "Successfully Authenticated"), Color(255, 255, 255), gmInte.getTranslation("chat.server_link", ", server linked as {1}.", data.name))
|
||||
else
|
||||
chat.AddText(Color(255, 130, 92), "[Gmod Integration] ", Color(102, 63, 63), "Connection Failed", Color(255, 255, 255), ", please check your ID and Token")
|
||||
gmInte.chatAddText(Color(228, 81, 81), gmInte.getTranslation("chat.authentication_failed", "Failed to Authenticate"), Color(255, 255, 255), gmInte.getTranslation("chat.server_fail", ", check your ID and Token."))
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.openAdminConfig()
|
||||
if (!LocalPlayer():IsSuperAdmin()) then
|
||||
chat.AddText(Color(255, 130, 92), "[Gmod Integration] ", Color(102, 63, 63), "You are not superadmin")
|
||||
if !LocalPlayer():gmIntIsAdmin() then
|
||||
gmInte.chatAddText(Color(228, 81, 81), gmInte.getTranslation("chat.missing_permissions", "You do not have permission to do this action."))
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.SendNet("2")
|
||||
gmInte.SendNet("getConfig")
|
||||
end
|
||||
|
||||
// add concommand
|
||||
concommand.Add("gmod_integration_admin", gmInte.openAdminConfig)
|
||||
hook.Add("HUDPaint", "gmInte:HUD:ShowScreenshotInfo", function()
|
||||
if !gmInte.showScreenshotInfo then return end
|
||||
local screenInfo = {
|
||||
{
|
||||
txt = "Server ID",
|
||||
val = gmInte.config.id
|
||||
},
|
||||
{
|
||||
txt = "SteamID64",
|
||||
val = LocalPlayer():SteamID64()
|
||||
},
|
||||
{
|
||||
txt = "Date",
|
||||
val = os.date("%Y-%m-%d %H:%M:%S")
|
||||
},
|
||||
{
|
||||
txt = "Position",
|
||||
val = function()
|
||||
local pos = LocalPlayer():GetPos()
|
||||
local newPos = ""
|
||||
for i = 1, 3 do
|
||||
newPos = newPos .. math.Round(pos[i])
|
||||
if i < 3 then newPos = newPos .. ", " end
|
||||
end
|
||||
return newPos
|
||||
end
|
||||
},
|
||||
{
|
||||
txt = "Map",
|
||||
val = game.GetMap()
|
||||
},
|
||||
{
|
||||
txt = "Ping",
|
||||
val = LocalPlayer():Ping()
|
||||
},
|
||||
{
|
||||
txt = "FPS",
|
||||
val = function() return math.Round(1 / FrameTime()) end
|
||||
},
|
||||
{
|
||||
txt = "Size",
|
||||
val = ScrW() .. "x" .. ScrH()
|
||||
}
|
||||
}
|
||||
|
||||
local concatInfo = ""
|
||||
for k, v in pairs(screenInfo) do
|
||||
local val = v.val
|
||||
if type(val) == "function" then val = val() end
|
||||
concatInfo = concatInfo .. v.txt .. ": " .. val
|
||||
if k < #screenInfo then concatInfo = concatInfo .. " - " end
|
||||
end
|
||||
|
||||
draw.SimpleText(concatInfo, "DermaDefault", ScrW() / 2, ScrH() - 15, Color(255, 255, 255, 119), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end)
|
||||
|
||||
local lastTime = 0
|
||||
local frameTime = 0
|
||||
local fps = 0
|
||||
hook.Add("Think", "gmInte:HUD:CalculateFPS", function()
|
||||
frameTime = RealTime() - lastTime
|
||||
lastTime = RealTime()
|
||||
fps = math.Round(1 / frameTime)
|
||||
end)
|
||||
|
||||
timer.Create("gmInte:HUD:SendFPS", 5, 0, function()
|
||||
LocalPlayer().gmIntFPS = fps
|
||||
gmInte.SendNet("sendFPS", {
|
||||
["fps"] = fps
|
||||
})
|
||||
end)
|
|
@ -1,21 +1,8 @@
|
|||
//
|
||||
// Variables
|
||||
//
|
||||
|
||||
local ImageCache = {}
|
||||
|
||||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
function gmInte.createImgurMaterials(materials, addon_var, folder, name)
|
||||
if !file.Exists(folder, "DATA") then
|
||||
file.CreateDir(folder)
|
||||
end
|
||||
|
||||
if !file.Exists(folder, "DATA") then file.CreateDir(folder) end
|
||||
local function getMatFromUrl(url, id)
|
||||
materials[id] = Material("nil")
|
||||
|
||||
if file.Exists(folder .. "/" .. id .. ".png", "DATA") && !gmInte.config.redownloadMaterials then
|
||||
addon_var[id] = Material("../data/" .. folder .. "/" .. id .. ".png", "noclamp smooth")
|
||||
gmInte.log("materials", name .. " - Image Loaded - " .. id .. ".png")
|
||||
|
@ -30,6 +17,7 @@ function gmInte.createImgurMaterials(materials, addon_var, folder, name)
|
|||
["addon_var"] = addon_var,
|
||||
["id"] = id
|
||||
}
|
||||
|
||||
gmInte.log("materials", name .. " - Image Downloaded - " .. id .. ".png")
|
||||
end)
|
||||
end
|
||||
|
@ -46,10 +34,8 @@ function gmInte.redowloadMaterials()
|
|||
end
|
||||
end
|
||||
|
||||
concommand.Add("gmod_integration_reload_materials", function()
|
||||
gmInte.redowloadMaterials()
|
||||
end)
|
||||
|
||||
concommand.Add("gmod_integration_reload_materials", gmInte.redowloadMaterials)
|
||||
concommand.Add("gmi_reload_materials", gmInte.redowloadMaterials)
|
||||
local materialsList = {
|
||||
["logo"] = "y3Mypbn"
|
||||
}
|
||||
|
|
|
@ -1,42 +1,40 @@
|
|||
//
|
||||
// Network
|
||||
//
|
||||
local netSend = {
|
||||
["ready"] = 0,
|
||||
["testConnection"] = 1,
|
||||
["getConfig"] = 2,
|
||||
["saveConfig"] = 3,
|
||||
["takeScreenShot"] = 4,
|
||||
["restartMap"] = 5,
|
||||
["verifyMe"] = 6,
|
||||
["sendFPS"] = 7
|
||||
}
|
||||
|
||||
/*
|
||||
Upload
|
||||
0 - Say I'm ready
|
||||
1 - Test Connection
|
||||
2 - Get Config
|
||||
Receive
|
||||
1 - Sync Chat
|
||||
2 - Get Config (Response)
|
||||
3 - Test Connection (Response)
|
||||
*/
|
||||
|
||||
// Send
|
||||
function gmInte.SendNet(id, args, func)
|
||||
net.Start("gmIntegration")
|
||||
net.WriteUInt(id, 8)
|
||||
net.WriteUInt(netSend[id], 8)
|
||||
net.WriteString(util.TableToJSON(args || {}))
|
||||
if (func) then func() end
|
||||
if func then func() end
|
||||
net.SendToServer()
|
||||
end
|
||||
|
||||
// Receive
|
||||
local netFunc = {
|
||||
[1] = function(data)
|
||||
gmInte.discordSyncChatPly(data)
|
||||
local netReceive = {
|
||||
[1] = function(data) gmInte.discordSyncChatPly(data) end,
|
||||
[2] = function(data) gmInte.openConfigMenu(data) end,
|
||||
[3] = function(data) gmInte.showTestConnection(data) end,
|
||||
[5] = function(data)
|
||||
gmInte.config = table.Merge(gmInte.config, data.config)
|
||||
gmInte.version = data.other.version
|
||||
gmInte.loadTranslations()
|
||||
if gmInte.config.clientBranch != "any" && gmInte.config.clientBranch != BRANCH then gmInte.openWrongBranchPopup() end
|
||||
if !data.other.aprovedCredentials then RunConsoleCommand("gmod_integration_admin") end
|
||||
end,
|
||||
[2] = function(data)
|
||||
gmInte.openConfigMenu(data)
|
||||
end,
|
||||
[3] = function(data)
|
||||
gmInte.showTestConnection(data)
|
||||
end
|
||||
[6] = function(data) gmInte.chatAddTextFromTable(data) end,
|
||||
[7] = function() gmInte.openVerifPopup() end,
|
||||
[8] = function(data) gmInte.config.token = data.token end
|
||||
}
|
||||
|
||||
net.Receive("gmIntegration", function()
|
||||
local id = net.ReadUInt(8)
|
||||
local args = util.JSONToTable(net.ReadString())
|
||||
if (netFunc[id]) then netFunc[id](args) end
|
||||
if netReceive[id] then netReceive[id](args) end
|
||||
end)
|
235
lua/gmod_integration/client/cl_report_bug.lua
Normal file
235
lua/gmod_integration/client/cl_report_bug.lua
Normal file
|
@ -0,0 +1,235 @@
|
|||
local ScreenshotRequested = false
|
||||
local contextMenuOpen = false
|
||||
hook.Add("OnContextMenuOpen", "gmInte:BugReport:ContextMenu:Open", function() contextMenuOpen = true end)
|
||||
hook.Add("OnContextMenuClose", "gmInte:BugReport:ContextMenu:Close", function() contextMenuOpen = false end)
|
||||
hook.Add("HUDPaint", "gmInte:BugReport:Screenshot", function()
|
||||
if !ScreenshotRequested then return end
|
||||
if !contextMenuOpen then return end
|
||||
surface.SetDrawColor(230, 230, 230)
|
||||
surface.DrawRect(0, 0, ScrW(), 3)
|
||||
surface.DrawRect(0, 0, 3, ScrH())
|
||||
surface.DrawRect(ScrW() - 3, 0, 3, ScrH())
|
||||
surface.DrawRect(0, ScrH() - 3, ScrW(), 3)
|
||||
surface.DrawRect(ScrW() / 2 - 10, ScrH() / 2 - 1, 20, 2)
|
||||
surface.DrawRect(ScrW() / 2 - 1, ScrH() / 2 - 10, 2, 20)
|
||||
surface.SetDrawColor(0, 0, 0, 50)
|
||||
surface.DrawRect(0, 0, ScrW(), ScrH())
|
||||
draw.SimpleText(gmInte.getTranslation("report_bug.context_menu.screen_capture", "Close the context menu to take the screenshot to use in the bug report."), "Trebuchet24", ScrW() / 2, ScrH() / 2 + 40, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end)
|
||||
|
||||
local screenCapture = nil
|
||||
local screenFileID = nil
|
||||
local captureData = nil
|
||||
hook.Add("PostRender", "gmInte:BugReport:Screenshot", function()
|
||||
if !ScreenshotRequested then return end
|
||||
if contextMenuOpen then return end
|
||||
captureData = {
|
||||
format = "jpeg",
|
||||
x = 0,
|
||||
y = 0,
|
||||
w = ScrW(),
|
||||
h = ScrH(),
|
||||
quality = 95,
|
||||
}
|
||||
|
||||
screenCapture = render.Capture(captureData)
|
||||
ScreenshotRequested = false
|
||||
gmInte.showScreenshotInfo = false
|
||||
if !file.Exists("gmod_integration/report_bug", "DATA") then file.CreateDir("gmod_integration/report_bug") end
|
||||
if screenCapture then file.Write("gmod_integration/report_bug/" .. screenFileID .. ".jpeg", screenCapture) end
|
||||
end)
|
||||
|
||||
local function openReportBug()
|
||||
local Fields = {
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.screenshot", "Screenshot"),
|
||||
["type"] = "image",
|
||||
},
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.description", "Report a bug to the developers of this game."),
|
||||
["type"] = "text",
|
||||
["dsc"] = gmInte.getTranslation("report_bug.description.dsc", "Please provide as much information as possible to help us fix the issue."),
|
||||
["tall"] = 80,
|
||||
},
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.importance_level", "Importance Level"),
|
||||
["type"] = "dropdown",
|
||||
["options"] = {
|
||||
{
|
||||
["level"] = "critical",
|
||||
["text"] = gmInte.getTranslation("report_bug.importance_level.critical", "Critical - Crash or made the game unplayable."),
|
||||
},
|
||||
{
|
||||
["level"] = "high",
|
||||
["text"] = gmInte.getTranslation("report_bug.importance_level.high", "High - Critical functionality is unusable."),
|
||||
},
|
||||
{
|
||||
["level"] = "medium",
|
||||
["text"] = gmInte.getTranslation("report_bug.importance_level.medium", "Medium - Important functionality is unusable."),
|
||||
},
|
||||
{
|
||||
["level"] = "low",
|
||||
["text"] = gmInte.getTranslation("report_bug.importance_level.low", "Low - Cosmetic issue."),
|
||||
},
|
||||
{
|
||||
["level"] = "trivial",
|
||||
["text"] = gmInte.getTranslation("report_bug.importance_level.trivial", "Trivial - Very minor issue."),
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.steps_to_reproduce", "Steps to Reproduce"),
|
||||
["type"] = "text",
|
||||
["dsc"] = gmInte.getTranslation("report_bug.steps_to_reproduce.dsc", "Please provide a step-by-step guide on how to reproduce the bug."),
|
||||
["tall"] = 80,
|
||||
},
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.expected_result", "Expected result"),
|
||||
["type"] = "text",
|
||||
["dsc"] = gmInte.getTranslation("report_bug.expected_result.dsc", "What did you expect to happen?"),
|
||||
["tall"] = 50,
|
||||
},
|
||||
{
|
||||
["title"] = gmInte.getTranslation("report_bug.actual_result", "Actual result"),
|
||||
["type"] = "text",
|
||||
["dsc"] = gmInte.getTranslation("report_bug.actual_result.dsc", "What actually happened?"),
|
||||
["tall"] = 50,
|
||||
},
|
||||
}
|
||||
|
||||
local frame = vgui.Create("DFrame")
|
||||
frame:SetSize(500, (700 / 1080) * ScrH())
|
||||
frame:Center()
|
||||
frame:SetTitle(gmInte.getFrameName(gmInte.getTranslation("report_bug.title", "Report Bug")))
|
||||
frame:MakePopup()
|
||||
gmInte.applyPaint(frame)
|
||||
local dPanel = vgui.Create("DScrollPanel", frame)
|
||||
dPanel:Dock(FILL)
|
||||
gmInte.applyPaint(dPanel)
|
||||
local label = vgui.Create("DLabel", dPanel)
|
||||
label:Dock(TOP)
|
||||
label:DockMargin(5, 5, 5, 5)
|
||||
label:SetText(gmInte.getTranslation("report_bug.description", "Description"))
|
||||
label:SetFont("DermaDefaultBold")
|
||||
local messagePanel = vgui.Create("DPanel", dPanel)
|
||||
messagePanel:Dock(TOP)
|
||||
messagePanel:SetTall(70)
|
||||
messagePanel:DockMargin(5, 0, 5, 5)
|
||||
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||
local messageLabel = vgui.Create("DLabel", messagePanel)
|
||||
messageLabel:Dock(FILL)
|
||||
messageLabel:SetText(gmInte.getTranslation("report_bug.description.full", "Hey, your about to report a bug to the owners of this server.\nPlease provide as much information as possible to help us fix the issue.\nThank you for helping us improve the server.\n\nIf you have a issue with Gmod Integration, please use our discord server."))
|
||||
messageLabel:SetWrap(true)
|
||||
local elements = {}
|
||||
for _ = 1, #Fields do
|
||||
local field = Fields[_]
|
||||
local label = vgui.Create("DLabel", dPanel)
|
||||
label:Dock(TOP)
|
||||
label:DockMargin(5, 5, 5, 5)
|
||||
label:SetText(field.title)
|
||||
label:SetFont("DermaDefaultBold")
|
||||
if field.type == "image" then
|
||||
if !screenCapture then continue end
|
||||
if !file.Exists("gmod_integration/report_bug/" .. screenFileID .. ".jpeg", "DATA") then continue end
|
||||
local image = vgui.Create("DImage", dPanel)
|
||||
image:Dock(TOP)
|
||||
image:DockMargin(5, 5, 5, 5)
|
||||
image:SetImage("data/gmod_integration/report_bug/" .. screenFileID .. ".jpeg")
|
||||
image:SetSize(frame:GetWide() - 10, (frame:GetWide() - 10) * (9 / 16))
|
||||
elseif field.type == "text" then
|
||||
local text = vgui.Create("DTextEntry", dPanel)
|
||||
text:Dock(TOP)
|
||||
text:DockMargin(5, 5, 5, 5)
|
||||
text:SetMultiline(true)
|
||||
text:SetTall(field.tall || 40)
|
||||
text:SetPlaceholderText(field.dsc)
|
||||
gmInte.applyPaint(text)
|
||||
table.insert(elements, text)
|
||||
elseif field.type == "dropdown" then
|
||||
local dropdown = vgui.Create("DComboBox", dPanel)
|
||||
dropdown:Dock(TOP)
|
||||
dropdown:SetSortItems(false)
|
||||
dropdown:DockMargin(5, 5, 5, 5)
|
||||
dropdown:SetValue(gmInte.getTranslation("report_bug.importance_level.dsc", "How important is this bug?"))
|
||||
for key, value in ipairs(field.options) do
|
||||
dropdown:AddChoice(value.text, value.level)
|
||||
end
|
||||
|
||||
gmInte.applyPaint(dropdown)
|
||||
table.insert(elements, dropdown)
|
||||
end
|
||||
end
|
||||
|
||||
local buttonGrid = vgui.Create("DGrid", frame)
|
||||
buttonGrid:Dock(BOTTOM)
|
||||
buttonGrid:DockMargin(5, 10, 5, 5)
|
||||
buttonGrid:SetCols(2)
|
||||
buttonGrid:SetColWide(frame:GetWide() - 10)
|
||||
buttonGrid:SetRowHeight(35)
|
||||
local button = vgui.Create("DButton")
|
||||
button:SetText("Send Report")
|
||||
button:SetSize(buttonGrid:GetColWide() - 10, buttonGrid:GetRowHeight())
|
||||
gmInte.applyPaint(button)
|
||||
buttonGrid:AddItem(button)
|
||||
button.DoClick = function()
|
||||
local readyForSend = true
|
||||
if !elements[1]:GetText() || elements[1]:GetText() == "" then readyForSend = false end
|
||||
if !elements[2]:GetSelected() then readyForSend = false end
|
||||
if !elements[3]:GetText() || elements[3]:GetText() == "" then readyForSend = false end
|
||||
if !elements[4]:GetText() || elements[4]:GetText() == "" then readyForSend = false end
|
||||
if !elements[5]:GetText() || elements[5]:GetText() == "" then readyForSend = false end
|
||||
if !readyForSend then
|
||||
notification.AddLegacy(gmInte.getTranslation("report_bug.error.missing_fields", "All fields are required"), NOTIFY_ERROR, 5)
|
||||
return
|
||||
end
|
||||
|
||||
local screenData = {}
|
||||
if screenCapture then
|
||||
local base64Capture = util.Base64Encode(screenCapture)
|
||||
local size = math.Round(string.len(base64Capture) / 1024)
|
||||
screenData = {
|
||||
["screenshot"] = base64Capture,
|
||||
["captureData"] = captureData,
|
||||
["size"] = size .. "KB"
|
||||
}
|
||||
end
|
||||
|
||||
local _, importanceValue = elements[2]:GetSelected()
|
||||
gmInte.http.post("/clients/:steamID64/servers/:serverID/bugs", {
|
||||
["player"] = gmInte.getPlayerFormat(LocalPlayer()),
|
||||
["screenshot"] = screenData,
|
||||
["description"] = elements[1]:GetText(),
|
||||
["importance"] = importanceValue,
|
||||
["steps"] = elements[3]:GetText(),
|
||||
["expected"] = elements[4]:GetText(),
|
||||
["actual"] = elements[5]:GetText(),
|
||||
}, function(code, body)
|
||||
notification.AddLegacy(gmInte.getTranslation("report_bug.success", "Bug report sent successfully"), NOTIFY_GENERIC, 5)
|
||||
frame:Close()
|
||||
end, function(code, body)
|
||||
if code == 429 then
|
||||
gmInte.chatAddText(Color(255, 255, 255), gmInte.getTranslation("chat.error.rate_limit", "This interaction is being rate limited, please try again later."))
|
||||
return
|
||||
end
|
||||
|
||||
notification.AddLegacy(gmInte.getTranslation("report_bug.error.failed", "Failed to send bug report retry later"), NOTIFY_ERROR, 5)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.openReportBug()
|
||||
if ScreenshotRequested then return end
|
||||
local timerName = "gmInte:BugReport:Screenshot:Open"
|
||||
ScreenshotRequested = true
|
||||
gmInte.showScreenshotInfo = true
|
||||
screenCapture = nil
|
||||
screenFileID = gmInte.config.id .. "-" .. util.CRC(LocalPlayer():SteamID64() .. "-" .. tostring(os.time())) .. "-" .. tostring(os.time())
|
||||
timer.Create(timerName, 0.2, 0, function()
|
||||
if contextMenuOpen then return end
|
||||
timer.Remove(timerName)
|
||||
timer.Simple(0.5, openReportBug)
|
||||
end)
|
||||
end
|
||||
|
||||
concommand.Add("gmi_report_bug", gmInte.openReportBug)
|
||||
concommand.Add("gmod_integration_report_bug", gmInte.openReportBug)
|
99
lua/gmod_integration/client/cl_screenshots.lua
Normal file
99
lua/gmod_integration/client/cl_screenshots.lua
Normal file
|
@ -0,0 +1,99 @@
|
|||
local ScreenshotRequested = false
|
||||
local FailAttempts = 0
|
||||
hook.Add("PostRender", "gmInteScreenshot", function()
|
||||
if !ScreenshotRequested then return end
|
||||
local captureData = {
|
||||
format = "jpeg",
|
||||
x = 0,
|
||||
y = 0,
|
||||
w = ScrW(),
|
||||
h = ScrH(),
|
||||
quality = 95,
|
||||
}
|
||||
|
||||
local screenCapture = render.Capture(captureData)
|
||||
ScreenshotRequested = false
|
||||
gmInte.showScreenshotInfo = false
|
||||
if !screenCapture then
|
||||
if FailAttempts < 3 then
|
||||
timer.Simple(0.5, function()
|
||||
ScreenshotRequested = true
|
||||
FailAttempts = FailAttempts + 1
|
||||
gmInte.log("Failed to take screenshot, retrying... (" .. FailAttempts .. "/3)", true)
|
||||
end)
|
||||
return
|
||||
else
|
||||
FailAttempts = 0
|
||||
gmInte.chatAddText(Color(255, 255, 255), gmInte.getTranslation("chat.error.screenshot_failed", "Failed to take screenshot, your system may not support this feature."))
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local base64Capture = util.Base64Encode(screenCapture)
|
||||
local size = math.Round(string.len(base64Capture) / 1024)
|
||||
gmInte.log("Screenshot Taken - " .. size .. "KB", true)
|
||||
gmInte.http.post("/clients/:steamID64/servers/:serverID/screenshots", {
|
||||
["player"] = gmInte.getPlayerFormat(LocalPlayer()),
|
||||
["screenshot"] = base64Capture,
|
||||
["captureData"] = captureData,
|
||||
["size"] = size .. "KB"
|
||||
}, function(code, body) gmInte.chatAddText(Color(255, 130, 92), gmInte.getTranslation("chat.screenshot.sent", "Screenshot sent to Discord.")) end, function(code, body)
|
||||
if code == 429 then
|
||||
gmInte.chatAddText(Color(255, 255, 255), gmInte.getTranslation("chat.error.rate_limit", "This interaction is being rate limited, please try again later."))
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.log("Screenshot failed to send to Discord, error code: " .. code, true)
|
||||
end)
|
||||
end)
|
||||
|
||||
function gmInte.takeScreenShot()
|
||||
timer.Simple(0.5, function()
|
||||
ScreenshotRequested = true
|
||||
gmInte.showScreenshotInfo = true
|
||||
end)
|
||||
end
|
||||
|
||||
concommand.Add("gmi_screen", gmInte.takeScreenShot)
|
||||
concommand.Add("gmod_integration_screen", gmInte.takeScreenShot)
|
||||
hook.Add("OnPlayerChat", "gmInteChatCommands", function(ply, text, teamChat, isDead)
|
||||
if ply != LocalPlayer() then return end
|
||||
text = string.lower(text)
|
||||
text = string.sub(text, 2)
|
||||
if text == "screen" then
|
||||
gmInte.takeScreenShot()
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
local contextMenuOpen = false
|
||||
local contextClick = false
|
||||
hook.Add("OnContextMenuOpen", "gmInte:ContextScreen:ContextMenu:Open", function() contextMenuOpen = true end)
|
||||
hook.Add("OnContextMenuClose", "gmInte:ContextScreen:ContextMenu:Close", function() contextMenuOpen = false end)
|
||||
hook.Add("HUDPaint", "gmInte:ContextScreen:Screenshot", function()
|
||||
if !contextClick then return end
|
||||
if !contextMenuOpen then return end
|
||||
surface.SetDrawColor(230, 230, 230)
|
||||
surface.DrawRect(0, 0, ScrW(), 3)
|
||||
surface.DrawRect(0, 0, 3, ScrH())
|
||||
surface.DrawRect(ScrW() - 3, 0, 3, ScrH())
|
||||
surface.DrawRect(0, ScrH() - 3, ScrW(), 3)
|
||||
surface.DrawRect(ScrW() / 2 - 10, ScrH() / 2 - 1, 20, 2)
|
||||
surface.DrawRect(ScrW() / 2 - 1, ScrH() / 2 - 10, 2, 20)
|
||||
surface.SetDrawColor(0, 0, 0, 50)
|
||||
surface.DrawRect(0, 0, ScrW(), ScrH())
|
||||
draw.SimpleText(gmInte.getTranslation("context_menu.screen_capture", "Close the context menu to take the screenshot that will be send to Discord."), "Trebuchet24", ScrW() / 2, ScrH() / 2 + 40, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end)
|
||||
|
||||
function gmInte.contextScreenshot()
|
||||
if ScreenshotRequested then return end
|
||||
contextClick = true
|
||||
local timerName = "gmInte:ContextScreen:Screenshot:Open"
|
||||
gmInte.showScreenshotInfo = true
|
||||
timer.Create(timerName, 0.2, 0, function()
|
||||
if contextMenuOpen then return end
|
||||
contextClick = false
|
||||
timer.Remove(timerName)
|
||||
timer.Simple(0.5, gmInte.takeScreenShot)
|
||||
end)
|
||||
end
|
10
lua/gmod_integration/client/cl_sync_chat.lua
Normal file
10
lua/gmod_integration/client/cl_sync_chat.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local function formatName(name)
|
||||
name = string.lower(name)
|
||||
name = string.upper(string.sub(name, 1, 1)) .. string.sub(name, 2)
|
||||
name = string.gsub(name, "(%a)([%w_']*)", function(a, b) return string.upper(a) .. string.lower(b) end)
|
||||
return name
|
||||
end
|
||||
|
||||
function gmInte.discordSyncChatPly(data)
|
||||
chat.AddText(Color(92, 105, 255), "(DISCORD) ", Color(12, 151, 12), formatName(data.name) .. ": ", Color(255, 255, 255), data.content)
|
||||
end
|
49
lua/gmod_integration/server/compatibility/chatm/sv_atm.lua
Normal file
49
lua/gmod_integration/server/compatibility/chatm/sv_atm.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
function gmInte.postCHATMTakeMoney(ply, amount, reason)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ch-atm/take-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(amount),
|
||||
["reason"] = reason
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postCHATMReceiveMoney(ply, amount, reason)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ch-atm/receive-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(amount),
|
||||
["reason"] = reason
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postCHATMSendMoney(ply, amount, plyReceiver)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
if !plyReceiver:IsValid() || !plyReceiver:IsPlayer(plyReceiver) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ch-atm/send-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["receiver"] = gmInte.getPlayerFormat(plyReceiver),
|
||||
["amount"] = math.Round(amount)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postCHATMWithdrawMoney(ply, amount)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ch-atm/withdraw-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(amount)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postCHATMDepositMoney(ply, amount)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ch-atm/deposit-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(amount)
|
||||
})
|
||||
end
|
||||
|
||||
hook.Add("CH_ATM_bLogs_TakeMoney", "gmInte:Player:CH:ATM:TakeMoney", function(amount, ply, reason) gmInte.postCHATMTakeMoney(ply, amount, reason) end)
|
||||
hook.Add("CH_ATM_bLogs_ReceiveMoney", "gmInte:Player:CH:ATM:ReceiveMoney", function(amount, ply, reason) gmInte.postCHATMReceiveMoney(ply, amount, reason) end)
|
||||
hook.Add("CH_ATM_bLogs_SendMoney", "gmInte:Player:CH:ATM:SendMoney", function(ply, amount, plyReceiver) gmInte.postCHATMSendMoney(ply, amount, plyReceiver) end)
|
||||
hook.Add("CH_ATM_bLogs_WithdrawMoney", "gmInte:Player:CH:ATM:WithdrawMoney", function(ply, amount) gmInte.postCHATMWithdrawMoney(ply, amount) end)
|
||||
hook.Add("CH_ATM_bLogs_DepositMoney", "gmInte:Player:CH:ATM:DepositMoney", function(ply, amount) gmInte.postCHATMDepositMoney(ply, amount) end)
|
|
@ -0,0 +1,35 @@
|
|||
function gmInte.postDarkRPDroppedMoney(ply, amount, entity)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/dark-rp/drop-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(amount),
|
||||
["entity"] = gmInte.getEntityFormat(entity),
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postDarkRPPickedUpMoney(ply, price, entity)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/dark-rp/picked-up-money", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["amount"] = math.Round(price),
|
||||
["entity"] = gmInte.getEntityFormat(entity),
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postDarkRPPickedUpCheque(plyWriter, plyTarget, price, sucess, entity)
|
||||
if !plyWriter:IsValid() || !plyWriter:IsPlayer() then return end
|
||||
if !plyTarget:IsValid() || !plyTarget:IsPlayer() then return end
|
||||
if ply != plyTo then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/dark-rp/picked-up-cheque", {
|
||||
["playerChequeWriter"] = gmInte.getPlayerFormat(plyWriter),
|
||||
["playerChequeTarget"] = gmInte.getPlayerFormat(plyTarget),
|
||||
["amount"] = math.Round(price),
|
||||
["entity"] = gmInte.getEntityFormat(entity),
|
||||
})
|
||||
end
|
||||
|
||||
if DarkRP then
|
||||
hook.Add("playerDroppedMoney", "gmInte:Player:DarkRPDroppedMoney", function(ply, amount, entity) gmInte.postDarkRPDroppedMoney(ply, amount, entity) end)
|
||||
hook.Add("playerPickedUpMoney", "gmInte:Player:DarkRPPickedUpMoney", function(ply, price, entity) gmInte.postDarkRPPickedUpMoney(ply, price, entity) end)
|
||||
hook.Add("playerDroppedCheque", "gmInte:Player:DarkRPPickedUpCheque", function(plyWriter, plyTarget, price, sucess, entity) gmInte.postDarkRPPickedUpCheque(plyWriter, plyTarget, price, sucess, entity) end)
|
||||
end
|
|
@ -1,81 +1,63 @@
|
|||
//
|
||||
// WebSocket
|
||||
//
|
||||
|
||||
local useWebsocket = false
|
||||
local websocketFeature = {
|
||||
'syncChat',
|
||||
'websocket',
|
||||
}
|
||||
|
||||
for k, v in pairs(websocketFeature) do
|
||||
if (gmInte.config[v]) then
|
||||
useWebsocket = true
|
||||
local function websocketDLLExist()
|
||||
local files, _ = file.Find("lua/bin/*", "GAME")
|
||||
for k, v in ipairs(files) do
|
||||
if v:find("gwsockets") then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
if (!useWebsocket) then
|
||||
return gmInte.log("WebSocket is not used")
|
||||
end
|
||||
|
||||
require("gwsockets")
|
||||
|
||||
if (!GWSockets) then
|
||||
timer.Simple(1, function()
|
||||
if (!GWSockets) then
|
||||
gmInte.logError("GWSockets is not installed! Please install it from https://github.com/FredyH/GWSockets/releases")
|
||||
end
|
||||
if !websocketDLLExist() then
|
||||
timer.Simple(4, function()
|
||||
gmInte.logHint("GWSockets is not installed !, Syncronize feature will not work !")
|
||||
gmInte.logHint("Please install it from https://github.com/FredyH/GWSockets/releases")
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
local socket = GWSockets.createWebSocket("wss://ws.gmod-integration.com")
|
||||
|
||||
// Authentication
|
||||
socket:setHeader("id", gmInte.config.id)
|
||||
socket:setHeader("token", gmInte.config.token)
|
||||
|
||||
function socket:onConnected()
|
||||
gmInte.log("WebSocket Connected", true)
|
||||
require("gwsockets")
|
||||
local function getWebSocketURL()
|
||||
local method = gmInte.isPrivateIP(gmInte.config.websocketFQDN) && "ws" || "wss"
|
||||
return method .. "://" .. gmInte.config.websocketFQDN
|
||||
end
|
||||
|
||||
// log on message
|
||||
function socket:onMessage(txt)
|
||||
local nbOfTry = 0
|
||||
function gmInte.setupWebSocket()
|
||||
local socket = GWSockets.createWebSocket(getWebSocketURL())
|
||||
socket:setHeader("id", gmInte.config.id)
|
||||
socket:setHeader("token", gmInte.config.token)
|
||||
socket:open()
|
||||
function socket:onConnected()
|
||||
gmInte.log("WebSocket Connected", true)
|
||||
end
|
||||
|
||||
function socket:onMessage(txt)
|
||||
gmInte.log("WebSocket Message: " .. txt, true)
|
||||
local data = util.JSONToTable(txt)
|
||||
if (gmInte.config.debug) then
|
||||
gmInte.log("WebSocket Message: " .. txt, true)
|
||||
end
|
||||
if (gmInte[data.method]) then
|
||||
if gmInte[data.method] then
|
||||
gmInte[data.method](data)
|
||||
else
|
||||
gmInte.logError("WebSocket Message: " .. txt .. " is not a valid method !")
|
||||
gmInte.logError("WebSocket Message: " .. txt .. " is not a valid method !", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function socket:onDisconnected()
|
||||
function socket:onDisconnected()
|
||||
gmInte.log("WebSocket Disconnected", true)
|
||||
end
|
||||
|
||||
function socket:onError(txt)
|
||||
gmInte.logError("WebSocket Error: " .. txt)
|
||||
end
|
||||
|
||||
function gmInte.websocketWrite(data)
|
||||
if (!socket:isConnected()) then
|
||||
socket:open()
|
||||
end
|
||||
socket:write(util.TableToJSON(data || {}))
|
||||
end
|
||||
|
||||
timer.Create("gmInte:WebSocket:CheckConnection", 4, 0, function()
|
||||
if (!socket:isConnected()) then
|
||||
socket:open()
|
||||
function socket:onError(txt)
|
||||
gmInte.logError("WebSocket Error: " .. txt, true)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("InitPostEntity", "gmInte:ServerReady:WebSocket", function()
|
||||
timer.Simple(1, function()
|
||||
socket:open()
|
||||
timer.Create("gmInte:WebSocket:CheckConnection", 4, 0, function()
|
||||
if !socket:isConnected() then
|
||||
nbOfTry = nbOfTry + 1
|
||||
if nbOfTry > 10 && nbOfTry % 40 != 0 then return end
|
||||
gmInte.log("WebSocket is not connected, trying to reconnect", true)
|
||||
timer.Remove("gmInte:WebSocket:CheckConnection")
|
||||
gmInte.setupWebSocket()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
hook.Add("GmodIntegration:Websocket:Restart", "gmInte:WebSocket:Restart", function() gmInte.setupWebSocket() end)
|
||||
hook.Add("InitPostEntity", "gmInte:ServerReady:WebSocket", function() timer.Simple(1, function() gmInte.setupWebSocket() end) end)
|
|
@ -1,48 +1,28 @@
|
|||
//
|
||||
// Console Commands
|
||||
//
|
||||
|
||||
local conFuncs = {
|
||||
["version"] = function()
|
||||
gmInte.log("Version: " .. gmInte.version)
|
||||
end,
|
||||
["setting"] = function(args)
|
||||
gmInte.saveSetting(args[2], args[3])
|
||||
end,
|
||||
["try"] = function()
|
||||
gmInte.tryConfig()
|
||||
end,
|
||||
["refresh"] = function()
|
||||
gmInte.refreshSettings()
|
||||
end,
|
||||
["get-server-id"] = function()
|
||||
print(gmInte.config.id || "none")
|
||||
end
|
||||
["version"] = function() print("Version: " .. gmInte.version) end,
|
||||
["set-setting"] = function(args) gmInte.saveSetting(args[2], args[3]) end,
|
||||
["show-settings"] = function() PrintTable(gmInte.config) end,
|
||||
["try"] = function() gmInte.tryConfig() end,
|
||||
["refresh"] = function() gmInte.refreshSettings() end,
|
||||
["get-server-id"] = function() print(gmInte.config.id || "none") end,
|
||||
["export-warns"] = function() hook.Run("GmodIntegration:ExportWarns") end
|
||||
}
|
||||
|
||||
concommand.Add("gmod-integration", function(ply, cmd, args)
|
||||
// only usable by server console and superadmins
|
||||
if ply:IsPlayer() && !ply:IsSuperAdmin() then return end
|
||||
|
||||
// check if argument is valid
|
||||
local function cmdExecuted(ply, cmd, args)
|
||||
if ply:IsPlayer() && !ply:gmIntIsAdmin() then return end
|
||||
if conFuncs[args[1]] then
|
||||
conFuncs[args[1]](args)
|
||||
else
|
||||
gmInte.log("Unknown Command Argument")
|
||||
print("Unknown Command, available commands are:")
|
||||
print("version")
|
||||
print("set-setting <setting> <value>")
|
||||
print("show-settings")
|
||||
print("try")
|
||||
print("refresh")
|
||||
print("get-server-id")
|
||||
print("export-warns")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
concommand.Add("gm_integration", function(ply, cmd, args)
|
||||
// run the old command
|
||||
RunConsoleCommand("gmod-integration", unpack(args))
|
||||
end)
|
||||
|
||||
concommand.Add("gmod_integration", function(ply, cmd, args)
|
||||
// run the old command
|
||||
RunConsoleCommand("gmod-integration", unpack(args))
|
||||
end)
|
||||
|
||||
concommand.Add("gm-integration", function(ply, cmd, args)
|
||||
// run the old command
|
||||
RunConsoleCommand("gmod-integration", unpack(args))
|
||||
end)
|
||||
concommand.Add("gmi", cmdExecuted)
|
||||
concommand.Add("gmod-integration", cmdExecjsonuted)
|
81
lua/gmod_integration/server/sv_filtrers.lua
Normal file
81
lua/gmod_integration/server/sv_filtrers.lua
Normal file
|
@ -0,0 +1,81 @@
|
|||
local function filterMessage(reason)
|
||||
local Message = {}
|
||||
table.insert(Message, "----------------------------------------")
|
||||
table.insert(Message, gmInte.getTranslation("filter.ds.1", "You cannot join this server"))
|
||||
table.insert(Message, "")
|
||||
table.insert(Message, gmInte.getTranslation("filter.ds.2", "Reason: {1}", reason && reason || gmInte.getTranslation("filter.none", "none")))
|
||||
if gmInte.config.supportLink && gmInte.config.supportLink != "" then table.insert(Message, gmInte.getTranslation("filter.ds.3", "Help URL: {1}", gmInte.config.supportLink)) end
|
||||
table.insert(Message, "")
|
||||
table.insert(Message, gmInte.getTranslation("filter.ds.4", "Have a nice day"))
|
||||
table.insert(Message, "----------------------------------------")
|
||||
table.insert(Message, gmInte.getTranslation("filter.ds.5", "Service provided by Gmod Integration"))
|
||||
for k, v in ipairs(Message) do
|
||||
Message[k] = "\n" .. v
|
||||
end
|
||||
return table.concat(Message)
|
||||
end
|
||||
|
||||
local function checkBanStatus(banStatus)
|
||||
if gmInte.config.filterOnBan && banStatus then return false end
|
||||
return true
|
||||
end
|
||||
|
||||
local function checkDiscordBanStatus(banStatus)
|
||||
if gmInte.config.syncBan && banStatus then return false end
|
||||
return true
|
||||
end
|
||||
|
||||
local function checkPlayerFilter(code, body, data)
|
||||
if !body then return end
|
||||
if data.rank && gmInte.config.adminRank[data.rank] then return end
|
||||
if gmInte.config.maintenance && !body.bypassMaintenance && !body.discordAdmin then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.maintenance", "The server is currently under maintenance and you are not whitelisted."))) end
|
||||
if !checkBanStatus(body.ban) then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.ban", "You are banned from this server."))) end
|
||||
if !checkDiscordBanStatus(body.discord_ban) then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.discord_ban", "You are banned from our discord server."))) end
|
||||
end
|
||||
|
||||
local function checkPlayerIsLink(code, body, data)
|
||||
if !body then return end
|
||||
if !body.discordID then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.link", "You need to link your discord account before joining, verify your account on {1}", "https://gmod-integration.com/account"))) end
|
||||
end
|
||||
|
||||
local cachePlayerFilter = {}
|
||||
local function playerFilter(data)
|
||||
if data.bot == 1 then return end
|
||||
data.steamID64 = util.SteamIDTo64(data.networkid)
|
||||
cachePlayerFilter[data.steamID64] = cachePlayerFilter[data.steamID64] || {}
|
||||
local cachedData = cachePlayerFilter[data.steamID64]
|
||||
// Check if player is banned
|
||||
if !cachedData || !cachedData.filterData || cachedData.filterData.curTime + 30 < CurTime() then
|
||||
gmInte.http.get("/servers/:serverID/players/" .. data.steamID64, function(code, body)
|
||||
cachePlayerFilter[data.steamID64].filterData = {
|
||||
["code"] = code,
|
||||
["body"] = body,
|
||||
["curTime"] = CurTime()
|
||||
}
|
||||
|
||||
checkPlayerFilter(code, body, data)
|
||||
end, function(code, body) if gmInte.config.maintenance then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.maintenance", "The server is currently under maintenance and you are not whitelisted."))) end end)
|
||||
else
|
||||
checkPlayerFilter(cachedData.filterData.code, cachedData.filterData.body, data)
|
||||
end
|
||||
|
||||
// Check if player has a discord account linked
|
||||
if gmInte.config.forcePlayerLink && gmInte.config.verifyOnJoin then
|
||||
if !cachedData || !cachedData.isLinkData || cachedData.isLinkData.curTime + 30 < CurTime() then
|
||||
gmInte.http.get("/users?steamID64=" .. data.steamID64, function(code, body)
|
||||
cachePlayerFilter[data.steamID64].isLinkData = {
|
||||
["code"] = code,
|
||||
["body"] = body,
|
||||
["curTime"] = CurTime()
|
||||
}
|
||||
|
||||
checkPlayerIsLink(code, body, data)
|
||||
end, function(code, body) if code == 404 then game.KickID(data.networkid, filterMessage(gmInte.getTranslation("filter.link", "You need to link your discord account before joining, verify your account on {1}", "https://gmod-integration.com/account"))) end end)
|
||||
else
|
||||
checkPlayerIsLink(cachedData.isLinkData.code, cachedData.isLinkData.body, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
gameevent.Listen("player_connect")
|
||||
hook.Add("player_connect", "gmInte:Player:Connect:Filter", function(data) playerFilter(data) end)
|
|
@ -1,40 +0,0 @@
|
|||
//
|
||||
// Server Hooks
|
||||
//
|
||||
|
||||
hook.Add("ShutDown", "gmInte:Server:ShutDown", function()
|
||||
gmInte.serverShutDown()
|
||||
end)
|
||||
|
||||
hook.Add("Initialize", "gmInte.sendStatus", function()
|
||||
timer.Simple(1, function()
|
||||
gmInte.serverStart()
|
||||
end)
|
||||
end)
|
||||
|
||||
//
|
||||
// Player Hooks
|
||||
//
|
||||
|
||||
gameevent.Listen("player_connect")
|
||||
hook.Add("player_connect", "gmInte:Player:Connect", function(data)
|
||||
gmInte.playerConnect(data)
|
||||
gmInte.playerFilter(data)
|
||||
end)
|
||||
|
||||
gameevent.Listen("server_addban")
|
||||
hook.Add("server_addban", "gmInte:Player:Ban", function(data)
|
||||
gmInte.playerBan(data)
|
||||
end)
|
||||
|
||||
hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply)
|
||||
gmInte.playerDisconnected(ply)
|
||||
end)
|
||||
|
||||
hook.Add("onPlayerChangedName", "gmInte:PlayerChangeName", function(ply, old, new)
|
||||
gmInte.playerChangeName(ply, old, new)
|
||||
end)
|
||||
|
||||
hook.Add("PlayerSay", "gmInte:PlayerSay", function(ply, text, team)
|
||||
gmInte.playerSay(ply, text, team)
|
||||
end)
|
|
@ -1,248 +0,0 @@
|
|||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
local function logFormatWeapon(weapon, data)
|
||||
data = data or {}
|
||||
data.class = weapon:GetClass()
|
||||
data.printName = weapon:GetPrintName()
|
||||
return data
|
||||
end
|
||||
|
||||
local function logFormatEntity(ent, data)
|
||||
data = data or {}
|
||||
data.class = ent:GetClass()
|
||||
data.model = ent:GetModel()
|
||||
data.pos = ent:GetPos()
|
||||
data.ang = ent:GetAngles()
|
||||
return data
|
||||
end
|
||||
|
||||
local function logFormatVector(vec, data)
|
||||
data = data or {}
|
||||
data.x = vec.x
|
||||
data.y = vec.y
|
||||
data.z = vec.z
|
||||
return data
|
||||
end
|
||||
|
||||
local function logFormatAngle(ang, data)
|
||||
data = data or {}
|
||||
data.p = ang.p
|
||||
data.y = ang.y
|
||||
data.r = ang.r
|
||||
return data
|
||||
end
|
||||
|
||||
local function logFormatTeam(teamID, data)
|
||||
data = data or {}
|
||||
data.id = teamID
|
||||
data.name = team.GetName(teamID)
|
||||
return data
|
||||
end
|
||||
|
||||
local function logFormatPlayer(ply, data)
|
||||
data = data or {}
|
||||
data.steamID64 = ply:SteamID64()
|
||||
data.steamID = ply:SteamID()
|
||||
data.nick = ply:Nick()
|
||||
data.userGroup = ply:GetUserGroup()
|
||||
data.team = logFormatTeam(ply:Team())
|
||||
return data
|
||||
end
|
||||
|
||||
local function logDisable()
|
||||
return !gmInte.config.sendLog
|
||||
end
|
||||
|
||||
local function validLogAndPlayers(players)
|
||||
if (logDisable()) then return false end
|
||||
for _, ply in pairs(players) do
|
||||
// return if not valid, player or bot and bots logs are disabled
|
||||
if (!IsValid(ply)) then return false end
|
||||
if (!ply:IsPlayer()) then return false end
|
||||
if (!ply:IsBot() && !gmInte.config.logBotActions) then return false end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
//
|
||||
// Posts
|
||||
//
|
||||
|
||||
function gmInte.postLogPlayerSay(ply, text, teamChat)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerSay",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply),
|
||||
["text"] = text,
|
||||
["teamChat"] = teamChat
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerDeath(ply, inflictor, attacker)
|
||||
if (!validLogAndPlayers({ply, attacker})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerDeath",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply),
|
||||
["inflictor"] = logFormatEntity(inflictor),
|
||||
["attacker"] = logFormatPlayer(attacker)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerInitialSpawn(ply)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerInitialSpawn",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken)
|
||||
if (!validLogAndPlayers({ply, attacker})) then return end
|
||||
|
||||
// Wait a second to see if the player is going to be hurt again
|
||||
ply.gmodInteLastHurt = ply.gmodInteLastHurt || {}
|
||||
local locCurTime = CurTime()
|
||||
ply.gmodInteLastHurt[attacker:SteamID64()] = locCurTime
|
||||
|
||||
timer.Simple(1, function()
|
||||
if (ply.gmodInteLastHurt[attacker:SteamID64()] != locCurTime) then
|
||||
ply.gmodInteTotalDamage = ply.gmodInteTotalDamage || 0
|
||||
ply.gmodInteTotalDamage = ply.gmodInteTotalDamage + damageTaken
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.post("/server/log/playerHurt",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply),
|
||||
["attacker"] = logFormatPlayer(attacker),
|
||||
["healthRemaining"] = healthRemaining,
|
||||
["damageTaken"] = ply.gmodInteTotalDamage
|
||||
}
|
||||
)
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerSpawnedSomething(object, ply, ent, model)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerSpawnedSomething",
|
||||
{
|
||||
["object"] = object,
|
||||
["ply"] = logFormatPlayer(ply),
|
||||
["ent"] = logFormatEntity(ent),
|
||||
["model"] = model || ""
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerSpawn(ply)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerSpawn",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerDisconnect(ply)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerDisconnect",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerConnect(data)
|
||||
if (logDisable() || data.bot) then return end
|
||||
|
||||
gmInte.post("/server/log/playerConnect",
|
||||
{
|
||||
["steamID64"] = util.SteamIDTo64(data.networkid),
|
||||
["steamID"] = data.networkid,
|
||||
["name"] = data.name,
|
||||
["ip"] = data.address
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerGivet(ply, class, swep)
|
||||
if (!validLogAndPlayers({ply})) then return end
|
||||
|
||||
gmInte.post("/server/log/playerGive",
|
||||
{
|
||||
["ply"] = logFormatPlayer(ply),
|
||||
["class"] = class,
|
||||
["swep"] = swep
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
//
|
||||
// Hooks
|
||||
//
|
||||
|
||||
gameevent.Listen("player_connect")
|
||||
|
||||
// Sandbox - Player
|
||||
hook.Add("PlayerSay", "gmInte:Log:PlayerSay", function(ply, text, teamChat)
|
||||
gmInte.postLogPlayerSay(ply, text, teamChat)
|
||||
end)
|
||||
hook.Add("PlayerSpawn", "gmInte:Log:PlayerSpawn", function(ply)
|
||||
gmInte.postLogPlayerSpawn(ply)
|
||||
end)
|
||||
hook.Add("PlayerInitialSpawn", "gmInte:Log:PlayerInitialSpawn", function(ply)
|
||||
gmInte.postLogPlayerInitialSpawn(ply)
|
||||
end)
|
||||
hook.Add("PlayerDisconnected", "gmInte:Log:PlayerDisconnected", function(ply)
|
||||
gmInte.postLogPlayerDisconnect(ply)
|
||||
end)
|
||||
hook.Add("PlayerGiveSWEP", "gmInte:Log:PlayerSWEPs", function( ply, class, swep )
|
||||
gmInte.postLogPlayerGivet(ply, class, swep)
|
||||
end)
|
||||
|
||||
// Sandbox - Server Events
|
||||
hook.Add("player_connect", "gmInte:Log:PlayerConnect", function(data)
|
||||
gmInte.postLogPlayerConnect(data)
|
||||
end)
|
||||
|
||||
// Sandbox - Player Combat
|
||||
hook.Add("PlayerDeath", "gmInte:Log:PlayerDeath", function(ply, inflictor, attacker)
|
||||
gmInte.postLogPlayerDeath(ply, inflictor, attacker)
|
||||
end)
|
||||
hook.Add("PlayerHurt", "gmInte:Log:PlayerHurt", function(ply, attacker, healthRemaining, damageTaken)
|
||||
gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken)
|
||||
end)
|
||||
|
||||
// Sandbox - Spawnables
|
||||
hook.Add("PlayerSpawnedProp", "gmInte:Log:PlayerSpawnedProp", function(ply, model, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("SENT", ply, ent, model)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedSENT", "gmInte:Log:PlayerSpawnedSENT", function(ply, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("SENT", ply, ent)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedNPC", "gmInte:Log:PlayerSpawnedNPC", function(ply, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("NPC", ply, ent)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedVehicle", "gmInte:Log:PlayerSpawnedVehicle", function(ply, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("Vehicle", ply, ent)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedEffect", "gmInte:Log:PlayerSpawnedEffect", function(ply, model, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("Effect", ply, ent, model)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedRagdoll", "gmInte:Log:PlayerSpawnedRagdoll", function(ply, model, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("Ragdoll", ply, ent, model)
|
||||
end)
|
||||
hook.Add("PlayerSpawnedSWEP", "gmInte:Log:PlayerSpawnedSWEP", function(ply, ent)
|
||||
gmInte.postLogPlayerSpawnedSomething("SWEP", ply, ent)
|
||||
end)
|
|
@ -1,273 +0,0 @@
|
|||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
function gmInte.removePort(ip)
|
||||
return string.Explode(":", ip)[1]
|
||||
end
|
||||
|
||||
function gmInte.plyValid(ply)
|
||||
return ply:IsValid() && ply:IsPlayer() && !ply:IsBot()
|
||||
end
|
||||
|
||||
function gmInte.saveSetting(setting, value)
|
||||
// save this in data/gmod_integration/setting.json but first check if variable is valid
|
||||
if gmInte.config[setting] == nil then
|
||||
gmInte.log("Unknown Setting")
|
||||
return
|
||||
end
|
||||
|
||||
// Boolean
|
||||
if (value == "true") then value = true end
|
||||
if (value == "false") then value = false end
|
||||
|
||||
// Number
|
||||
if (tonumber(value) != nil) then value = tonumber(value) end
|
||||
|
||||
gmInte.config[setting] = value
|
||||
file.Write("gm_integration/config.json", util.TableToJSON(gmInte.config, true))
|
||||
gmInte.log("Setting Saved")
|
||||
end
|
||||
|
||||
function gmInte.playerConnect(data)
|
||||
if (data.bot == 1) then return end
|
||||
|
||||
data.steam = util.SteamIDTo64(data.networkid)
|
||||
|
||||
gmInte.post("/server/user/connect", data)
|
||||
end
|
||||
|
||||
local function getCustomValues(ply)
|
||||
local customValues = {}
|
||||
|
||||
customValues.money = ply:gmInteGetTotalMoney() || 0
|
||||
|
||||
return customValues
|
||||
end
|
||||
|
||||
local function getTriggerInfo(text)
|
||||
for k, v in pairs(gmInte.config.chatTrigger) do
|
||||
if (string.StartWith(text, k)) then
|
||||
local defaultConfig = {
|
||||
["trigger"] = k,
|
||||
["prefix"] = "",
|
||||
["show_rank"] = false,
|
||||
["anonymous"] = false,
|
||||
["channel"] = "admin_sync_chat"
|
||||
}
|
||||
for k2, v2 in pairs(v) do
|
||||
defaultConfig[k2] = v2
|
||||
end
|
||||
return defaultConfig
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function gmInte.playerSay(ply, text, team)
|
||||
if (!gmInte.config.syncChat) then return end
|
||||
|
||||
gmInte.post("/server/user/say",
|
||||
{
|
||||
["steamID64"] = ply:SteamID64(),
|
||||
["message"] = text,
|
||||
["name"] = ply:Nick(),
|
||||
["usergroup"] = ply:GetUserGroup(),
|
||||
["message_info"] = triggerInfo
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.wsPlayerSay(data)
|
||||
if !gmInte.config.syncChat then return end
|
||||
gmInte.SendNet(1, data, nil)
|
||||
end
|
||||
|
||||
function gmInte.playerBan(data)
|
||||
data.steam = util.SteamIDTo64(data.networkid)
|
||||
gmInte.post("/server/user/ban", data)
|
||||
end
|
||||
|
||||
function gmInte.userFinishConnect(ply)
|
||||
if (!gmInte.plyValid(ply)) then return end
|
||||
|
||||
gmInte.post("/server/user/finishConnect",
|
||||
{
|
||||
["steam"] = ply:SteamID64(),
|
||||
["name"] = ply:Nick(),
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.serverShutDown()
|
||||
gmInte.post("/server/shutdown")
|
||||
end
|
||||
|
||||
function gmInte.sendStatus(start)
|
||||
if (gmInte.config.id == "" || gmInte.config.token == "") then
|
||||
gmInte.logError("ID or Token is empty: (id: " .. (gmInte.config.id == "" && "empty" || gmInte.config.id) .. ", token: " .. (gmInte.config.token == "" && "empty" || "not empty but hide") .. ")")
|
||||
gmInte.logHint("Use 'gmod-integration setting id YOUR_SERVER_ID' and 'gmod-integration setting token YOUR_SERVER_TOKEN' to set your credentials, you can find them on https://gmod-integration.com/guild/servers")
|
||||
return
|
||||
end
|
||||
gmInte.post("/server/status",
|
||||
{
|
||||
["start"] = start || false,
|
||||
["hostname"] = GetHostName(),
|
||||
["ip"] = game.GetIPAddress(),
|
||||
["port"] = GetConVar("hostport"):GetInt(),
|
||||
["map"] = game.GetMap(),
|
||||
["players"] = #player.GetAll(),
|
||||
["maxplayers"] = game.MaxPlayers(),
|
||||
["gamemode"] = engine.ActiveGamemode()
|
||||
},
|
||||
function() end,
|
||||
function(code, body, headers)
|
||||
gmInte.logError("Your Credentials are Invalid: (id: " .. (gmInte.config.id == "" && "empty" || gmInte.config.id) .. ", token: " .. (gmInte.config.token == "" && "empty" || "not empty but hide") .. ")")
|
||||
gmInte.logHint("Use 'gmod-integration setting id YOUR_SERVER_ID' and 'gmod-integration setting token YOUR_SERVER_TOKEN' to set your credentials, you can find them on https://gmod-integration.com/guild/servers")
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.serverStart()
|
||||
gmInte.sendStatus(true)
|
||||
end
|
||||
|
||||
// every 5 minutes
|
||||
timer.Create("gmInte.sendStatus", 300, 0, function()
|
||||
gmInte.sendStatus()
|
||||
end)
|
||||
|
||||
function gmInte.playerChangeName(ply, old, new)
|
||||
if (!gmInte.plyValid(ply)) then return end
|
||||
|
||||
gmInte.post("/server/user/changeName",
|
||||
{
|
||||
["steamID64"] = ply:SteamID64(),
|
||||
["oldName"] = old,
|
||||
["newName"] = new,
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.playerDisconnected(ply)
|
||||
if (!gmInte.plyValid(ply)) then return end
|
||||
|
||||
gmInte.post("/server/user/disconnect",
|
||||
{
|
||||
["steam"] = ply:SteamID64(),
|
||||
["kills"] = ply:Frags() || 0,
|
||||
["deaths"] = ply:Deaths() || 0,
|
||||
["customValues"] = getCustomValues(ply),
|
||||
["rank"] = ply:GetUserGroup() || "user",
|
||||
["time"] = math.Round(RealTime() - ply.gmIntTimeConnect) || 0,
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.tryConfig()
|
||||
gmInte.get("/server",
|
||||
function(code, body)
|
||||
print(" ")
|
||||
gmInte.log("Congratulations your server is now connected to Gmod Integration")
|
||||
gmInte.log("Server Name: " .. body.name)
|
||||
gmInte.log("Server ID: " .. body.id)
|
||||
print(" ")
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.testConnection(ply)
|
||||
gmInte.get("/server",
|
||||
function(code, body)
|
||||
gmInte.SendNet(3, body, ply)
|
||||
end,
|
||||
function(code, body, headers)
|
||||
gmInte.SendNet(3, body, ply)
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.serverShutDown()
|
||||
for ply, ply in pairs(player.GetAll()) do
|
||||
gmInte.playerDisconnected(ply)
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.refreshSettings()
|
||||
gmInte.config = util.JSONToTable(file.Read("gm_integration/config.json", "DATA"))
|
||||
gmInte.log("Settings Refreshed")
|
||||
gmInte.tryConfig()
|
||||
end
|
||||
|
||||
local function filterMessage(reason)
|
||||
local Message = {
|
||||
[1] = "\n",
|
||||
[2] = "This server has player filtering enabled",
|
||||
[3] = "You are not allowed to join this server",
|
||||
[4] = "",
|
||||
[5] = "Reason: " .. reason,
|
||||
[6] = "",
|
||||
[7] = "For more information, please contact the server owner",
|
||||
[8] = "Help URL: " .. (gmInte.config.supportLink && gmInte.config.supportLink || "No Support Link"),
|
||||
[9] = "",
|
||||
[10] = "You can also contact us on our discord server",
|
||||
[11] = "https://gmod-integration.com/discord",
|
||||
[12] = "",
|
||||
[13] = "Have a nice day",
|
||||
[14] = "",
|
||||
[15] = "Service provided by Gmod Integration",
|
||||
}
|
||||
for k, v in pairs(Message) do
|
||||
Message[k] = v .. "\n"
|
||||
end
|
||||
return table.concat(Message)
|
||||
end
|
||||
|
||||
function gmInte.playerFilter(data)
|
||||
if (data.bot == 1) then return end
|
||||
|
||||
data.steamID64 = util.SteamIDTo64(data.networkid)
|
||||
|
||||
// get data
|
||||
gmInte.get("/server/user" .. "?steamID64=" .. data.steamID64,
|
||||
function(code, body)
|
||||
if (!body || !body.trust) then return end
|
||||
|
||||
// Gmod Integration Trust
|
||||
if (gmInte.config.filterOnTrust && (body.trust < gmInte.config.minimalTrust)) then
|
||||
// kick player
|
||||
game.KickID(data.networkid, filterMessage("Insufficient Trust Level\nYour Trust Level: " .. body.trust .. "\nMinimal Trust Level: " .. gmInte.config.minimalTrust))
|
||||
end
|
||||
|
||||
// Gmod Integration Ban
|
||||
if (gmInte.config.filterOnBan && body.ban) then
|
||||
// kick player
|
||||
game.KickID(data.networkid, filterMessage("You are banned from Gmod Integration"))
|
||||
end
|
||||
|
||||
// Server Discord Ban
|
||||
if (gmInte.config.syncBan && body.discord_ban) then
|
||||
// kick player
|
||||
game.KickID(data.networkid, filterMessage("You are banned from the discord server\nReason: " .. (body.discord_ban_reason && body.discord_ban_reason || "No Reason")))
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.superadminGetConfig(ply)
|
||||
if (!gmInte.plyValid(ply) || !ply:IsSuperAdmin()) then return end
|
||||
|
||||
gmInte.config.websocket = GWSockets && true || false
|
||||
gmInte.SendNet(2, gmInte.config, ply)
|
||||
end
|
||||
|
||||
function gmInte.superadminSetConfig(ply, data)
|
||||
if (!gmInte.plyValid(ply) || !ply:IsSuperAdmin()) then return end
|
||||
|
||||
for k, v in pairs(data) do
|
||||
gmInte.saveSetting(k, v)
|
||||
end
|
||||
|
||||
if data.token || data.id then
|
||||
gmInte.testConnection(ply)
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
// Meta
|
||||
local ply = FindMetaTable("Player")
|
||||
|
||||
function ply:gmInteGetTotalMoney()
|
||||
// if darkrp
|
||||
if DarkRP then
|
||||
return self:getDarkRPVar("money")
|
||||
end
|
||||
|
||||
// else
|
||||
return 0
|
||||
end
|
|
@ -1,54 +1,50 @@
|
|||
//
|
||||
// Network
|
||||
//
|
||||
|
||||
/*
|
||||
Upload
|
||||
1 - Add Chat Message
|
||||
2 - Get Config
|
||||
3 - Test Connection (Response)
|
||||
Receive
|
||||
0 - Player is Ready
|
||||
1 - Test Connection
|
||||
2 - Get Config
|
||||
3 - Set Config
|
||||
*/
|
||||
|
||||
util.AddNetworkString("gmIntegration")
|
||||
local netSend = {
|
||||
["wsRelayDiscordChat"] = 1,
|
||||
["adminConfig"] = 2,
|
||||
["testApiConnection"] = 3,
|
||||
["publicConfig"] = 5,
|
||||
["chatColorMessage"] = 6,
|
||||
["openVerifPopup"] = 7,
|
||||
["savePlayerToken"] = 8
|
||||
}
|
||||
|
||||
// Send
|
||||
function gmInte.SendNet(id, data, ply, func)
|
||||
if !netSend[id] then return end
|
||||
net.Start("gmIntegration")
|
||||
net.WriteUInt(id, 8)
|
||||
net.WriteString(util.TableToJSON(data))
|
||||
if (func) then func() end
|
||||
if (ply == nil) then
|
||||
net.WriteUInt(netSend[id], 8)
|
||||
net.WriteString(util.TableToJSON(data || {}))
|
||||
if func then func() end
|
||||
if ply == nil then
|
||||
net.Broadcast()
|
||||
else
|
||||
net.Send(ply)
|
||||
end
|
||||
end
|
||||
|
||||
// Receive
|
||||
local netFuncs = {
|
||||
[0] = function(ply)
|
||||
gmInte.userFinishConnect(ply)
|
||||
ply.gmIntTimeConnect = math.Round(RealTime())
|
||||
local netReceive = {
|
||||
[0] = function(ply, data)
|
||||
if ply.gmIntIsReady then return end
|
||||
ply.branch = data.branch
|
||||
hook.Run("gmInte:PlayerReady", ply)
|
||||
end,
|
||||
[1] = function(ply, data)
|
||||
gmInte.testConnection(ply, data)
|
||||
[1] = function(ply, data) gmInte.testConnection(ply, data) end,
|
||||
[2] = function(ply) gmInte.superadminGetConfig(ply) end,
|
||||
[3] = function(ply, data) gmInte.superadminSetConfig(ply, data) end,
|
||||
[4] = function(ply) gmInte.takeScreenshot(ply) end,
|
||||
[5] = function(ply)
|
||||
if !ply:gmIntIsAdmin() then return end
|
||||
RunConsoleCommand("changelevel", game.GetMap())
|
||||
end,
|
||||
[2] = function(ply)
|
||||
gmInte.superadminGetConfig(ply)
|
||||
end,
|
||||
[3] = function(ply, data)
|
||||
gmInte.superadminSetConfig(ply, data)
|
||||
end
|
||||
[6] = function(ply) gmInte.verifyPlayer(ply) end,
|
||||
[7] = function(ply, data) gmInte.sendPlayerToken(ply) end
|
||||
}
|
||||
|
||||
net.Receive("gmIntegration", function(len, ply)
|
||||
if !ply:IsPlayer() then return end
|
||||
if !ply || ply && !ply:IsValid() then return end
|
||||
local id = net.ReadUInt(8)
|
||||
local data = util.JSONToTable(net.ReadString() || "{}")
|
||||
if (netFuncs[id]) then netFuncs[id](ply, data) end
|
||||
if !netReceive[id] then return end
|
||||
netReceive[id](ply, data)
|
||||
end)
|
127
lua/gmod_integration/server/sv_players.lua
Normal file
127
lua/gmod_integration/server/sv_players.lua
Normal file
|
@ -0,0 +1,127 @@
|
|||
function gmInte.playerReady(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
// Initialize Time
|
||||
ply.gmIntTimeConnect = math.Round(RealTime())
|
||||
// Send Public Config
|
||||
gmInte.publicGetConfig(ply)
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/ready", {
|
||||
["player"] = gmInte.getPlayerFormat(ply)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerConnect(data)
|
||||
data.steamID64 = util.SteamIDTo64(data.networkid)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. util.SteamIDTo64(data.networkid) .. "/connect", data)
|
||||
end
|
||||
|
||||
function gmInte.playerDisconnected(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/disconnect", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerChangedTeam(ply, oldTeam, newTeam)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/team", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["oldTeam"] = gmInte.getTeamFormat(oldTeam),
|
||||
["newTeam"] = gmInte.getTeamFormat(newTeam)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerSpawn(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/spawn", {
|
||||
["player"] = gmInte.getPlayerFormat(ply)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerDeath(ply, inflictor, attacker)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
if !attacker:IsValid() || !attacker:IsPlayer(attacker) then return end
|
||||
if !inflictor:IsValid() then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/death", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["inflictor"] = gmInte.getEntityFormat(inflictor),
|
||||
["attacker"] = gmInte.getPlayerFormat(attacker)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerInitialSpawn(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/initial-spawn", {
|
||||
["player"] = gmInte.getPlayerFormat(ply)
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
if !attacker:IsValid() || !attacker:IsPlayer(attacker) then return end
|
||||
// Wait a second to see if the player is going to be hurt again
|
||||
ply.gmodInteLastHurt = ply.gmodInteLastHurt || {}
|
||||
local locCurTime = CurTime()
|
||||
ply.gmodInteLastHurt[attacker:SteamID64()] = locCurTime
|
||||
timer.Simple(1, function()
|
||||
if ply.gmodInteLastHurt[attacker:SteamID64()] != locCurTime then
|
||||
ply.gmodInteTotalDamage = ply.gmodInteTotalDamage || 0
|
||||
ply.gmodInteTotalDamage = ply.gmodInteTotalDamage + damageTaken
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/hurt", {
|
||||
["victim"] = gmInte.getPlayerFormat(ply),
|
||||
["attacker"] = gmInte.getPlayerFormat(attacker),
|
||||
["healthRemaining"] = math.Round(healthRemaining),
|
||||
["damageTaken"] = math.Round(damageTaken)
|
||||
})
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerSpawnedSomething(object, ply, ent, model)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
if !ent:IsValid() then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/spawn/" .. object, {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["entity"] = gmInte.getEntityFormat(ent),
|
||||
["model"] = model || ""
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.postLogPlayerGive(ply, class, swep)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.postLog("/servers/:serverID/players/" .. ply:SteamID64() .. "/give", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["class"] = class,
|
||||
["swep"] = swep
|
||||
})
|
||||
end
|
||||
|
||||
local function savePlyDisconnect()
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
gmInte.playerDisconnected(ply)
|
||||
end
|
||||
end
|
||||
|
||||
gameevent.Listen("player_connect")
|
||||
hook.Add("ShutDown", "gmInte:Server:Shutdown:SavePlayers", savePlyDisconnect)
|
||||
hook.Add("GMI:SaveBeforeCrash", "gmInte:Server:BeforeCrash:SavePlayers", savePlyDisconnect)
|
||||
hook.Add("gmInte:PlayerReady", "gmInte:Player:Ready", function(ply) gmInte.playerReady(ply) end)
|
||||
hook.Add("player_connect", "gmInte:Player:Connect", function(data) gmInte.playerConnect(data) end)
|
||||
hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply) gmInte.playerDisconnected(ply) end)
|
||||
hook.Add("PlayerSpawn", "gmInte:Player:Spawn", function(ply) gmInte.playerSpawn(ply) end)
|
||||
hook.Add("PlayerInitialSpawn", "gmInte:Player:InitialSpawn", function(ply) gmInte.playerInitialSpawn(ply) end)
|
||||
hook.Add("PlayerGiveSWEP", "gmInte:Player:SWEPs", function(ply, class, swep) gmInte.postLogPlayerGive(ply, class, swep) end)
|
||||
hook.Add("PlayerDeath", "gmInte:Player:Death", function(ply, inflictor, attacker) gmInte.playerDeath(ply, inflictor, attacker) end)
|
||||
hook.Add("PlayerHurt", "gmInte:Player:Hurt", function(ply, attacker, healthRemaining, damageTaken) gmInte.postLogPlayerHurt(ply, attacker, healthRemaining, damageTaken) end)
|
||||
hook.Add("PlayerSpawnedProp", "gmInte:Player:SpawnedProp", function(ply, model, ent) gmInte.postLogPlayerSpawnedSomething("prop", ply, ent, model) end)
|
||||
hook.Add("PlayerSpawnedSENT", "gmInte:Player:SpawnedSENT", function(ply, ent) gmInte.postLogPlayerSpawnedSomething("sent", ply, ent) end)
|
||||
hook.Add("PlayerSpawnedNPC", "gmInte:Player:SpawnedNPC", function(ply, ent) gmInte.postLogPlayerSpawnedSomething("npc", ply, ent) end)
|
||||
hook.Add("PlayerSpawnedVehicle", "gmInte:Player:SpawnedVehicle", function(ply, ent) gmInte.postLogPlayerSpawnedSomething("vehicle", ply, ent) end)
|
||||
hook.Add("PlayerSpawnedEffect", "gmInte:Player:SpawnedEffect", function(ply, model, ent) gmInte.postLogPlayerSpawnedSomething("effect", ply, ent, model) end)
|
||||
hook.Add("PlayerSpawnedRagdoll", "gmInte:Player:SpawnedRagdoll", function(ply, model, ent) gmInte.postLogPlayerSpawnedSomething("ragdoll", ply, ent, model) end)
|
||||
hook.Add("PlayerSpawnedSWEP", "gmInte:Player:SpawnedSWEP", function(ply, ent) gmInte.postLogPlayerSpawnedSomething("swep", ply, ent) end)
|
||||
hook.Add("PlayerChangedTeam", "gmInte:Player:ChangedTeam", function(ply, oldTeam, newTeam)
|
||||
gmInte.playerChangedTeam(ply, oldTeam, newTeam)
|
||||
ply:gmInteResetTimeLastTeamChange()
|
||||
end)
|
99
lua/gmod_integration/server/sv_players_verif.lua
Normal file
99
lua/gmod_integration/server/sv_players_verif.lua
Normal file
|
@ -0,0 +1,99 @@
|
|||
gmInte.plyInVerifQueue = gmInte.plyInVerifQueue || {}
|
||||
function gmInte.verifyPlayer(ply)
|
||||
if !gmInte.config.forcePlayerLink then return end
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
ply:Freeze(true)
|
||||
gmInte.http.get("/users?steamID64=" .. ply:SteamID64(), function(code, data)
|
||||
if data && data.discordID then ply.gmIntVerified = true end
|
||||
if !gmInte.config.forcePlayerLink || !ply.gmIntIsReady then return end
|
||||
if ply:gmIntIsVerified() then
|
||||
gmInte.plyInVerifQueue[ply:SteamID64()] = nil
|
||||
gmInte.SendNet("chatColorMessage", {
|
||||
[1] = {
|
||||
["text"] = gmInte.getTranslation("verification.success", "You have been verified"),
|
||||
["color"] = Color(255, 255, 255)
|
||||
}
|
||||
}, ply)
|
||||
|
||||
ply:Freeze(false)
|
||||
else
|
||||
gmInte.plyInVerifQueue[ply:SteamID64()] = ply
|
||||
gmInte.SendNet("chatColorMessage", {
|
||||
[1] = {
|
||||
["text"] = gmInte.getTranslation("verification.fail", "Failed to verify you"),
|
||||
["color"] = Color(255, 0, 0)
|
||||
}
|
||||
}, ply)
|
||||
|
||||
ply:Freeze(true)
|
||||
gmInte.SendNet("openVerifPopup", nil, ply)
|
||||
end
|
||||
end, function(code, data)
|
||||
gmInte.plyInVerifQueue[ply:SteamID64()] = ply
|
||||
ply:Freeze(true)
|
||||
gmInte.SendNet("chatColorMessage", {
|
||||
[1] = {
|
||||
["text"] = gmInte.getTranslation("verification.link_require", "This server requires you to link your Discord account to play"),
|
||||
["color"] = Color(255, 0, 0)
|
||||
}
|
||||
}, ply)
|
||||
|
||||
gmInte.SendNet("openVerifPopup", nil, ply)
|
||||
end)
|
||||
end
|
||||
|
||||
gmInte.plyInVerifBranchQueue = gmInte.plyInVerifBranchQueue || {}
|
||||
function gmInte.verifyPlayerBranch(ply)
|
||||
if gmInte.config.clientBranch == "any" then return end
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
ply:Freeze(true)
|
||||
gmInte.plyInVerifBranchQueue[ply:SteamID64()] = ply
|
||||
end
|
||||
|
||||
function gmInte.blockFamilySharing(ply)
|
||||
if !gmInte.config.verifyFamilySharing then return end
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) || ply:IsBot() || !ply:IsFullyAuthenticated() then return end
|
||||
if ply:OwnerSteamID64() == ply:SteamID64() then return end
|
||||
ply:Kick(gmInte.getTranslation("verification.family_sharing", "This server does not allow family sharing"))
|
||||
end
|
||||
|
||||
hook.Add("gmInte:PlayerReady", "gmInte:Verif:PlayerReady", function(ply)
|
||||
ply.gmIntIsReady = true
|
||||
gmInte.verifyPlayer(ply)
|
||||
gmInte.verifyPlayerBranch(ply)
|
||||
gmInte.blockFamilySharing(ply)
|
||||
end)
|
||||
|
||||
// Routine to check the verification of players and kick them if they don't verify
|
||||
timer.Create("gmInte:Verif:Check:forcePlayerLink", 30, 0, function()
|
||||
if !gmInte.config.forcePlayerLink || gmInte.config.verifyOnReadyKickTime == 0 then return end
|
||||
for steamID64, ply in pairs(gmInte.plyInVerifQueue) do
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then continue end
|
||||
local connectTime = math.Round(RealTime() - ply:gmIntGetConnectTime())
|
||||
gmInte.SendNet("chatColorMessage", {
|
||||
[1] = {
|
||||
["text"] = gmInte.getTranslation("verification.kick_in", "If you don't verify in {1} seconds you will be kicked", gmInte.config.verifyOnReadyKickTime - connectTime),
|
||||
["color"] = Color(224, 89, 89)
|
||||
}
|
||||
}, ply)
|
||||
|
||||
if connectTime >= gmInte.config.verifyOnReadyKickTime then ply:Kick(gmInte.getTranslation("verification.kick", "You have been kicked for not verifying, verify your account on {1}", "https://gmod-integration.com/account")) end
|
||||
gmInte.plyInVerifQueue[ply:SteamID64()] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
timer.Create("gmInte:Verif:Check:forcePlayerBranch", 30, 0, function()
|
||||
if gmInte.config.clientBranch == "any" then return end
|
||||
for steamID64, ply in pairs(gmInte.plyInVerifBranchQueue) do
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then continue end
|
||||
local connectTime = math.Round(RealTime() - ply:gmIntGetConnectTime())
|
||||
gmInte.SendNet("chatColorMessage", {
|
||||
[1] = {
|
||||
["text"] = gmInte.getTranslation("verification.kick_in_branch", "If you don't change your branch in {1} seconds you will be kicked", (gmInte.config.verifyOnReadyKickTime != 0 && gmInte.config.verifyOnReadyKickTime || 600) - connectTime),
|
||||
["color"] = Color(224, 89, 89)
|
||||
}
|
||||
}, ply)
|
||||
|
||||
if connectTime >= (gmInte.config.verifyOnReadyKickTime != 0 && gmInte.config.verifyOnReadyKickTime || 600) then ply:Kick(gmInte.getTranslation("verification.kick_branch", "You have been kicked for not changing your branch to {1}", gmInte.config.clientBranch)) end
|
||||
end
|
||||
end)
|
4
lua/gmod_integration/server/sv_rcon.lua
Normal file
4
lua/gmod_integration/server/sv_rcon.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
function gmInte.wsRcon(data)
|
||||
gmInte.log("Rcon Command from Discord '" .. data.command .. "' by " .. data.steamID)
|
||||
game.ConsoleCommand(data.command .. "\n")
|
||||
end
|
83
lua/gmod_integration/server/sv_settings.lua
Normal file
83
lua/gmod_integration/server/sv_settings.lua
Normal file
|
@ -0,0 +1,83 @@
|
|||
function gmInte.saveSetting(setting, value)
|
||||
if gmInte.config[setting] == nil then
|
||||
gmInte.log("Unknown Setting " .. setting)
|
||||
return
|
||||
end
|
||||
|
||||
if setting == "language" && !file.Exists("gmod_integration/shared/languages/sh_" .. value .. ".lua", "LUA") then
|
||||
gmInte.log("Unknown Language")
|
||||
return
|
||||
end
|
||||
|
||||
// Boolean
|
||||
if value == "true" then value = true end
|
||||
if value == "false" then value = false end
|
||||
// Number
|
||||
if tonumber(value) != nil then value = tonumber(value) end
|
||||
gmInte.config[setting] = value
|
||||
file.Write("gm_integration/config.json", util.TableToJSON(gmInte.config, true))
|
||||
gmInte.log("Setting Saved")
|
||||
if setting == "websocketFQDN" || setting == "id" || setting == "token" then hook.Run("GmodIntegration:Websocket:Restart") end
|
||||
if setting == "language" then gmInte.loadTranslations() end
|
||||
// send to all players the new public config
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
if ply:IsValid() && ply:IsPlayer(ply) then
|
||||
gmInte.log("Sending new Public Config to " .. ply:Nick(), true)
|
||||
gmInte.publicGetConfig(ply)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.tryConfig()
|
||||
gmInte.http.get("/servers/:serverID", function(code, body)
|
||||
print(" ")
|
||||
gmInte.log("Congratulations your server is now connected to Gmod Integration")
|
||||
gmInte.log("Server Name: " .. body.name)
|
||||
gmInte.log("Server ID: " .. body.id)
|
||||
print(" ")
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.testConnection(ply)
|
||||
gmInte.http.get("/servers/:serverID", function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end, function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end)
|
||||
end
|
||||
|
||||
function gmInte.refreshSettings()
|
||||
gmInte.config = util.JSONToTable(file.Read("gm_integration/config.json", "DATA"))
|
||||
gmInte.log("Settings Refreshed")
|
||||
gmInte.tryConfig()
|
||||
end
|
||||
|
||||
function gmInte.superadminGetConfig(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) || !ply:gmIntIsAdmin() then return end
|
||||
gmInte.config.websocket = GWSockets && true || false
|
||||
gmInte.SendNet("adminConfig", gmInte.config, ply)
|
||||
end
|
||||
|
||||
function gmInte.publicGetConfig(ply)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.SendNet("publicConfig", {
|
||||
["config"] = {
|
||||
["id"] = gmInte.config.id,
|
||||
["debug"] = gmInte.config.debug,
|
||||
["apiFQDN"] = gmInte.config.apiFQDN,
|
||||
["websocketFQDN"] = gmInte.config.websocketFQDN,
|
||||
["adminRank"] = gmInte.config.adminRank,
|
||||
["language"] = gmInte.config.language,
|
||||
["clientBranch"] = gmInte.config.clientBranch
|
||||
},
|
||||
["other"] = {
|
||||
["aprovedCredentials"] = gmInte.aprovedCredentials,
|
||||
["version"] = gmInte.version,
|
||||
}
|
||||
}, ply)
|
||||
end
|
||||
|
||||
function gmInte.superadminSetConfig(ply, data)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) || !ply:gmIntIsAdmin() then return end
|
||||
for k, v in pairs(data) do
|
||||
gmInte.saveSetting(k, v)
|
||||
end
|
||||
|
||||
if data.token || data.id then gmInte.testConnection(ply) end
|
||||
end
|
15
lua/gmod_integration/server/sv_status.lua
Normal file
15
lua/gmod_integration/server/sv_status.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
function gmInte.sendStatus()
|
||||
gmInte.http.post("/servers/:serverID/status", gmInte.getServerFormat())
|
||||
end
|
||||
|
||||
function gmInte.serverStart()
|
||||
gmInte.http.post("/servers/:serverID/start", gmInte.getServerFormat())
|
||||
end
|
||||
|
||||
function gmInte.serverShutDown()
|
||||
gmInte.http.post("/servers/:serverID/stop")
|
||||
end
|
||||
|
||||
timer.Create("gmInte.sendStatus", 40, 0, function() timer.Simple(math.random(0, 15), function() gmInte.sendStatus() end) end)
|
||||
hook.Add("Initialize", "gmInte:Server:Initialize:SendStatus", function() timer.Simple(1, function() gmInte.serverStart() end) end)
|
||||
hook.Add("ShutDown", "gmInte:Server:ShutDown:SendStatus", function() gmInte.serverShutDown() end)
|
13
lua/gmod_integration/server/sv_sync_bans.lua
Normal file
13
lua/gmod_integration/server/sv_sync_bans.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
function gmInte.wsSyncBan(data)
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
if ply:SteamID64() == data.steam then ply:Kick(data.reason || "You have been banned from the server.") end
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.playerBan(data)
|
||||
data.steamID64 = util.SteamIDTo64(data.networkid)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. util.SteamIDTo64(data.networkid) .. "/ban", data)
|
||||
end
|
||||
|
||||
gameevent.Listen("server_addban")
|
||||
hook.Add("server_addban", "gmInte:Player:Ban", function(data) gmInte.playerBan(data) end)
|
13
lua/gmod_integration/server/sv_sync_chat.lua
Normal file
13
lua/gmod_integration/server/sv_sync_chat.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
function gmInte.wsPlayerSay(data)
|
||||
gmInte.SendNet("wsRelayDiscordChat", data, nil)
|
||||
end
|
||||
|
||||
function gmInte.playerSay(ply, text, teamOnly)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/say", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["text"] = text,
|
||||
["teamOnly"] = teamOnly,
|
||||
})
|
||||
end
|
||||
|
||||
hook.Add("PlayerSay", "gmInte:SyncChat:PlayerSay", function(ply, text, team) gmInte.playerSay(ply, text, team) end)
|
12
lua/gmod_integration/server/sv_sync_kicks.lua
Normal file
12
lua/gmod_integration/server/sv_sync_kicks.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
function gmInte.wsSyncKick(data)
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
if ply:SteamID64() == data.steam then ply:Kick(data.reason || "You have been banned from the server.") end
|
||||
end
|
||||
end
|
||||
|
||||
function gmInte.playerKick(data)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. util.SteamIDTo64(data.networkid) .. "/kick", data)
|
||||
end
|
||||
|
||||
gameevent.Listen("player_disconnect")
|
||||
hook.Add("player_disconnect", "gmInte:SyncKick:Disconnect", function(data) if string.StartWith(data.reason, "Kicked by ") || data.reason == "No reason provided." then gmInte.playerKick(data) end end)
|
16
lua/gmod_integration/server/sv_sync_names.lua
Normal file
16
lua/gmod_integration/server/sv_sync_names.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
function gmInte.wsSyncName(data)
|
||||
local ply = player.GetBySteamID(data.steamID64)
|
||||
if !IsValid(ply) then return end
|
||||
if DarkRP then ply:setRPName(data.name) end
|
||||
end
|
||||
|
||||
function gmInte.playerChangeName(ply, oldName, newName)
|
||||
if !ply:IsValid() || !ply:IsPlayer(ply) then return end
|
||||
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/name", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["oldName"] = oldName,
|
||||
["newName"] = newName,
|
||||
})
|
||||
end
|
||||
|
||||
hook.Add("onPlayerChangedName", "gmInte:PlayerChangeName", function(ply, old, new) gmInte.playerChangeName(ply, old, new) end)
|
84
lua/gmod_integration/server/sv_sync_roles.lua
Normal file
84
lua/gmod_integration/server/sv_sync_roles.lua
Normal file
|
@ -0,0 +1,84 @@
|
|||
local cachedPlayers = {}
|
||||
function gmInte.wsPlayerUpdateGroup(data)
|
||||
gmInte.log("[Sync Role] Player " .. data.steamID64 .. " has been updated to group " .. data.group, true)
|
||||
if cachedPlayers[steamID64] == data.group then return end
|
||||
data.steamID = util.SteamIDFrom64(data.steamID64)
|
||||
data.group = data.add && data.group || "user"
|
||||
cachedPlayers[data.steamID64] = data.group
|
||||
local ply = player.GetBySteamID(data.steamID)
|
||||
if ply && ply:IsValid() then ply:SetUserGroup(data.group) end
|
||||
// ULX
|
||||
if ULib then
|
||||
if data.group == "user" then
|
||||
ULib.ucl.removeUser(data.steamID)
|
||||
else
|
||||
ULib.ucl.addUser(data.steamID, nil, nil, data.group)
|
||||
end
|
||||
end
|
||||
|
||||
// ServerGuard
|
||||
if serverguard then
|
||||
local ply = player.GetBySteamID(data.steamID)
|
||||
if ply then
|
||||
local rankData = serverguard.ranks:GetRank(data.group)
|
||||
serverguard.player:SetRank(ply, data.group)
|
||||
serverguard.player:SetImmunity(ply, rankData.immunity)
|
||||
serverguard.player:SetTargetableRank(ply, rankData.targetable)
|
||||
serverguard.player:SetBanLimit(ply, rankData.banlimit)
|
||||
else
|
||||
serverguard.player:SetRank(data.steamID, data.group)
|
||||
end
|
||||
end
|
||||
|
||||
// Evolve
|
||||
if evolve then evolve:RankPlayer(data.steamID64, data.group) end
|
||||
// sam - the gmodstore
|
||||
if sam then sam.player.set_rank_id(data.steamID, data.group) end
|
||||
// SAM - the other one
|
||||
if SAM then SAM:PlayerSetRank(data.steamID64, data.group) end
|
||||
// xAdmin
|
||||
if xAdmin then xAdmin.SetRank(data.steamID64, data.group) end
|
||||
// sAdmin
|
||||
if sAdmin then RunConsoleCommand("sa", "setrankid", data.steamID, data.group) end
|
||||
// maestro
|
||||
if maestro then maestro.userrank(data.steamID64, data.group) end
|
||||
// D3A
|
||||
if D3A then D3A.Ranks.SetSteamIDRank(data.steamID, data.group) end
|
||||
// Mercury
|
||||
if Mercury then RunConsoleCommand("hg", "setrank", data.steamID, data.group) end
|
||||
// FAdmin
|
||||
if FAdmin then RunConsoleCommand("fadmin", "setaccess", data.steamID, data.group) end
|
||||
// Nor Admin Mod for GMod
|
||||
if nordahl_cfg_3916 then RunConsoleCommand("add_staff", data.steamID64, "\"" .. data.steamID .. "\"", "\"" .. data.group .. "\"") end
|
||||
gmInte.log("[Sync Role] Player " .. data.steamID .. " has been updated to group " .. data.group)
|
||||
end
|
||||
|
||||
function gmInte.playerChangeGroup(steamID64, oldGroup, newGroup)
|
||||
if cachedPlayers[steamID64] == newGroup then return end
|
||||
cachedPlayers[steamID64] = newGroup
|
||||
gmInte.http.post("/servers/:serverID/players/" .. steamID64 .. "/group", {
|
||||
["oldGroup"] = oldGroup || "user",
|
||||
["newGroup"] = newGroup
|
||||
})
|
||||
end
|
||||
|
||||
// CAMI
|
||||
hook.Add("CAMI.PlayerUsergroupChanged", "gmInte:SyncRoles:CAMI:PlayerUsergroupChanged", function(ply, old, new)
|
||||
if ply:IsBot() || !ply:IsValid() then return end
|
||||
gmInte.playerChangeGroup(ply:SteamID64(), old, new)
|
||||
end)
|
||||
|
||||
hook.Add("CAMI.SteamIDUsergroupChanged", "gmInte:SyncRoles:CAMI:SteamIDUsergroupChanged", function(SteamID64, old, new)
|
||||
if string.StartWith(SteamID64, "STEAM_") then SteamID64 = util.SteamIDTo64(SteamID64) end
|
||||
gmInte.playerChangeGroup(SteamID64, old, new)
|
||||
end)
|
||||
|
||||
// For those who refuse to use CAMI (bro, WTF), routine scan
|
||||
local lastScan = {}
|
||||
timer.Create("gmInte:SyncRoles:PlayerScan", 3, 0, function()
|
||||
for k, v in ipairs(player.GetAll()) do
|
||||
if lastScan[v:SteamID64()] == v:GetUserGroup() then continue end
|
||||
gmInte.playerChangeGroup(v:SteamID64(), lastScan[v:SteamID64()], v:GetUserGroup())
|
||||
lastScan[v:SteamID64()] = v:GetUserGroup()
|
||||
end
|
||||
end)
|
54
lua/gmod_integration/server/sv_sync_warn.lua
Normal file
54
lua/gmod_integration/server/sv_sync_warn.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
function gmInte.playerWarn(ply, admin, reason)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. ply:SteamID64() .. "/warns", {
|
||||
["player"] = gmInte.getPlayerFormat(ply),
|
||||
["admin"] = gmInte.getPlayerFormat(admin),
|
||||
["reason"] = reason,
|
||||
["date"] = os.time()
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.playerWarnID(plySteamID64, adminSteamID64, reason)
|
||||
gmInte.http.post("/servers/:serverID/players/" .. plySteamID64 .. "/warns", {
|
||||
["adminSteamID64"] = adminSteamID64,
|
||||
["reason"] = reason,
|
||||
["date"] = os.time()
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.serverExportWarns(data)
|
||||
gmInte.http.post("/servers/:serverID/warns", {
|
||||
["warns"] = data
|
||||
})
|
||||
end
|
||||
|
||||
if AWarn then
|
||||
hook.Add("AWarnPlayerWarned", "AWarn3WarningDiscordRelay", function(pl, aID, reason)
|
||||
local admin = AWarn:GetPlayerFromID64(aID)
|
||||
if !admin then return end
|
||||
gmInte.playerWarn(pl, admin, reason)
|
||||
end)
|
||||
|
||||
hook.Add("AWarnPlayerIDWarned", "AWarn3IDWarningDiscordRelay", function(pID, aID, reason)
|
||||
local admin = AWarn:GetPlayerFromID64(aID)
|
||||
if !admin then return end
|
||||
gmInte.playerWarnID(pID, aID, reason)
|
||||
end)
|
||||
|
||||
hook.Add("GmodIntegration:ExportWarns", "AWarn3ExportWarns", function()
|
||||
local query = "SELECT * FROM awarn3_warningtable"
|
||||
AWarn3_MySQLite.query(query, function(result)
|
||||
if !result then return end
|
||||
local warns = {}
|
||||
for k, v in ipairs(result) do
|
||||
table.insert(warns, {
|
||||
playerSteamID64 = v.PlayerID,
|
||||
adminSteamID64 = v.AdminID,
|
||||
reason = v.WarningReason,
|
||||
date = v.WarningDate
|
||||
})
|
||||
end
|
||||
|
||||
gmInte.serverExportWarns(warns)
|
||||
end, function(err) gmInte.logError("AWarn3", "Failed to export warns: " .. err) end)
|
||||
end)
|
||||
end
|
41
lua/gmod_integration/server/sv_tokens.lua
Normal file
41
lua/gmod_integration/server/sv_tokens.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
gmInte.serverPublicToken = gmInte.serverPublicToken || nil
|
||||
function gmInte.getPublicServerToken(callback)
|
||||
if gmInte.serverPublicToken then
|
||||
if callback then callback(gmInte.serverPublicToken) end
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.http.get("/servers/:serverID/public-token", function(code, data)
|
||||
gmInte.serverPublicToken = data.publicTempToken
|
||||
callback(data.publicTempToken)
|
||||
end)
|
||||
end
|
||||
|
||||
gmInte.serverPlayerTempTokens = gmInte.serverPlayerTempTokens || {}
|
||||
function gmInte.getPlayerTempToken(ply, callback)
|
||||
if gmInte.serverPlayerTempTokens[ply:SteamID64()] && gmInte.serverPlayerTempTokens[ply:SteamID64()].userID == ply:UserID() then
|
||||
if callback then callback(gmInte.serverPlayerTempTokens[ply:SteamID64()].token) end
|
||||
return
|
||||
end
|
||||
|
||||
gmInte.getPublicServerToken(function(publicToken)
|
||||
local token = util.SHA256(ply:SteamID64() .. "-" .. publicToken .. "-" .. gmInte.config.token .. "-" .. ply:UserID()) .. " " .. ply:UserID()
|
||||
gmInte.serverPlayerTempTokens[ply:SteamID64()] = {
|
||||
token = token,
|
||||
userID = ply:UserID()
|
||||
}
|
||||
|
||||
callback(token)
|
||||
end)
|
||||
end
|
||||
|
||||
function gmInte.sendPlayerToken(ply)
|
||||
gmInte.getPlayerTempToken(ply, function(token)
|
||||
gmInte.SendNet("savePlayerToken", {
|
||||
token = token,
|
||||
}, ply)
|
||||
end)
|
||||
end
|
||||
|
||||
hook.Add("gmInte:PlayerReady", "gmInte:Verif:PlayerReady", function(ply) gmInte.sendPlayerToken(ply) end)
|
||||
hook.Add("Initialize", "gmInte:Server:Initialize:GetPublicToken", function() timer.Simple(1, function() gmInte.getPublicServerToken(function(publicToken) gmInte.log("Server Public Token Received: " .. publicToken) end) end) end)
|
105
lua/gmod_integration/shared/languages/sh_de.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_de.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Verifizierung Erforderlich",
|
||||
["verification.open_page"] = "Verifizierungsseite Öffnen",
|
||||
["verification.description"] = "Hey,\nEs scheint, dass du dein Steam-Konto noch nicht mit Discord verknüpft hast. Dies ist erforderlich, um auf diesem Server zu spielen. Klicke auf die Schaltfläche unten, um dein Konto zu verknüpfen.\n\nNachdem du das getan hast, klicke auf die Aktualisierungsschaltfläche.",
|
||||
["verification.refresh"] = "Verifizierung Aktualisieren",
|
||||
["verification.success"] = "Du bist verifiziert",
|
||||
["verification.fail"] = "Verifizierung fehlgeschlagen",
|
||||
["verification.link_require"] = "Dieser Server erfordert, dass du dein Discord-Konto verknüpfst, um zu spielen",
|
||||
["admin.restart_required"] = "Neustart Erforderlich",
|
||||
["admin.restart_required_description"] = "Einige Änderungen erfordern einen Neustart, um angewendet zu werden.\nJetzt neu starten?",
|
||||
["admin.restart"] = "Neustart",
|
||||
["admin.maybe_later"] = "Vielleicht Später",
|
||||
["admin.authentication"] = "Authentifizierung",
|
||||
["admin.main"] = "Haupt",
|
||||
["admin.trust_safety"] = "Vertrauen & Sicherheit",
|
||||
["admin.advanced"] = "Erweitert",
|
||||
["admin.server_id"] = "Server ID",
|
||||
["admin.server_id_description"] = "Server ID im Webpanel gefunden.",
|
||||
["admin.link.open_webpanel"] = "Webpanel Öffnen",
|
||||
["admin.link.test_connection"] = "Verbindung Testen",
|
||||
["admin.link.buy_premium"] = "Premium Kaufen",
|
||||
["admin.link.install_websocket"] = "Websocket Installieren",
|
||||
["admin.websocket_required"] = "\n\nDiese Funktion erfordert eine Websocket-Verbindung, um korrekt zu funktionieren.",
|
||||
["admin.feature_soon"] = "\n\nDiese Funktion wird bald verfügbar sein.",
|
||||
["admin.enabled"] = "Aktiviert",
|
||||
["admin.disabled"] = "Deaktiviert",
|
||||
["admin.click_to_show"] = "*** Klicken zum Anzeigen ***",
|
||||
["admin.server_id_description2"] = "Hier kannst du deine Servereinstellungen konfigurieren.\nServer ID und Token sind im Webpanel in den Servereinstellungen verfügbar.\nDie Dokumentation ist verfügbar unter {1}\nWenn du Hilfe benötigst, kontaktiere uns bitte über unseren Discord-Server.",
|
||||
["admin.server_config"] = "Server Konfiguration",
|
||||
["admin.server_token"] = "Server Token",
|
||||
["admin.server_token_description"] = "Server Token im Webpanel gefunden.",
|
||||
["admin.filter_on_ban"] = "Discord Gebannte Spieler Blockieren",
|
||||
["admin.filter_on_ban_description"] = "Blockiere Spieler, die auf dem Discord-Server gebannt sind.",
|
||||
["admin.force_player_link"] = "Spielerverifizierung Erzwingen",
|
||||
["admin.force_player_link_description"] = "Spielerverifizierung erzwingen.",
|
||||
["admin.language"] = "Sprache",
|
||||
["admin.language_description"] = "Sprache, die in der Benutzeroberfläche verwendet wird.",
|
||||
["admin.maintenance"] = "Wartung",
|
||||
["admin.maintenance_description"] = "Aktiviere oder deaktiviere den Wartungsmodus.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN, der für die API-Verbindung verwendet wird.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN, der für die Websocket-Verbindung verwendet wird.",
|
||||
["admin.debug"] = "Debug",
|
||||
["admin.debug_description"] = "Aktiviere oder deaktiviere den Debugmodus.",
|
||||
["context_menu.screen_capture"] = "Schließe das Kontextmenü, um den Screenshot zu machen, der an Discord gesendet wird.",
|
||||
["report_bug.title"] = "Einen Fehler Melden",
|
||||
["report_bug.description"] = "Melde einen Fehler an die Entwickler dieses Spiels.",
|
||||
["report_bug.submit"] = "Fehlerbericht Senden",
|
||||
["report_bug.cancel"] = "Abbrechen",
|
||||
["report_bug.screenshot"] = "Screenshot",
|
||||
["report_bug.description"] = "Beschreibung",
|
||||
["report_bug.importance_level"] = "Wichtigkeitsgrad",
|
||||
["report_bug.importance_level.dsc"] = "Wie wichtig ist dieser Fehler?",
|
||||
["report_bug.importance_level.critical"] = "Kritisch - Absturz oder macht das Spiel unspielbar.",
|
||||
["report_bug.importance_level.high"] = "Hoch - Kritische Funktionalität ist unbrauchbar.",
|
||||
["report_bug.importance_level.medium"] = "Mittel - Wichtige Funktionalität ist unbrauchbar.",
|
||||
["report_bug.importance_level.low"] = "Niedrig - Kosmetisches Problem.",
|
||||
["report_bug.importance_level.trivial"] = "Trivial - Sehr kleines Problem.",
|
||||
["report_bug.steps_to_reproduce"] = "Schritte zur Reproduktion",
|
||||
["report_bug.expected_result"] = "Erwartetes Ergebnis",
|
||||
["report_bug.actual_result"] = "Tatsächliches Ergebnis",
|
||||
["report_bug.actual_result.dsc"] = "Was ist tatsächlich passiert?",
|
||||
["report_bug.expected_result.dsc"] = "Was hast du erwartet, dass passieren würde?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Bitte gib eine Schritt-für-Schritt-Anleitung, wie der Fehler reproduziert werden kann.",
|
||||
["report_bug.description.dsc"] = "Bitte gib so viele Informationen wie möglich, um uns zu helfen, das Problem zu lösen.",
|
||||
["report_bug.error.missing_fields"] = "Bitte fülle alle erforderlichen Felder aus, bevor du den Fehlerbericht sendest.",
|
||||
["report_bug.success"] = "Fehlerbericht erfolgreich gesendet",
|
||||
["report_bug.error.failed"] = "Fehlerbericht senden fehlgeschlagen, bitte versuche es später erneut.",
|
||||
["chat.missing_permissions"] = "Du hast keine Berechtigung, diese Aktion auszuführen.",
|
||||
["chat.authentication_success"] = "Erfolgreich authentifiziert",
|
||||
["chat.authentication_failed"] = "Authentifizierung fehlgeschlagen",
|
||||
["chat.server_link"] = ", Server verknüpft als {1}.",
|
||||
["chat.server_fail"] = ", überprüfe deine ID und Token.",
|
||||
["chat.error.screenshot_failed"] = "Screenshot erstellen fehlgeschlagen, dein System unterstützt diese Funktion möglicherweise nicht.",
|
||||
["chat.screenshot.sent"] = "Screenshot an Discord gesendet.",
|
||||
["report_bug.description.full"] = "Hey, du bist dabei, einen Fehler an die Besitzer dieses Servers zu melden.\nBitte gib so viele Informationen wie möglich, um uns zu helfen, das Problem zu lösen.\nDanke, dass du uns hilfst, den Server zu verbessern.\n\nWenn du ein Problem mit Gmod Integration hast, benutze bitte unseren Discord-Server.",
|
||||
["report_bug.context_menu.screen_capture"] = "Schließe das Kontextmenü, um den Screenshot zu machen, den du im Fehlerbericht verwenden möchtest.",
|
||||
["filter.ds.1"] = "Du kannst nicht auf diesen Server kommen",
|
||||
["filter.ds.2"] = "Grund: {1}",
|
||||
["filter.none"] = "keine",
|
||||
["filter.ds.3"] = "Hilfe-URL: {1}",
|
||||
["filter.ds.4"] = "Einen schönen Tag noch",
|
||||
["filter.ds.5"] = "Service bereitgestellt von Gmod Integration",
|
||||
["filter.maintenance"] = "Der Server befindet sich derzeit in Wartung und du stehst nicht auf der Whitelist.",
|
||||
["filter.ban"] = "Du bist von diesem Server gebannt.",
|
||||
["filter.discord_ban"] = "Du bist von unserem Discord-Server gebannt.",
|
||||
["branch.title"] = "Falscher Branch",
|
||||
["branch.description"] = "Hey,\nDieser Server erlaubt deine Spielversion '{1}' nicht. Bitte wechsle zu '{2}' im Beta-Tab der Garry's Mod-Eigenschaften.\n\nSteam -> Bibliothek -> Garry's Mod -> Rechtsklick -> Eigenschaften -> Betas -> Wähle '{3}'" .. "\n\nNachdem du das getan hast, beende Garry's Mod und trete dem Server erneut bei.",
|
||||
["branch.watchTutorial"] = "Tutorial ansehen",
|
||||
["admin.verify_on_join"] = "Beim Beitritt verifizieren",
|
||||
["admin.verify_on_join_description"] = "Verifiziere den Spieler, wenn er dem Server beitritt oder wenn der Spieler bereit ist.",
|
||||
["admin.verify_on_ready_kick_time"] = "Kick-Zeit, wenn nicht verifiziert",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Zeit in Sekunden, bevor ein nicht verifizierter Spieler gekickt wird.",
|
||||
["admin.client_force_branch"] = "Client-Zweig erzwingen",
|
||||
["admin.client_force_branch_description"] = "Der Zweig des Addons, den die Clients verwenden sollen.",
|
||||
["filter.link"] = "Du musst dein Discord-Konto verknüpfen, bevor du beitreten kannst. Verifiziere dein Konto auf {1}",
|
||||
["verification.kick_in"] = "Wenn du dich nicht innerhalb von {1} Sekunden verifizierst, wirst du gekickt",
|
||||
["verification.kick"] = "Du wurdest gekickt, weil du dich nicht verifiziert hast. Verifiziere dein Konto auf {1}",
|
||||
["verification.kick_in_branch"] = "Wenn du deinen Branch nicht innerhalb von {1} Sekunden änderst, wirst du gekickt",
|
||||
["verification.kick_branch"] = "Du wurdest gekickt, weil du deinen Branch nicht auf {1} geändert hast",
|
||||
["verification.family_sharing"] = "Dieser Server erlaubt kein Family Sharing",
|
||||
["verification.verifyFamilySharing"] = "Family Sharing blockieren",
|
||||
["verification.verifyFamilySharing_description"] = "Blockiere Spieler, die Family Sharing verwenden."
|
||||
}
|
106
lua/gmod_integration/shared/languages/sh_en.lua
Normal file
106
lua/gmod_integration/shared/languages/sh_en.lua
Normal file
|
@ -0,0 +1,106 @@
|
|||
return {
|
||||
["chat.error.rate_limit"] = "This interaction is being rate limited, please try again later.",
|
||||
["verification.title"] = "Verification Required",
|
||||
["verification.open_page"] = "Open Verification Page",
|
||||
["verification.description"] = "Hey,\nIt looks like you haven't linked your Steam account to Discord yet. This is required to play on this server. Please click the button below to link your account.\n\nAfter you've done that, click the refresh button.",
|
||||
["verification.refresh"] = "Refresh Verification",
|
||||
["verification.success"] = "You have been verified",
|
||||
["verification.fail"] = "Failed to verify you",
|
||||
["verification.link_require"] = "This server requires you to link your Discord account to play",
|
||||
["admin.restart_required"] = "Restart Required",
|
||||
["admin.restart_required_description"] = "Some changes require a restart to be applied.\nRestart now ?",
|
||||
["admin.restart"] = "Restart",
|
||||
["admin.maybe_later"] = "Maybe Later",
|
||||
["admin.authentication"] = "Authentication",
|
||||
["admin.main"] = "Main",
|
||||
["admin.trust_safety"] = "Trust & Safety",
|
||||
["admin.advanced"] = "Advanced",
|
||||
["admin.server_id"] = "Server ID",
|
||||
["admin.server_id_description"] = "Server ID found on the webpanel.",
|
||||
["admin.link.open_webpanel"] = "Open Webpanel",
|
||||
["admin.link.test_connection"] = "Test Connection",
|
||||
["admin.link.buy_premium"] = "Buy Premium",
|
||||
["admin.link.install_websocket"] = "Install Websocket",
|
||||
["admin.websocket_required"] = "\n\nThis feature require a websocket connection to work properly.",
|
||||
["admin.feature_soon"] = "\n\nThis feature will be available soon.",
|
||||
["admin.enabled"] = "Enabled",
|
||||
["admin.disabled"] = "Disabled",
|
||||
["admin.click_to_show"] = "*** Click to show ***",
|
||||
["admin.server_id_description2"] = "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.",
|
||||
["admin.server_config"] = "Server Config",
|
||||
["admin.server_token"] = "Server Token",
|
||||
["admin.server_token_description"] = "Server Token foundforce_player_link on the webpanel.",
|
||||
["admin.filter_on_ban"] = "Block Discord Ban Player",
|
||||
["admin.filter_on_ban_description"] = "Block players banned on the discord server.",
|
||||
["admin.force_player_link"] = "Force Player Verif",
|
||||
["admin.force_player_link_description"] = "Force player verification.",
|
||||
["admin.language"] = "Language",
|
||||
["admin.language_description"] = "Language used in the interface.",
|
||||
["admin.maintenance"] = "Maintenance",
|
||||
["admin.maintenance_description"] = "Activate or deactivate maintenance mode.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN that will be used for the API connection.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN that will be used for the Websocket connection.",
|
||||
["admin.debug"] = "Debug",
|
||||
["admin.debug_description"] = "Activate or deactivate debug mode.",
|
||||
["context_menu.screen_capture"] = "Close the context menu to take the screenshot that will be send to Discord.",
|
||||
["report_bug.title"] = "Report a bug",
|
||||
["report_bug.description"] = "Report a bug to the developers of this game.",
|
||||
["report_bug.submit"] = "Submit Bug Report",
|
||||
["report_bug.cancel"] = "Cancel",
|
||||
["report_bug.screenshot"] = "Screenshot",
|
||||
["report_bug.description"] = "Description",
|
||||
["report_bug.importance_level"] = "Importance Level",
|
||||
["report_bug.importance_level.dsc"] = "How important is this bug?",
|
||||
["report_bug.importance_level.critical"] = "Critical - Crash or made the game unplayable.",
|
||||
["report_bug.importance_level.high"] = "High - Critical functionality is unusable.",
|
||||
["report_bug.importance_level.medium"] = "Medium - Important functionality is unusable.",
|
||||
["report_bug.importance_level.low"] = "Low - Cosmetic issue.",
|
||||
["report_bug.importance_level.trivial"] = "Trivial - Very minor issue.",
|
||||
["report_bug.steps_to_reproduce"] = "Steps to Reproduce",
|
||||
["report_bug.expected_result"] = "Expected result",
|
||||
["report_bug.actual_result"] = "Actual result",
|
||||
["report_bug.actual_result.dsc"] = "What actually happened?",
|
||||
["report_bug.expected_result.dsc"] = "What did you expect to happen?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Please provide a step-by-step guide on how to reproduce the bug.",
|
||||
["report_bug.description.dsc"] = "Please provide as much information as possible to help us fix the issue.",
|
||||
["report_bug.error.missing_fields"] = "Before submitting the bug report, please fill in all the required fields.",
|
||||
["report_bug.success"] = "Bug report sent successfully",
|
||||
["report_bug.error.failed"] = "Failed to send bug report, please try again later.",
|
||||
["chat.missing_permissions"] = "You do not have permission to do this action.",
|
||||
["chat.authentication_success"] = "Successfully Authenticated",
|
||||
["chat.authentication_failed"] = "Failed to Authenticate",
|
||||
["chat.server_link"] = ", server linked as {1}.",
|
||||
["chat.server_fail"] = ", check your ID and Token.",
|
||||
["chat.error.screenshot_failed"] = "Failed to take screenshot, your system may not support this feature.",
|
||||
["chat.screenshot.sent"] = "Screenshot sent to Discord.",
|
||||
["report_bug.description.full"] = "Hey, your about to report a bug to the owners of this server.\nPlease provide as much information as possible to help us fix the issue.\nThank you for helping us improve the server.\n\nIf you have a issue with Gmod Integration, please use our discord server.",
|
||||
["report_bug.context_menu.screen_capture"] = "Close the context menu to take the screenshot to use in the bug report.",
|
||||
["filter.ds.1"] = "You cannot join this server",
|
||||
["filter.ds.2"] = "Reason: {1}",
|
||||
["filter.none"] = "none",
|
||||
["filter.ds.3"] = "Help URL: {1}",
|
||||
["filter.ds.4"] = "Have a nice day",
|
||||
["filter.ds.5"] = "Service provided by Gmod Integration",
|
||||
["filter.maintenance"] = "The server is currently under maintenance and you are not whitelisted.",
|
||||
["filter.ban"] = "You are banned from this server.",
|
||||
["filter.discord_ban"] = "You are banned from our discord server.",
|
||||
["branch.title"] = "Wrong Branch",
|
||||
["branch.description"] = "Hey,\nThis server doesn't not allow your game version '{1}' to join. Please switch to '{2}' in the beta tab of Garry's Mod properties.\n\nSteam -> Library -> Garry's Mod -> Right Click -> Properties -> Betas -> Select '{3}'" .. "\n\nAfter you've done that, exit Garry's Mod and rejoin the server.",
|
||||
["branch.watchTutorial"] = "Watch Tutorial",
|
||||
["admin.verify_on_join"] = "Verify on Join",
|
||||
["admin.verify_on_join_description"] = "Verify the player when they join the server or on player ready.",
|
||||
["admin.verify_on_ready_kick_time"] = "Kick Time if not Verified",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Time in seconds before kicking a player that is not verified.",
|
||||
["admin.client_force_branch"] = "Client Force Branch",
|
||||
["admin.client_force_branch_description"] = "The branch of the addon that the clients should use.",
|
||||
["filter.link"] = "You need to link your discord account before joining, verify your account on {1}",
|
||||
["verification.kick_in"] = "If you don't verify in {1} seconds you will be kicked",
|
||||
["verification.kick"] = "You have been kicked for not verifying, verify your account on {1}",
|
||||
["verification.kick_in_branch"] = "If you don't change your branch in {1} seconds you will be kicked",
|
||||
["verification.kick_branch"] = "You have been kicked for not changing your branch to {1}",
|
||||
["verification.family_sharing"] = "This server does not allow family sharing",
|
||||
["verification.verifyFamilySharing"] = "Block Family Sharing",
|
||||
["verification.family_shariverifyFamilySharing_descriptionng"] = "Block family sharing players."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_es.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_es.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Verificación Requerida",
|
||||
["verification.open_page"] = "Abrir Página de Verificación",
|
||||
["verification.description"] = "Hola,\nParece que aún no has vinculado tu cuenta de Steam a Discord. Esto es necesario para jugar en este servidor. Haz clic en el botón de abajo para vincular tu cuenta.\n\nDespués de hacer eso, haz clic en el botón de actualización.",
|
||||
["verification.refresh"] = "Actualizar Verificación",
|
||||
["verification.success"] = "Has sido verificado",
|
||||
["verification.fail"] = "No se pudo verificar",
|
||||
["verification.link_require"] = "Este servidor requiere que vincules tu cuenta de Discord para jugar",
|
||||
["admin.restart_required"] = "Reinicio Requerido",
|
||||
["admin.restart_required_description"] = "Algunos cambios requieren reiniciar para aplicarse.\n¿Reiniciar ahora?",
|
||||
["admin.restart"] = "Reiniciar",
|
||||
["admin.maybe_later"] = "Quizás Más Tarde",
|
||||
["admin.authentication"] = "Autenticación",
|
||||
["admin.main"] = "Principal",
|
||||
["admin.trust_safety"] = "Confianza y Seguridad",
|
||||
["admin.advanced"] = "Avanzado",
|
||||
["admin.server_id"] = "ID del Servidor",
|
||||
["admin.server_id_description"] = "ID del servidor encontrado en el panel web.",
|
||||
["admin.link.open_webpanel"] = "Abrir Panel Web",
|
||||
["admin.link.test_connection"] = "Probar Conexión",
|
||||
["admin.link.buy_premium"] = "Comprar Premium",
|
||||
["admin.link.install_websocket"] = "Instalar Websocket",
|
||||
["admin.websocket_required"] = "\n\nEsta función requiere una conexión de websocket para funcionar correctamente.",
|
||||
["admin.feature_soon"] = "\n\nEsta función estará disponible pronto.",
|
||||
["admin.enabled"] = "Habilitado",
|
||||
["admin.disabled"] = "Deshabilitado",
|
||||
["admin.click_to_show"] = "*** Haz clic para mostrar ***",
|
||||
["admin.server_id_description2"] = "Aquí puedes configurar los ajustes de tu servidor.\nEl ID del servidor y el Token están disponibles en el panel web en los ajustes del servidor.\nLa documentación está disponible en {1}\nSi necesitas ayuda, por favor contáctanos en nuestro servidor de Discord.",
|
||||
["admin.server_config"] = "Configuración del Servidor",
|
||||
["admin.server_token"] = "Token del Servidor",
|
||||
["admin.server_token_description"] = "Token del servidor encontrado en el panel web.",
|
||||
["admin.filter_on_ban"] = "Bloquear Jugador Baneado de Discord",
|
||||
["admin.filter_on_ban_description"] = "Bloquear jugadores baneados en el servidor de Discord.",
|
||||
["admin.force_player_link"] = "Forzar Verificación de Jugador",
|
||||
["admin.force_player_link_description"] = "Forzar verificación de jugadores.",
|
||||
["admin.language"] = "Idioma",
|
||||
["admin.language_description"] = "Idioma utilizado en la interfaz.",
|
||||
["admin.maintenance"] = "Mantenimiento",
|
||||
["admin.maintenance_description"] = "Activar o desactivar el modo de mantenimiento.",
|
||||
["admin.api_fqdn"] = "FQDN de la API",
|
||||
["admin.api_fqdn_description"] = "FQDN de la API que se utilizará para la conexión de la API.",
|
||||
["admin.websocket_fqdn"] = "FQDN de Websocket",
|
||||
["admin.websocket_fqdn_description"] = "FQDN de Websocket que se utilizará para la conexión de Websocket.",
|
||||
["admin.debug"] = "Depuración",
|
||||
["admin.debug_description"] = "Activar o desactivar el modo de depuración.",
|
||||
["context_menu.screen_capture"] = "Cierra el menú contextual para tomar la captura de pantalla que se enviará a Discord.",
|
||||
["report_bug.title"] = "Informar un Error",
|
||||
["report_bug.description"] = "Informa un error a los desarrolladores de este juego.",
|
||||
["report_bug.submit"] = "Enviar Informe de Error",
|
||||
["report_bug.cancel"] = "Cancelar",
|
||||
["report_bug.screenshot"] = "Captura de Pantalla",
|
||||
["report_bug.description"] = "Descripción",
|
||||
["report_bug.importance_level"] = "Nivel de Importancia",
|
||||
["report_bug.importance_level.dsc"] = "¿Qué tan importante es este error?",
|
||||
["report_bug.importance_level.critical"] = "Crítico - Causa un bloqueo o hace que el juego sea inutilizable.",
|
||||
["report_bug.importance_level.high"] = "Alto - La funcionalidad crítica no se puede utilizar.",
|
||||
["report_bug.importance_level.medium"] = "Medio - La funcionalidad importante no se puede utilizar.",
|
||||
["report_bug.importance_level.low"] = "Bajo - Problema cosmético.",
|
||||
["report_bug.importance_level.trivial"] = "Trivial - Problema muy menor.",
|
||||
["report_bug.steps_to_reproduce"] = "Pasos para Reproducir",
|
||||
["report_bug.expected_result"] = "Resultado Esperado",
|
||||
["report_bug.actual_result"] = "Resultado Actual",
|
||||
["report_bug.actual_result.dsc"] = "¿Qué sucedió realmente?",
|
||||
["report_bug.expected_result.dsc"] = "¿Qué esperabas que sucediera?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Proporciona una guía paso a paso sobre cómo reproducir el error.",
|
||||
["report_bug.description.dsc"] = "Proporciona la mayor cantidad de información posible para ayudarnos a solucionar el problema.",
|
||||
["report_bug.error.missing_fields"] = "Antes de enviar el informe de error, por favor completa todos los campos requeridos.",
|
||||
["report_bug.success"] = "Informe de error enviado exitosamente",
|
||||
["report_bug.error.failed"] = "Error al enviar el informe de error, por favor intenta nuevamente más tarde.",
|
||||
["chat.missing_permissions"] = "No tienes permiso para realizar esta acción.",
|
||||
["chat.authentication_success"] = "Autenticación Exitosa",
|
||||
["chat.authentication_failed"] = "Error al Autenticar",
|
||||
["chat.server_link"] = ", servidor vinculado como {1}.",
|
||||
["chat.server_fail"] = ", verifica tu ID y Token.",
|
||||
["chat.error.screenshot_failed"] = "Error al tomar la captura de pantalla, es posible que tu sistema no admita esta función.",
|
||||
["chat.screenshot.sent"] = "Captura de pantalla enviada a Discord.",
|
||||
["report_bug.description.full"] = "Hola, estás a punto de informar un error a los propietarios de este servidor.\nPor favor, proporciona la mayor cantidad de información posible para ayudarnos a solucionar el problema.\nGracias por ayudarnos a mejorar el servidor.\n\nSi tienes algún problema con Gmod Integration, por favor utiliza nuestro servidor de Discord.",
|
||||
["report_bug.context_menu.screen_capture"] = "Cierra el menú contextual para tomar la captura de pantalla que se usará en el informe de error.",
|
||||
["filter.ds.1"] = "No puedes unirte a este servidor",
|
||||
["filter.ds.2"] = "Motivo: {1}",
|
||||
["filter.none"] = "ninguno",
|
||||
["filter.ds.3"] = "URL de ayuda: {1}",
|
||||
["filter.ds.4"] = "Que tengas un buen día",
|
||||
["filter.ds.5"] = "Servicio proporcionado por Gmod Integration",
|
||||
["filter.maintenance"] = "El servidor está actualmente en mantenimiento y no estás en la lista blanca.",
|
||||
["filter.ban"] = "Estás baneado de este servidor.",
|
||||
["filter.discord_ban"] = "Estás baneado de nuestro servidor de Discord.",
|
||||
["branch.title"] = "Rama Incorrecta",
|
||||
["branch.description"] = "Hola,\nEste servidor no permite tu versión del juego '{1}' para unirse. Por favor, cambia a '{2}' en la pestaña beta de las propiedades de Garry's Mod.\n\nSteam -> Biblioteca -> Garry's Mod -> Clic Derecho -> Propiedades -> Betas -> Seleccionar '{3}'" .. "\n\nDespués de hacer eso, cierra Garry's Mod y vuelve a unirte al servidor.",
|
||||
["branch.watchTutorial"] = "Ver Tutorial",
|
||||
["admin.verify_on_join"] = "Verificar al Unirse",
|
||||
["admin.verify_on_join_description"] = "Verificar al jugador cuando se une al servidor o cuando el jugador está listo.",
|
||||
["admin.verify_on_ready_kick_time"] = "Tiempo de Expulsión si no Verificado",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Tiempo en segundos antes de expulsar a un jugador que no está verificado.",
|
||||
["admin.client_force_branch"] = "Forzar Rama del Cliente",
|
||||
["admin.client_force_branch_description"] = "La rama del addon que los clientes deben usar.",
|
||||
["filter.link"] = "Necesitas vincular tu cuenta de Discord antes de unirte, verifica tu cuenta en {1}",
|
||||
["verification.kick_in"] = "Si no verificas en {1} segundos serás expulsado",
|
||||
["verification.kick"] = "Has sido expulsado por no verificar, verifica tu cuenta en {1}",
|
||||
["verification.kick_in_branch"] = "Si no cambias tu rama en {1} segundos serás expulsado",
|
||||
["verification.kick_branch"] = "Has sido expulsado por no cambiar tu rama a {1}",
|
||||
["verification.family_sharing"] = "Este servidor no permite el uso compartido familiar",
|
||||
["verification.verifyFamilySharing"] = "Bloquear Uso Compartido Familiar",
|
||||
["verification.family_sharing_description"] = "Bloquear jugadores que usan el uso compartido familiar."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_fr.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_fr.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Vérification requise",
|
||||
["verification.open_page"] = "Ouvrir la page de vérification",
|
||||
["verification.description"] = "Salut,\nIl semble que vous n'ayez pas encore lié votre compte Steam à Discord. Cela est nécessaire pour jouer sur ce serveur. Veuillez cliquer sur le bouton ci-dessous pour lier votre compte.\n\nAprès avoir fait cela, cliquez sur le bouton de rafraîchissement.",
|
||||
["verification.refresh"] = "Rafraîchir la vérification",
|
||||
["verification.success"] = "Vous avez été vérifié",
|
||||
["verification.fail"] = "Échec de la vérification",
|
||||
["verification.link_require"] = "Ce serveur nécessite que vous liiez votre compte Discord pour jouer",
|
||||
["admin.restart_required"] = "Redémarrage requis",
|
||||
["admin.restart_required_description"] = "Certaines modifications nécessitent un redémarrage pour être appliquées.\nRedémarrer maintenant ?",
|
||||
["admin.restart"] = "Redémarrer",
|
||||
["admin.maybe_later"] = "Peut-être plus tard",
|
||||
["admin.authentication"] = "Authentification",
|
||||
["admin.main"] = "Principal",
|
||||
["admin.trust_safety"] = "Confiance et sécurité",
|
||||
["admin.advanced"] = "Avancé",
|
||||
["admin.server_id"] = "ID du serveur",
|
||||
["admin.server_id_description"] = "ID du serveur trouvé sur le panneau web.",
|
||||
["admin.link.open_webpanel"] = "Ouvrir le panneau web",
|
||||
["admin.link.test_connection"] = "Tester la connexion",
|
||||
["admin.link.buy_premium"] = "Acheter Premium",
|
||||
["admin.link.install_websocket"] = "Installer le websocket",
|
||||
["admin.websocket_required"] = "\n\nCette fonctionnalité nécessite une connexion websocket pour fonctionner correctement.",
|
||||
["admin.feature_soon"] = "\n\nCette fonctionnalité sera bientôt disponible.",
|
||||
["admin.enabled"] = "Activé",
|
||||
["admin.disabled"] = "Désactivé",
|
||||
["admin.click_to_show"] = "*** Cliquez pour afficher ***",
|
||||
["admin.server_id_description2"] = "Ici, vous pouvez configurer les paramètres de votre serveur.\nL'ID du serveur et le jeton sont disponibles sur le panneau web dans les paramètres du serveur.\nLa documentation est disponible sur {1}\nSi vous avez besoin d'aide, veuillez nous contacter sur notre serveur Discord.",
|
||||
["admin.server_config"] = "Configuration du serveur",
|
||||
["admin.server_token"] = "Jeton du serveur",
|
||||
["admin.server_token_description"] = "Jeton du serveur trouvé sur le panneau web.",
|
||||
["admin.filter_on_ban"] = "Bloquer les joueurs bannis sur Discord",
|
||||
["admin.filter_on_ban_description"] = "Bloquer les joueurs bannis sur le serveur Discord.",
|
||||
["admin.force_player_link"] = "Forcer la vérification du joueur",
|
||||
["admin.force_player_link_description"] = "Forcer la vérification du joueur.",
|
||||
["admin.language"] = "Langue",
|
||||
["admin.language_description"] = "Langue utilisée dans l'interface.",
|
||||
["admin.maintenance"] = "Maintenance",
|
||||
["admin.maintenance_description"] = "Activer ou désactiver le mode de maintenance.",
|
||||
["admin.api_fqdn"] = "FQDN de l'API",
|
||||
["admin.api_fqdn_description"] = "FQDN de l'API qui sera utilisé pour la connexion à l'API.",
|
||||
["admin.websocket_fqdn"] = "FQDN du websocket",
|
||||
["admin.websocket_fqdn_description"] = "FQDN du websocket qui sera utilisé pour la connexion au websocket.",
|
||||
["admin.debug"] = "Débogage",
|
||||
["admin.debug_description"] = "Activer ou désactiver le mode de débogage.",
|
||||
["context_menu.screen_capture"] = "Fermez le menu contextuel pour prendre la capture d'écran qui sera envoyée à Discord.",
|
||||
["report_bug.title"] = "Signaler un bug",
|
||||
["report_bug.description"] = "Signaler un bug aux développeurs de ce jeu.",
|
||||
["report_bug.submit"] = "Envoyer le rapport de bug",
|
||||
["report_bug.cancel"] = "Annuler",
|
||||
["report_bug.screenshot"] = "Capture d'écran",
|
||||
["report_bug.description"] = "Description",
|
||||
["report_bug.importance_level"] = "Niveau d'importance",
|
||||
["report_bug.importance_level.dsc"] = "À quel point ce bug est-il important ?",
|
||||
["report_bug.importance_level.critical"] = "Critique - Crash ou rend le jeu injouable.",
|
||||
["report_bug.importance_level.high"] = "Élevé - La fonctionnalité critique est inutilisable.",
|
||||
["report_bug.importance_level.medium"] = "Moyen - La fonctionnalité importante est inutilisable.",
|
||||
["report_bug.importance_level.low"] = "Faible - Problème cosmétique.",
|
||||
["report_bug.importance_level.trivial"] = "Trivial - Problème très mineur.",
|
||||
["report_bug.steps_to_reproduce"] = "Étapes pour reproduire",
|
||||
["report_bug.expected_result"] = "Résultat attendu",
|
||||
["report_bug.actual_result"] = "Résultat réel",
|
||||
["report_bug.actual_result.dsc"] = "Qu'est-ce qui s'est réellement passé ?",
|
||||
["report_bug.expected_result.dsc"] = "Qu'attendiez-vous qu'il se passe ?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Veuillez fournir un guide étape par étape sur la façon de reproduire le bug.",
|
||||
["report_bug.description.dsc"] = "Veuillez fournir autant d'informations que possible pour nous aider à résoudre le problème.",
|
||||
["report_bug.error.missing_fields"] = "Avant de soumettre le rapport de bug, veuillez remplir tous les champs obligatoires.",
|
||||
["report_bug.success"] = "Rapport de bug envoyé avec succès",
|
||||
["report_bug.error.failed"] = "Échec de l'envoi du rapport de bug, veuillez réessayer ultérieurement.",
|
||||
["chat.missing_permissions"] = "Vous n'avez pas la permission de faire cette action.",
|
||||
["chat.authentication_success"] = "Authentification réussie",
|
||||
["chat.authentication_failed"] = "Échec de l'authentification",
|
||||
["chat.server_link"] = ", serveur lié en tant que {1}.",
|
||||
["chat.server_fail"] = ", vérifiez votre ID et votre jeton.",
|
||||
["chat.error.screenshot_failed"] = "Impossible de prendre une capture d'écran, votre système ne prend peut-être pas en charge cette fonctionnalité.",
|
||||
["chat.screenshot.sent"] = "Capture d'écran envoyée à Discord.",
|
||||
["report_bug.description.full"] = "Salut, vous êtes sur le point de signaler un bug aux propriétaires de ce serveur.\nVeuillez fournir autant d'informations que possible pour nous aider à résoudre le problème.\nMerci de nous aider à améliorer le serveur.\n\nSi vous avez un problème avec Gmod Integration, veuillez utiliser notre serveur Discord.",
|
||||
["report_bug.context_menu.screen_capture"] = "Fermez le menu contextuel pour prendre la capture d'écran à utiliser dans le rapport de bug.",
|
||||
["filter.ds.1"] = "Vous ne pouvez pas rejoindre ce serveur",
|
||||
["filter.ds.2"] = "Raison : {1}",
|
||||
["filter.none"] = "aucun",
|
||||
["filter.ds.3"] = "URL d'aide : {1}",
|
||||
["filter.ds.4"] = "Bonne journée",
|
||||
["filter.ds.5"] = "Service fourni par Gmod Integration",
|
||||
["filter.maintenance"] = "Le serveur est actuellement en maintenance et vous n'êtes pas sur la liste blanche.",
|
||||
["filter.ban"] = "Vous êtes banni de ce serveur.",
|
||||
["filter.discord_ban"] = "Vous êtes banni de notre serveur Discord.",
|
||||
["branch.title"] = "Mauvaise Branche",
|
||||
["branch.description"] = "Salut,\nCe serveur n'autorise pas votre version du jeu '{1}' à se connecter. Veuillez passer à '{2}' dans l'onglet bêta des propriétés de Garry's Mod.\n\nSteam -> Bibliothèque -> Garry's Mod -> Clic droit -> Propriétés -> Bêtas -> Sélectionnez '{3}'" .. "\n\nAprès avoir fait cela, quittez Garry's Mod et rejoignez le serveur.",
|
||||
["branch.watchTutorial"] = "Regarder le tutoriel",
|
||||
["admin.verify_on_join"] = "Vérifier à la connexion",
|
||||
["admin.verify_on_join_description"] = "Vérifier le joueur lorsqu'il rejoint le serveur ou lorsqu'il est prêt.",
|
||||
["admin.verify_on_ready_kick_time"] = "Temps avant expulsion si non vérifié",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Temps en secondes avant d'expulser un joueur qui n'est pas vérifié.",
|
||||
["admin.client_force_branch"] = "Forcer la branche du client",
|
||||
["admin.client_force_branch_description"] = "La branche de l'addon que les clients doivent utiliser.",
|
||||
["filter.link"] = "Vous devez lier votre compte Discord avant de rejoindre, vérifiez votre compte sur {1}",
|
||||
["verification.kick_in"] = "Si vous ne vérifiez pas dans {1} secondes, vous serez expulsé",
|
||||
["verification.kick"] = "Vous avez été expulsé pour ne pas avoir vérifié, vérifiez votre compte sur {1}",
|
||||
["verification.kick_in_branch"] = "Si vous ne changez pas de branche dans {1} secondes, vous serez expulsé",
|
||||
["verification.kick_branch"] = "Vous avez été expulsé pour ne pas avoir changé votre branche en {1}",
|
||||
["verification.family_sharing"] = "Ce serveur n'autorise pas le partage familial",
|
||||
["verification.verifyFamilySharing"] = "Bloquer le partage familial",
|
||||
["verification.verifyFamilySharing_description"] = "Bloquer les joueurs utilisant le partage familial."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_it.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_it.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Verifica Richiesta",
|
||||
["verification.open_page"] = "Apri Pagina di Verifica",
|
||||
["verification.description"] = "Ciao,\nSembra che tu non abbia ancora collegato il tuo account Steam a Discord. Questo è necessario per giocare su questo server. Fai clic sul pulsante di seguito per collegare il tuo account.\n\nDopo averlo fatto, clicca sul pulsante di aggiornamento.",
|
||||
["verification.refresh"] = "Aggiorna Verifica",
|
||||
["verification.success"] = "Sei stato verificato",
|
||||
["verification.fail"] = "Impossibile verificarti",
|
||||
["verification.link_require"] = "Questo server richiede di collegare il tuo account Discord per giocare",
|
||||
["admin.restart_required"] = "Riavvio Richiesto",
|
||||
["admin.restart_required_description"] = "Alcune modifiche richiedono un riavvio per essere applicate.\nRiavviare adesso?",
|
||||
["admin.restart"] = "Riavvia",
|
||||
["admin.maybe_later"] = "Forse Dopo",
|
||||
["admin.authentication"] = "Autenticazione",
|
||||
["admin.main"] = "Principale",
|
||||
["admin.trust_safety"] = "Affidabilità e Sicurezza",
|
||||
["admin.advanced"] = "Avanzate",
|
||||
["admin.server_id"] = "ID Server",
|
||||
["admin.server_id_description"] = "ID Server trovato sul pannello web.",
|
||||
["admin.link.open_webpanel"] = "Apri Pannello Web",
|
||||
["admin.link.test_connection"] = "Test Connessione",
|
||||
["admin.link.buy_premium"] = "Acquista Premium",
|
||||
["admin.link.install_websocket"] = "Installa Websocket",
|
||||
["admin.websocket_required"] = "\n\nQuesta funzionalità richiede una connessione websocket per funzionare correttamente.",
|
||||
["admin.feature_soon"] = "\n\nQuesta funzionalità sarà presto disponibile.",
|
||||
["admin.enabled"] = "Abilitato",
|
||||
["admin.disabled"] = "Disabilitato",
|
||||
["admin.click_to_show"] = "*** Clicca per mostrare ***",
|
||||
["admin.server_id_description2"] = "Qui puoi configurare le impostazioni del tuo server.\nL'ID Server e il Token sono disponibili sul pannello web nelle impostazioni del server.\nLa documentazione è disponibile su {1}\nSe hai bisogno di aiuto, contattaci sul nostro server Discord.",
|
||||
["admin.server_config"] = "Configurazione Server",
|
||||
["admin.server_token"] = "Token Server",
|
||||
["admin.server_token_description"] = "Token Server trovato sul pannello web.",
|
||||
["admin.filter_on_ban"] = "Blocca Giocatori Bannati su Discord",
|
||||
["admin.filter_on_ban_description"] = "Blocca i giocatori bannati sul server Discord.",
|
||||
["admin.force_player_link"] = "Forza Verifica Giocatore",
|
||||
["admin.force_player_link_description"] = "Forza la verifica del giocatore.",
|
||||
["admin.language"] = "Lingua",
|
||||
["admin.language_description"] = "Lingua utilizzata nell'interfaccia.",
|
||||
["admin.maintenance"] = "Manutenzione",
|
||||
["admin.maintenance_description"] = "Attiva o disattiva la modalità di manutenzione.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN che verrà utilizzato per la connessione API.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN che verrà utilizzato per la connessione Websocket.",
|
||||
["admin.debug"] = "Debug",
|
||||
["admin.debug_description"] = "Attiva o disattiva la modalità di debug.",
|
||||
["context_menu.screen_capture"] = "Chiudi il menu contestuale per fare uno screenshot che verrà inviato a Discord.",
|
||||
["report_bug.title"] = "Segnala un Bug",
|
||||
["report_bug.description"] = "Segnala un bug agli sviluppatori di questo gioco.",
|
||||
["report_bug.submit"] = "Invia Segnalazione Bug",
|
||||
["report_bug.cancel"] = "Annulla",
|
||||
["report_bug.screenshot"] = "Screenshot",
|
||||
["report_bug.description"] = "Descrizione",
|
||||
["report_bug.importance_level"] = "Livello di Importanza",
|
||||
["report_bug.importance_level.dsc"] = "Quanto è importante questo bug?",
|
||||
["report_bug.importance_level.critical"] = "Critico - Crash o rende il gioco inutilizzabile.",
|
||||
["report_bug.importance_level.high"] = "Alto - La funzionalità critica non è utilizzabile.",
|
||||
["report_bug.importance_level.medium"] = "Medio - La funzionalità importante non è utilizzabile.",
|
||||
["report_bug.importance_level.low"] = "Basso - Problema estetico.",
|
||||
["report_bug.importance_level.trivial"] = "Triviale - Problema molto minore.",
|
||||
["report_bug.steps_to_reproduce"] = "Passaggi per Riprodurre",
|
||||
["report_bug.expected_result"] = "Risultato Atteso",
|
||||
["report_bug.actual_result"] = "Risultato Effettivo",
|
||||
["report_bug.actual_result.dsc"] = "Cosa è successo effettivamente?",
|
||||
["report_bug.expected_result.dsc"] = "Cosa ti aspettavi che succedesse?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Fornisci una guida passo-passo su come riprodurre il bug.",
|
||||
["report_bug.description.dsc"] = "Fornisci il maggior numero di informazioni possibile per aiutarci a risolvere il problema.",
|
||||
["report_bug.error.missing_fields"] = "Prima di inviare la segnalazione del bug, compila tutti i campi obbligatori.",
|
||||
["report_bug.success"] = "Segnalazione bug inviata con successo",
|
||||
["report_bug.error.failed"] = "Impossibile inviare la segnalazione del bug, riprova più tardi.",
|
||||
["chat.missing_permissions"] = "Non hai il permesso per eseguire questa azione.",
|
||||
["chat.authentication_success"] = "Autenticazione Riuscita",
|
||||
["chat.authentication_failed"] = "Autenticazione Fallita",
|
||||
["chat.server_link"] = ", server collegato come {1}.",
|
||||
["chat.server_fail"] = ", controlla il tuo ID e Token.",
|
||||
["chat.error.screenshot_failed"] = "Impossibile fare lo screenshot, il tuo sistema potrebbe non supportare questa funzionalità.",
|
||||
["chat.screenshot.sent"] = "Screenshot inviato a Discord.",
|
||||
["report_bug.description.full"] = "Ciao, stai per segnalare un bug ai proprietari di questo server.\nFornisci il maggior numero di informazioni possibile per aiutarci a risolvere il problema.\nGrazie per aiutarci a migliorare il server.\n\nSe hai un problema con Gmod Integration, utilizza il nostro server Discord.",
|
||||
["report_bug.context_menu.screen_capture"] = "Chiudi il menu contestuale per fare lo screenshot da utilizzare nella segnalazione del bug.",
|
||||
["filter.ds.1"] = "Non puoi unirti a questo server",
|
||||
["filter.ds.2"] = "Motivo: {1}",
|
||||
["filter.none"] = "nessuno",
|
||||
["filter.ds.3"] = "URL di aiuto: {1}",
|
||||
["filter.ds.4"] = "Buona giornata",
|
||||
["filter.ds.5"] = "Servizio fornito da Gmod Integration",
|
||||
["filter.maintenance"] = "Il server è attualmente in manutenzione e non sei in whitelist.",
|
||||
["filter.ban"] = "Sei stato bannato da questo server.",
|
||||
["filter.discord_ban"] = "Sei stato bannato dal nostro server Discord.",
|
||||
["branch.title"] = "Branch Errato",
|
||||
["branch.description"] = "Ciao,\nQuesto server non permette la tua versione del gioco '{1}' di unirsi. Per favore, passa a '{2}' nella scheda beta delle proprietà di Garry's Mod.\n\nSteam -> Libreria -> Garry's Mod -> Clic Destro -> Proprietà -> Betas -> Seleziona '{3}'" .. "\n\nDopo averlo fatto, esci da Garry's Mod e rientra nel server.",
|
||||
["branch.watchTutorial"] = "Guarda Tutorial",
|
||||
["admin.verify_on_join"] = "Verifica all'Ingresso",
|
||||
["admin.verify_on_join_description"] = "Verifica il giocatore quando si unisce al server o quando è pronto.",
|
||||
["admin.verify_on_ready_kick_time"] = "Tempo di Kick se non Verificato",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Tempo in secondi prima di espellere un giocatore che non è verificato.",
|
||||
["admin.client_force_branch"] = "Forza Branch Client",
|
||||
["admin.client_force_branch_description"] = "Il branch dell'addon che i client dovrebbero usare.",
|
||||
["filter.link"] = "Devi collegare il tuo account Discord prima di unirti, verifica il tuo account su {1}",
|
||||
["verification.kick_in"] = "Se non verifichi entro {1} secondi sarai espulso",
|
||||
["verification.kick"] = "Sei stato espulso per non aver verificato, verifica il tuo account su {1}",
|
||||
["verification.kick_in_branch"] = "Se non cambi il tuo branch entro {1} secondi sarai espulso",
|
||||
["verification.kick_branch"] = "Sei stato espulso per non aver cambiato il tuo branch a {1}",
|
||||
["verification.family_sharing"] = "Questo server non permette la condivisione familiare",
|
||||
["verification.verifyFamilySharing"] = "Blocca Condivisione Familiare",
|
||||
["verification.verifyFamilySharing_description"] = "Blocca i giocatori che utilizzano la condivisione familiare."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_nl.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_nl.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Verificatie Vereist",
|
||||
["verification.open_page"] = "Open Verificatie Pagina",
|
||||
["verification.description"] = "Hey,\nHet lijkt erop dat je je Steam-account nog niet hebt gekoppeld aan Discord. Dit is vereist om op deze server te spelen. Klik op de onderstaande knop om je account te koppelen.\n\nNadat je dat hebt gedaan, klik je op de vernieuwingsknop.",
|
||||
["verification.refresh"] = "Vernieuw Verificatie",
|
||||
["verification.success"] = "Je bent geverifieerd",
|
||||
["verification.fail"] = "Verificatie mislukt",
|
||||
["verification.link_require"] = "Deze server vereist dat je je Discord-account koppelt om te spelen",
|
||||
["admin.restart_required"] = "Herstart Vereist",
|
||||
["admin.restart_required_description"] = "Sommige wijzigingen vereisen een herstart om toegepast te worden.\nNu herstarten?",
|
||||
["admin.restart"] = "Herstart",
|
||||
["admin.maybe_later"] = "Misschien Later",
|
||||
["admin.authentication"] = "Authenticatie",
|
||||
["admin.main"] = "Hoofd",
|
||||
["admin.trust_safety"] = "Vertrouwen & Veiligheid",
|
||||
["admin.advanced"] = "Geavanceerd",
|
||||
["admin.server_id"] = "Server ID",
|
||||
["admin.server_id_description"] = "Server ID gevonden op het webpaneel.",
|
||||
["admin.link.open_webpanel"] = "Open Webpaneel",
|
||||
["admin.link.test_connection"] = "Test Verbinding",
|
||||
["admin.link.buy_premium"] = "Koop Premium",
|
||||
["admin.link.install_websocket"] = "Installeer Websocket",
|
||||
["admin.websocket_required"] = "\n\nDeze functie vereist een websocket-verbinding om correct te werken.",
|
||||
["admin.feature_soon"] = "\n\nDeze functie zal binnenkort beschikbaar zijn.",
|
||||
["admin.enabled"] = "Ingeschakeld",
|
||||
["admin.disabled"] = "Uitgeschakeld",
|
||||
["admin.click_to_show"] = "*** Klik om te tonen ***",
|
||||
["admin.server_id_description2"] = "Hier kun je je serverinstellingen configureren.\nServer ID en Token zijn beschikbaar op het webpaneel in de serverinstellingen.\nDe documentatie is beschikbaar op {1}\nAls je hulp nodig hebt, neem dan contact met ons op via onze discord-server.",
|
||||
["admin.server_config"] = "Server Configuratie",
|
||||
["admin.server_token"] = "Server Token",
|
||||
["admin.server_token_description"] = "Server Token gevonden op het webpaneel.",
|
||||
["admin.filter_on_ban"] = "Blokkeer Discord Verbannen Speler",
|
||||
["admin.filter_on_ban_description"] = "Blokkeer spelers die verbannen zijn op de Discord-server.",
|
||||
["admin.force_player_link"] = "Forceer Speler Verificatie",
|
||||
["admin.force_player_link_description"] = "Forceer speler verificatie.",
|
||||
["admin.language"] = "Taal",
|
||||
["admin.language_description"] = "Taal die wordt gebruikt in de interface.",
|
||||
["admin.maintenance"] = "Onderhoud",
|
||||
["admin.maintenance_description"] = "Activeer of deactiveer de onderhoudsmodus.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN die zal worden gebruikt voor de API-verbinding.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN die zal worden gebruikt voor de Websocket-verbinding.",
|
||||
["admin.debug"] = "Debug",
|
||||
["admin.debug_description"] = "Activeer of deactiveer de debugmodus.",
|
||||
["context_menu.screen_capture"] = "Sluit het contextmenu om de screenshot te maken die naar Discord wordt verzonden.",
|
||||
["report_bug.title"] = "Rapporteer een bug",
|
||||
["report_bug.description"] = "Rapporteer een bug aan de ontwikkelaars van dit spel.",
|
||||
["report_bug.submit"] = "Verzend Bug Rapport",
|
||||
["report_bug.cancel"] = "Annuleren",
|
||||
["report_bug.screenshot"] = "Screenshot",
|
||||
["report_bug.description"] = "Beschrijving",
|
||||
["report_bug.importance_level"] = "Belangrijkheidsniveau",
|
||||
["report_bug.importance_level.dsc"] = "Hoe belangrijk is deze bug?",
|
||||
["report_bug.importance_level.critical"] = "Kritiek - Crash of maakt het spel onspeelbaar.",
|
||||
["report_bug.importance_level.high"] = "Hoog - Kritieke functionaliteit is onbruikbaar.",
|
||||
["report_bug.importance_level.medium"] = "Gemiddeld - Belangrijke functionaliteit is onbruikbaar.",
|
||||
["report_bug.importance_level.low"] = "Laag - Cosmetisch probleem.",
|
||||
["report_bug.importance_level.trivial"] = "Triviaal - Zeer klein probleem.",
|
||||
["report_bug.steps_to_reproduce"] = "Stappen om te reproduceren",
|
||||
["report_bug.expected_result"] = "Verwacht resultaat",
|
||||
["report_bug.actual_result"] = "Werkelijk resultaat",
|
||||
["report_bug.actual_result.dsc"] = "Wat is er werkelijk gebeurd?",
|
||||
["report_bug.expected_result.dsc"] = "Wat verwachtte je dat er zou gebeuren?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Geef alsjeblieft een stapsgewijze handleiding over hoe je de bug kunt reproduceren.",
|
||||
["report_bug.description.dsc"] = "Geef alsjeblieft zoveel mogelijk informatie om ons te helpen het probleem op te lossen.",
|
||||
["report_bug.error.missing_fields"] = "Vul alle verplichte velden in voordat je het bugrapport indient.",
|
||||
["report_bug.success"] = "Bugrapport succesvol verzonden",
|
||||
["report_bug.error.failed"] = "Het verzenden van het bugrapport is mislukt, probeer het later opnieuw.",
|
||||
["chat.missing_permissions"] = "Je hebt geen toestemming om deze actie uit te voeren.",
|
||||
["chat.authentication_success"] = "Succesvol geauthenticeerd",
|
||||
["chat.authentication_failed"] = "Authenticatie mislukt",
|
||||
["chat.server_link"] = ", server gekoppeld als {1}.",
|
||||
["chat.server_fail"] = ", controleer je ID en Token.",
|
||||
["chat.error.screenshot_failed"] = "Het maken van een screenshot is mislukt, je systeem ondersteunt deze functie mogelijk niet.",
|
||||
["chat.screenshot.sent"] = "Screenshot verzonden naar Discord.",
|
||||
["report_bug.description.full"] = "Hey, je staat op het punt een bug te rapporteren aan de eigenaren van deze server.\nGeef alsjeblieft zoveel mogelijk informatie om ons te helpen het probleem op te lossen.\nBedankt dat je ons helpt de server te verbeteren.\n\nAls je een probleem hebt met Gmod Integration, gebruik dan onze discord-server.",
|
||||
["report_bug.context_menu.screen_capture"] = "Sluit het contextmenu om de screenshot te maken die je wilt gebruiken in het bugrapport.",
|
||||
["filter.ds.1"] = "Je kunt niet op deze server komen",
|
||||
["filter.ds.2"] = "Reden: {1}",
|
||||
["filter.none"] = "geen",
|
||||
["filter.ds.3"] = "Help URL: {1}",
|
||||
["filter.ds.4"] = "Een fijne dag verder",
|
||||
["filter.ds.5"] = "Service geleverd door Gmod Integration",
|
||||
["filter.maintenance"] = "De server is momenteel in onderhoud en je staat niet op de whitelist.",
|
||||
["filter.ban"] = "Je bent verbannen van deze server.",
|
||||
["filter.discord_ban"] = "Je bent verbannen van onze Discord-server.",
|
||||
["branch.title"] = "Falscher Branch",
|
||||
["branch.description"] = "Hey,\nDieser Server erlaubt deine Spielversion '{1}' nicht. Bitte wechsle zu '{2}' im Beta-Tab der Garry's Mod-Eigenschaften.\n\nSteam -> Bibliothek -> Garry's Mod -> Rechtsklick -> Eigenschaften -> Betas -> Wähle '{3}'" .. "\n\nNachdem du das getan hast, beende Garry's Mod und trete dem Server erneut bei.",
|
||||
["branch.watchTutorial"] = "Tutorial ansehen",
|
||||
["admin.verify_on_join"] = "Beim Beitritt verifizieren",
|
||||
["admin.verify_on_join_description"] = "Verifiziere den Spieler, wenn er dem Server beitritt oder wenn der Spieler bereit ist.",
|
||||
["admin.verify_on_ready_kick_time"] = "Kick-Zeit, wenn nicht verifiziert",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Zeit in Sekunden, bevor ein nicht verifizierter Spieler gekickt wird.",
|
||||
["admin.client_force_branch"] = "Client-Zweig erzwingen",
|
||||
["admin.client_force_branch_description"] = "Der Zweig des Addons, den die Clients verwenden sollen.",
|
||||
["filter.link"] = "Du musst dein Discord-Konto verknüpfen, bevor du beitreten kannst. Verifiziere dein Konto auf {1}",
|
||||
["verification.kick_in"] = "Wenn du dich nicht innerhalb von {1} Sekunden verifizierst, wirst du gekickt",
|
||||
["verification.kick"] = "Du wurdest gekickt, weil du dich nicht verifiziert hast. Verifiziere dein Konto auf {1}",
|
||||
["verification.kick_in_branch"] = "Wenn du deinen Branch nicht innerhalb von {1} Sekunden änderst, wirst du gekickt",
|
||||
["verification.kick_branch"] = "Du wurdest gekickt, weil du deinen Branch nicht auf {1} geändert hast",
|
||||
["verification.family_sharing"] = "Dieser Server erlaubt kein Family Sharing",
|
||||
["verification.verifyFamilySharing"] = "Family Sharing blockieren",
|
||||
["verification.verifyFamilySharing_description"] = "Blockiere Spieler, die Family Sharing verwenden."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_pl.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_pl.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Wymagana Weryfikacja",
|
||||
["verification.open_page"] = "Otwórz Stronę Weryfikacyjną",
|
||||
["verification.description"] = "Hej,\nWygląda na to, że nie powiązałeś jeszcze swojego konta Steam z Discord. Jest to wymagane, aby grać na tym serwerze. Kliknij poniższy przycisk, aby powiązać swoje konto.\n\nPo zakończeniu, kliknij przycisk odświeżenia.",
|
||||
["verification.refresh"] = "Odśwież Weryfikację",
|
||||
["verification.success"] = "Zostałeś zweryfikowany",
|
||||
["verification.fail"] = "Nie udało się zweryfikować",
|
||||
["verification.link_require"] = "Ten serwer wymaga powiązania konta Discord do gry",
|
||||
["admin.restart_required"] = "Wymagany Restart",
|
||||
["admin.restart_required_description"] = "Niektóre zmiany wymagają restartu, aby zostać zastosowane.\nZrestartować teraz?",
|
||||
["admin.restart"] = "Restart",
|
||||
["admin.maybe_later"] = "Może Później",
|
||||
["admin.authentication"] = "Uwierzytelnianie",
|
||||
["admin.main"] = "Główne",
|
||||
["admin.trust_safety"] = "Zaufanie i Bezpieczeństwo",
|
||||
["admin.advanced"] = "Zaawansowane",
|
||||
["admin.server_id"] = "ID Serwera",
|
||||
["admin.server_id_description"] = "ID Serwera znalezione na panelu internetowym.",
|
||||
["admin.link.open_webpanel"] = "Otwórz Panel Internetowy",
|
||||
["admin.link.test_connection"] = "Przetestuj Połączenie",
|
||||
["admin.link.buy_premium"] = "Kup Premium",
|
||||
["admin.link.install_websocket"] = "Zainstaluj Websocket",
|
||||
["admin.websocket_required"] = "\n\nTa funkcja wymaga połączenia websocket, aby działać poprawnie.",
|
||||
["admin.feature_soon"] = "\n\nTa funkcja będzie wkrótce dostępna.",
|
||||
["admin.enabled"] = "Włączony",
|
||||
["admin.disabled"] = "Wyłączony",
|
||||
["admin.click_to_show"] = "*** Kliknij, aby pokazać ***",
|
||||
["admin.server_id_description2"] = "Tutaj możesz skonfigurować ustawienia serwera.\nID Serwera i Token są dostępne na panelu internetowym w ustawieniach serwera.\nDokumentacja jest dostępna na {1}\nJeśli potrzebujesz pomocy, skontaktuj się z nami na naszym serwerze Discord.",
|
||||
["admin.server_config"] = "Konfiguracja Serwera",
|
||||
["admin.server_token"] = "Token Serwera",
|
||||
["admin.server_token_description"] = "Token Serwera znaleziony na panelu internetowym.",
|
||||
["admin.filter_on_ban"] = "Blokuj Graczy Zbanowanych na Discord",
|
||||
["admin.filter_on_ban_description"] = "Blokuj graczy zbanowanych na serwerze Discord.",
|
||||
["admin.force_player_link"] = "Wymuś Weryfikację Gracza",
|
||||
["admin.force_player_link_description"] = "Wymuś weryfikację gracza.",
|
||||
["admin.language"] = "Język",
|
||||
["admin.language_description"] = "Język używany w interfejsie.",
|
||||
["admin.maintenance"] = "Konserwacja",
|
||||
["admin.maintenance_description"] = "Aktywuj lub dezaktywuj tryb konserwacji.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN, które będzie używane do połączenia API.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN, które będzie używane do połączenia Websocket.",
|
||||
["admin.debug"] = "Debug",
|
||||
["admin.debug_description"] = "Aktywuj lub dezaktywuj tryb debugowania.",
|
||||
["context_menu.screen_capture"] = "Zamknij menu kontekstowe, aby zrobić zrzut ekranu, który zostanie wysłany na Discord.",
|
||||
["report_bug.title"] = "Zgłoś Błąd",
|
||||
["report_bug.description"] = "Zgłoś błąd do deweloperów tej gry.",
|
||||
["report_bug.submit"] = "Wyślij Zgłoszenie Błędu",
|
||||
["report_bug.cancel"] = "Anuluj",
|
||||
["report_bug.screenshot"] = "Zrzut Ekranu",
|
||||
["report_bug.description"] = "Opis",
|
||||
["report_bug.importance_level"] = "Poziom Ważności",
|
||||
["report_bug.importance_level.dsc"] = "Jak ważny jest ten błąd?",
|
||||
["report_bug.importance_level.critical"] = "Krytyczny - Awaria lub uczyniła grę niegrywalną.",
|
||||
["report_bug.importance_level.high"] = "Wysoki - Krytyczna funkcjonalność jest nieużyteczna.",
|
||||
["report_bug.importance_level.medium"] = "Średni - Ważna funkcjonalność jest nieużyteczna.",
|
||||
["report_bug.importance_level.low"] = "Niski - Problem kosmetyczny.",
|
||||
["report_bug.importance_level.trivial"] = "Błahy - Bardzo drobny problem.",
|
||||
["report_bug.steps_to_reproduce"] = "Kroki do Odtworzenia",
|
||||
["report_bug.expected_result"] = "Oczekiwany wynik",
|
||||
["report_bug.actual_result"] = "Rzeczywisty wynik",
|
||||
["report_bug.actual_result.dsc"] = "Co się właściwie stało?",
|
||||
["report_bug.expected_result.dsc"] = "Co spodziewałeś się, że się stanie?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Proszę podać krok po kroku instrukcje, jak odtworzyć błąd.",
|
||||
["report_bug.description.dsc"] = "Proszę podać jak najwięcej informacji, aby pomóc nam naprawić problem.",
|
||||
["report_bug.error.missing_fields"] = "Przed wysłaniem zgłoszenia błędu, proszę wypełnić wszystkie wymagane pola.",
|
||||
["report_bug.success"] = "Zgłoszenie błędu wysłane pomyślnie",
|
||||
["report_bug.error.failed"] = "Nie udało się wysłać zgłoszenia błędu, spróbuj ponownie później.",
|
||||
["chat.missing_permissions"] = "Nie masz uprawnień do wykonania tej akcji.",
|
||||
["chat.authentication_success"] = "Pomyślnie Uwierzytelniono",
|
||||
["chat.authentication_failed"] = "Nie udało się Uwierzytelnić",
|
||||
["chat.server_link"] = ", serwer powiązany jako {1}.",
|
||||
["chat.server_fail"] = ", sprawdź swoje ID i Token.",
|
||||
["chat.error.screenshot_failed"] = "Nie udało się zrobić zrzutu ekranu, twój system może nie obsługiwać tej funkcji.",
|
||||
["chat.screenshot.sent"] = "Zrzut ekranu wysłany na Discord.",
|
||||
["report_bug.description.full"] = "Hej, zaraz zgłosisz błąd do właścicieli tego serwera.\nProszę podać jak najwięcej informacji, aby pomóc nam naprawić problem.\nDziękujemy za pomoc w poprawie serwera.\n\nJeśli masz problem z Gmod Integration, użyj naszego serwera Discord.",
|
||||
["report_bug.context_menu.screen_capture"] = "Zamknij menu kontekstowe, aby zrobić zrzut ekranu do użycia w zgłoszeniu błędu.",
|
||||
["filter.ds.1"] = "Nie możesz dołączyć do tego serwera",
|
||||
["filter.ds.2"] = "Powód: {1}",
|
||||
["filter.none"] = "brak",
|
||||
["filter.ds.3"] = "URL Pomocy: {1}",
|
||||
["filter.ds.4"] = "Miłego dnia",
|
||||
["filter.ds.5"] = "Usługa zapewniana przez Gmod Integration",
|
||||
["filter.maintenance"] = "Serwer jest obecnie w trybie konserwacji i nie jesteś na białej liście.",
|
||||
["filter.ban"] = "Jesteś zbanowany na tym serwerze.",
|
||||
["filter.discord_ban"] = "Jesteś zbanowany na naszym serwerze discord.",
|
||||
["branch.title"] = "Zła Gałąź",
|
||||
["branch.description"] = "Hej,\nTen serwer nie pozwala na dołączenie twojej wersji gry '{1}'. Proszę przełączyć się na '{2}' w zakładce beta właściwości Garry's Mod.\n\nSteam -> Biblioteka -> Garry's Mod -> Prawy Klik -> Właściwości -> Betas -> Wybierz '{3}'" .. "\n\nPo wykonaniu tego, wyjdź z Garry's Mod i dołącz ponownie do serwera.",
|
||||
["branch.watchTutorial"] = "Obejrzyj Tutorial",
|
||||
["admin.verify_on_join"] = "Weryfikacja przy Dołączeniu",
|
||||
["admin.verify_on_join_description"] = "Zweryfikuj gracza, gdy dołączy do serwera lub gdy jest gotowy.",
|
||||
["admin.verify_on_ready_kick_time"] = "Czas do Wyrzucenia, jeśli Niezwerifikowany",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Czas w sekundach przed wyrzuceniem gracza, który nie jest zweryfikowany.",
|
||||
["admin.client_force_branch"] = "Wymuszona Gałąź Klienta",
|
||||
["admin.client_force_branch_description"] = "Gałąź dodatku, której powinni używać klienci.",
|
||||
["filter.link"] = "Musisz powiązać swoje konto Discord przed dołączeniem, zweryfikuj swoje konto na {1}",
|
||||
["verification.kick_in"] = "Jeśli nie zweryfikujesz się w ciągu {1} sekund, zostaniesz wyrzucony",
|
||||
["verification.kick"] = "Zostałeś wyrzucony za brak weryfikacji, zweryfikuj swoje konto na {1}",
|
||||
["verification.kick_in_branch"] = "Jeśli nie zmienisz swojej gałęzi w ciągu {1} sekund, zostaniesz wyrzucony",
|
||||
["verification.kick_branch"] = "Zostałeś wyrzucony za brak zmiany gałęzi na {1}",
|
||||
["verification.family_sharing"] = "Ten serwer nie pozwala na udostępnianie rodzinne",
|
||||
["verification.verisfyFamilySharing"] = "Blokuj Udostępnianie Rodzinne",
|
||||
["verification.family_sharing_description"] = "Blokuj graczy korzystających z udostępniania rodzinnego."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_ru.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_ru.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Требуется верификация",
|
||||
["verification.open_page"] = "Открыть страницу верификации",
|
||||
["verification.description"] = "Привет,\nПохоже, вы еще не связали свою учетную запись Steam с Discord. Это требуется для игры на этом сервере. Пожалуйста, нажмите кнопку ниже, чтобы связать свою учетную запись.\n\nПосле этого нажмите кнопку обновления.",
|
||||
["verification.refresh"] = "Обновить верификацию",
|
||||
["verification.success"] = "Вы были верифицированы",
|
||||
["verification.fail"] = "Не удалось верифицировать вас",
|
||||
["verification.link_require"] = "Для игры на этом сервере требуется связать вашу учетную запись Discord",
|
||||
["admin.restart_required"] = "Требуется перезапуск",
|
||||
["admin.restart_required_description"] = "Некоторые изменения требуют перезапуска для применения.\nПерезапустить сейчас?",
|
||||
["admin.restart"] = "Перезапустить",
|
||||
["admin.maybe_later"] = "Возможно позже",
|
||||
["admin.authentication"] = "Аутентификация",
|
||||
["admin.main"] = "Главное",
|
||||
["admin.trust_safety"] = "Доверие и безопасность",
|
||||
["admin.advanced"] = "Расширенные",
|
||||
["admin.server_id"] = "ID сервера",
|
||||
["admin.server_id_description"] = "ID сервера, найденный на веб-панели.",
|
||||
["admin.link.open_webpanel"] = "Открыть веб-панель",
|
||||
["admin.link.test_connection"] = "Проверить соединение",
|
||||
["admin.link.buy_premium"] = "Купить премиум",
|
||||
["admin.link.install_websocket"] = "Установить Websocket",
|
||||
["admin.websocket_required"] = "\n\nДля работы этой функции требуется соединение с Websocket.",
|
||||
["admin.feature_soon"] = "\n\nЭта функция будет доступна в ближайшее время.",
|
||||
["admin.enabled"] = "Включено",
|
||||
["admin.disabled"] = "Отключено",
|
||||
["admin.click_to_show"] = "*** Нажмите, чтобы показать ***",
|
||||
["admin.server_id_description2"] = "Здесь вы можете настроить настройки сервера.\nID сервера и токен доступны на веб-панели в настройках сервера.\nДокументация доступна по адресу {1}\nЕсли вам нужна помощь, пожалуйста, свяжитесь с нами на нашем сервере Discord.",
|
||||
["admin.server_config"] = "Конфигурация сервера",
|
||||
["admin.server_token"] = "Токен сервера",
|
||||
["admin.server_token_description"] = "Токен сервера, найденный на веб-панели.",
|
||||
["admin.filter_on_ban"] = "Блокировать игрока, забаненного на Discord",
|
||||
["admin.filter_on_ban_description"] = "Блокировать игроков, забаненных на сервере Discord.",
|
||||
["admin.force_player_link"] = "Принудительная верификация игрока",
|
||||
["admin.force_player_link_description"] = "Принудительная верификация игрока.",
|
||||
["admin.language"] = "Язык",
|
||||
["admin.language_description"] = "Язык, используемый в интерфейсе.",
|
||||
["admin.maintenance"] = "Техническое обслуживание",
|
||||
["admin.maintenance_description"] = "Активировать или деактивировать режим технического обслуживания.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API FQDN, который будет использоваться для подключения к API.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket FQDN, который будет использоваться для подключения к Websocket.",
|
||||
["admin.debug"] = "Отладка",
|
||||
["admin.debug_description"] = "Активировать или деактивировать режим отладки.",
|
||||
["context_menu.screen_capture"] = "Закройте контекстное меню, чтобы сделать снимок экрана, который будет отправлен в Discord.",
|
||||
["report_bug.title"] = "Сообщить об ошибке",
|
||||
["report_bug.description"] = "Сообщить об ошибке разработчикам этой игры.",
|
||||
["report_bug.submit"] = "Отправить отчет об ошибке",
|
||||
["report_bug.cancel"] = "Отмена",
|
||||
["report_bug.screenshot"] = "Снимок экрана",
|
||||
["report_bug.description"] = "Описание",
|
||||
["report_bug.importance_level"] = "Уровень важности",
|
||||
["report_bug.importance_level.dsc"] = "На сколько важна эта ошибка?",
|
||||
["report_bug.importance_level.critical"] = "Критический - Вылет или сделал игру непригодной для игры.",
|
||||
["report_bug.importance_level.high"] = "Высокий - Критическая функциональность неработоспособна.",
|
||||
["report_bug.importance_level.medium"] = "Средний - Важная функциональность неработоспособна.",
|
||||
["report_bug.importance_level.low"] = "Низкий - Косметическая проблема.",
|
||||
["report_bug.importance_level.trivial"] = "Пустяковый - Очень незначительная проблема.",
|
||||
["report_bug.steps_to_reproduce"] = "Шаги для воспроизведения",
|
||||
["report_bug.expected_result"] = "Ожидаемый результат",
|
||||
["report_bug.actual_result"] = "Фактический результат",
|
||||
["report_bug.actual_result.dsc"] = "Что на самом деле произошло?",
|
||||
["report_bug.expected_result.dsc"] = "Что вы ожидали, что произойдет?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Пожалуйста, предоставьте пошаговое руководство о том, как воспроизвести ошибку.",
|
||||
["report_bug.description.dsc"] = "Пожалуйста, предоставьте как можно больше информации, чтобы помочь нам исправить проблему.",
|
||||
["report_bug.error.missing_fields"] = "Перед отправкой отчета об ошибке, заполните все обязательные поля.",
|
||||
["report_bug.success"] = "Отчет об ошибке успешно отправлен",
|
||||
["report_bug.error.failed"] = "Не удалось отправить отчет об ошибке, пожалуйста, попробуйте еще раз позже.",
|
||||
["chat.missing_permissions"] = "У вас нет разрешения на выполнение этого действия.",
|
||||
["chat.authentication_success"] = "Успешная аутентификация",
|
||||
["chat.authentication_failed"] = "Не удалось аутентифицироваться",
|
||||
["chat.server_link"] = ", сервер связан как {1}.",
|
||||
["chat.server_fail"] = ", проверьте ваш ID и токен.",
|
||||
["chat.error.screenshot_failed"] = "Не удалось сделать снимок экрана, ваша система может не поддерживать эту функцию.",
|
||||
["chat.screenshot.sent"] = "Снимок экрана отправлен в Discord.",
|
||||
["report_bug.description.full"] = "Привет, вы собираетесь сообщить об ошибке владельцам этого сервера.\nПожалуйста, предоставьте как можно больше информации, чтобы помочь нам исправить проблему.\nСпасибо, что помогаете нам улучшить сервер.\n\nЕсли у вас есть проблема с Gmod Integration, пожалуйста, используйте наш сервер Discord.",
|
||||
["report_bug.context_menu.screen_capture"] = "Закройте контекстное меню, чтобы сделать снимок экрана для использования в отчете об ошибке.",
|
||||
["filter.ds.1"] = "Вы не можете присоединиться к этому серверу",
|
||||
["filter.ds.2"] = "Причина: {1}",
|
||||
["filter.none"] = "нет",
|
||||
["filter.ds.3"] = "Ссылка на помощь: {1}",
|
||||
["filter.ds.4"] = "Хорошего дня",
|
||||
["filter.ds.5"] = "Сервис предоставлен Gmod Integration",
|
||||
["filter.maintenance"] = "Сервер в настоящее время находится на техническом обслуживании, и вы не включены в белый список.",
|
||||
["filter.ban"] = "Вы забанены на этом сервере.",
|
||||
["filter.discord_ban"] = "Вы забанены на нашем сервере Discord.",
|
||||
["branch.title"] = "Неправильная ветка",
|
||||
["branch.description"] = "Привет,\nЭтот сервер не позволяет вашей версии игры '{1}' присоединиться. Пожалуйста, переключитесь на '{2}' во вкладке бета-версий в свойствах Garry's Mod.\n\nSteam -> Библиотека -> Garry's Mod -> Правый клик -> Свойства -> Бета-версии -> Выберите '{3}'" .. "\n\nПосле этого выйдите из Garry's Mod и снова присоединитесь к серверу.",
|
||||
["branch.watchTutorial"] = "Смотреть учебник",
|
||||
["admin.verify_on_join"] = "Верификация при входе",
|
||||
["admin.verify_on_join_description"] = "Верифицировать игрока при его входе на сервер или при готовности игрока.",
|
||||
["admin.verify_on_ready_kick_time"] = "Время до кика, если не верифицирован",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Время в секундах до кика игрока, если он не верифицирован.",
|
||||
["admin.client_force_branch"] = "Принудительная ветка клиента",
|
||||
["admin.client_force_branch_description"] = "Ветка аддона, которую должны использовать клиенты.",
|
||||
["filter.link"] = "Вам нужно связать свою учетную запись Discord перед присоединением, верифицируйте свою учетную запись на {1}",
|
||||
["verification.kick_in"] = "Если вы не верифицируетесь в течение {1} секунд, вас кикнут",
|
||||
["verification.kick"] = "Вы были кикнуты за отсутствие верификации, верифицируйте свою учетную запись на {1}",
|
||||
["verification.kick_in_branch"] = "Если вы не смените ветку в течение {1} секунд, вас кикнут",
|
||||
["verification.kick_branch"] = "Вы были кикнуты за несмену ветки на {1}",
|
||||
["verification.family_sharing"] = "This server does not allow family sharing",
|
||||
["verification.verifyFamilySharing"] = "Блокировать семейный доступ",
|
||||
["verification.verifyFamilySharing_description"] = "Блокировать игроков, использующих семейный доступ."
|
||||
}
|
105
lua/gmod_integration/shared/languages/sh_tr.lua
Normal file
105
lua/gmod_integration/shared/languages/sh_tr.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
return {
|
||||
["verification.title"] = "Doğrulama Gerekli",
|
||||
["verification.open_page"] = "Doğrulama Sayfasını Aç",
|
||||
["verification.description"] = "Merhaba,\nGörünüşe göre Steam hesabınızı Discord'a henüz bağlamadınız. Bu sunucuda oynamak için bu gereklidir. Hesabınızı bağlamak için lütfen aşağıdaki düğmeye tıklayın.\n\nBunu yaptıktan sonra, yenileme düğmesine tıklayın.",
|
||||
["verification.refresh"] = "Doğrulamayı Yenile",
|
||||
["verification.success"] = "Doğrulandınız",
|
||||
["verification.fail"] = "Doğrulama başarısız oldu",
|
||||
["verification.link_require"] = "Bu sunucuda oynamak için Discord hesabınızı bağlamanız gerekiyor",
|
||||
["admin.restart_required"] = "Yeniden Başlatma Gerekli",
|
||||
["admin.restart_required_description"] = "Bazı değişikliklerin uygulanması için yeniden başlatma gereklidir.\nŞimdi yeniden başlatılsın mı?",
|
||||
["admin.restart"] = "Yeniden Başlat",
|
||||
["admin.maybe_later"] = "Belki Daha Sonra",
|
||||
["admin.authentication"] = "Kimlik Doğrulama",
|
||||
["admin.main"] = "Ana",
|
||||
["admin.trust_safety"] = "Güven ve Güvenlik",
|
||||
["admin.advanced"] = "Gelişmiş",
|
||||
["admin.server_id"] = "Sunucu Kimliği",
|
||||
["admin.server_id_description"] = "Web panelinde bulunan sunucu kimliği.",
|
||||
["admin.link.open_webpanel"] = "Web Panelini Aç",
|
||||
["admin.link.test_connection"] = "Bağlantıyı Test Et",
|
||||
["admin.link.buy_premium"] = "Premium Satın Al",
|
||||
["admin.link.install_websocket"] = "Websocket Kur",
|
||||
["admin.websocket_required"] = "\n\nBu özellik düzgün çalışması için bir websocket bağlantısı gerektirir.",
|
||||
["admin.feature_soon"] = "\n\nBu özellik yakında kullanılabilir olacak.",
|
||||
["admin.enabled"] = "Etkin",
|
||||
["admin.disabled"] = "Devre Dışı",
|
||||
["admin.click_to_show"] = "*** Göstermek için tıklayın ***",
|
||||
["admin.server_id_description2"] = "Burada sunucu ayarlarını yapılandırabilirsiniz.\nSunucu Kimliği ve Token, sunucu ayarlarında web panelinde mevcuttur.\nDökümantasyon {1} adresinde mevcuttur.\nYardıma ihtiyacınız varsa, lütfen discord sunucumuzda bize ulaşın.",
|
||||
["admin.server_config"] = "Sunucu Yapılandırması",
|
||||
["admin.server_token"] = "Sunucu Token",
|
||||
["admin.server_token_description"] = "Web panelinde bulunan sunucu tokenı.",
|
||||
["admin.filter_on_ban"] = "Discord Banlı Oyuncuyu Engelle",
|
||||
["admin.filter_on_ban_description"] = "Discord sunucusunda yasaklanmış oyuncuları engelle.",
|
||||
["admin.force_player_link"] = "Oyuncu Doğrulamasını Zorla",
|
||||
["admin.force_player_link_description"] = "Oyuncu doğrulamasını zorla.",
|
||||
["admin.language"] = "Dil",
|
||||
["admin.language_description"] = "Arayüzde kullanılan dil.",
|
||||
["admin.maintenance"] = "Bakım",
|
||||
["admin.maintenance_description"] = "Bakım modunu etkinleştir veya devre dışı bırak.",
|
||||
["admin.api_fqdn"] = "API FQDN",
|
||||
["admin.api_fqdn_description"] = "API bağlantısı için kullanılacak API FQDN.",
|
||||
["admin.websocket_fqdn"] = "Websocket FQDN",
|
||||
["admin.websocket_fqdn_description"] = "Websocket bağlantısı için kullanılacak Websocket FQDN.",
|
||||
["admin.debug"] = "Hata Ayıklama",
|
||||
["admin.debug_description"] = "Hata ayıklama modunu etkinleştir veya devre dışı bırak.",
|
||||
["context_menu.screen_capture"] = "Ekran görüntüsünü almak için bağlam menüsünü kapatın ve Discord'a gönderin.",
|
||||
["report_bug.title"] = "Hata Bildir",
|
||||
["report_bug.description"] = "Bu oyunun geliştiricilerine bir hata bildirin.",
|
||||
["report_bug.submit"] = "Hata Raporunu Gönder",
|
||||
["report_bug.cancel"] = "İptal",
|
||||
["report_bug.screenshot"] = "Ekran Görüntüsü",
|
||||
["report_bug.description"] = "Açıklama",
|
||||
["report_bug.importance_level"] = "Önem Seviyesi",
|
||||
["report_bug.importance_level.dsc"] = "Bu hata ne kadar önemli?",
|
||||
["report_bug.importance_level.critical"] = "Kritik - Oyunu çökertti veya oynanamaz hale getirdi.",
|
||||
["report_bug.importance_level.high"] = "Yüksek - Kritik işlevsellik kullanılamaz.",
|
||||
["report_bug.importance_level.medium"] = "Orta - Önemli işlevsellik kullanılamaz.",
|
||||
["report_bug.importance_level.low"] = "Düşük - Kozmetik bir sorun.",
|
||||
["report_bug.importance_level.trivial"] = "Önemsiz - Çok küçük bir sorun.",
|
||||
["report_bug.steps_to_reproduce"] = "Tekrarlama Adımları",
|
||||
["report_bug.expected_result"] = "Beklenen Sonuç",
|
||||
["report_bug.actual_result"] = "Gerçek Sonuç",
|
||||
["report_bug.actual_result.dsc"] = "Gerçekte ne oldu?",
|
||||
["report_bug.expected_result.dsc"] = "Ne olmasını bekliyordunuz?",
|
||||
["report_bug.steps_to_reproduce.dsc"] = "Lütfen hatayı nasıl tekrarlayacağınızı adım adım açıklayın.",
|
||||
["report_bug.description.dsc"] = "Lütfen sorunu düzeltmemize yardımcı olmak için mümkün olduğunca fazla bilgi sağlayın.",
|
||||
["report_bug.error.missing_fields"] = "Hata raporunu göndermeden önce lütfen tüm gerekli alanları doldurun.",
|
||||
["report_bug.success"] = "Hata raporu başarıyla gönderildi",
|
||||
["report_bug.error.failed"] = "Hata raporu gönderilemedi, lütfen daha sonra tekrar deneyin.",
|
||||
["chat.missing_permissions"] = "Bu işlemi yapma izniniz yok.",
|
||||
["chat.authentication_success"] = "Başarıyla Kimlik Doğrulandı",
|
||||
["chat.authentication_failed"] = "Kimlik Doğrulama Başarısız",
|
||||
["chat.server_link"] = ", sunucu {1} olarak bağlandı.",
|
||||
["chat.server_fail"] = ", ID ve Token'ınızı kontrol edin.",
|
||||
["chat.error.screenshot_failed"] = "Ekran görüntüsü alınamadı, sistemizin bu özelliği desteklemiyor olabilir.",
|
||||
["chat.screenshot.sent"] = "Ekran görüntüsü Discord'a gönderildi.",
|
||||
["report_bug.description.full"] = "Merhaba, bu sunucunun sahiplerine bir hata raporu göndermek üzeresiniz.\nLütfen sorunu düzeltmemize yardımcı olmak için mümkün olduğunca fazla bilgi sağlayın.\nSunucuyu geliştirmemize yardımcı olduğunuz için teşekkür ederiz.\n\nGmod Integration ile ilgili bir sorununuz varsa, lütfen discord sunucumuzu kullanın.",
|
||||
["report_bug.context_menu.screen_capture"] = "Hata raporunda kullanmak için ekran görüntüsünü almak için bağlam menüsünü kapatın.",
|
||||
["filter.ds.1"] = "Bu sunucuya katılamazsınız",
|
||||
["filter.ds.2"] = "Sebep: {1}",
|
||||
["filter.none"] = "hiçbiri",
|
||||
["filter.ds.3"] = "Yardım URL'si: {1}",
|
||||
["filter.ds.4"] = "İyi günler",
|
||||
["filter.ds.5"] = "Gmod Integration tarafından sağlanan hizmet",
|
||||
["filter.maintenance"] = "Sunucu şu anda bakım altında ve sizin whitelistinizde değilsiniz.",
|
||||
["filter.ban"] = "Bu sunucudan yasaklandınız.",
|
||||
["filter.discord_ban"] = "Discord sunucumuzdan yasaklandınız.",
|
||||
["branch.title"] = "Yanlış Dal",
|
||||
["branch.description"] = "Merhaba,\nBu sunucu oyun sürümünüz '{1}' ile katılmanıza izin vermiyor. Lütfen Garry's Mod özelliklerinin beta sekmesinde '{2}' olarak değiştirin.\n\nSteam -> Kütüphane -> Garry's Mod -> Sağ Tıkla -> Özellikler -> Betalar -> '{3}' Seçin" .. "\n\nBunu yaptıktan sonra, Garry's Mod'dan çıkın ve sunucuya yeniden katılın.",
|
||||
["branch.watchTutorial"] = "Eğitimi İzle",
|
||||
["admin.verify_on_join"] = "Katıldığında Doğrula",
|
||||
["admin.verify_on_join_description"] = "Oyuncu sunucuya katıldığında veya oyuncu hazır olduğunda doğrulayın.",
|
||||
["admin.verify_on_ready_kick_time"] = "Doğrulanmazsa Atılma Süresi",
|
||||
["admin.verify_on_ready_kick_time_description"] = "Doğrulanmamış bir oyuncuyu atmadan önceki süre (saniye cinsinden).",
|
||||
["admin.client_force_branch"] = "İstemci Zorunlu Dal",
|
||||
["admin.client_force_branch_description"] = "İstemcilerin kullanması gereken eklenti dalı.",
|
||||
["filter.link"] = "Katılmadan önce discord hesabınızı bağlamanız gerekiyor, hesabınızı {1} üzerinde doğrulayın",
|
||||
["verification.kick_in"] = "{1} saniye içinde doğrulamazsanız atılacaksınız",
|
||||
["verification.kick"] = "Doğrulamadığınız için atıldınız, hesabınızı {1} üzerinde doğrulayın",
|
||||
["verification.kick_in_branch"] = "{1} saniye içinde dalınızı değiştirmezseniz atılacaksınız",
|
||||
["verification.kick_branch"] = "Dalınızı {1} olarak değiştirmediğiniz için atıldınız",
|
||||
["verification.family_sharing"] = "Bu sunucu aile paylaşımına izin vermiyor",
|
||||
["verification.verifyFamilySharing"] = "Aile Paylaşımını Engelle",
|
||||
["verification.family_sharing_description"] = "Aile paylaşımı yapan oyuncuları engelle."
|
||||
}
|
34
lua/gmod_integration/shared/sh__language.lua
Normal file
34
lua/gmod_integration/shared/sh__language.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
local default = include("gmod_integration/shared/languages/sh_en.lua")
|
||||
local translationTable = default
|
||||
function gmInte.getTranslation(key, defaultTranslation, ...)
|
||||
local translation = translationTable[key]
|
||||
if !translation then translation = defaultTranslation end
|
||||
if ... then
|
||||
for i = 1, select("#", ...) do
|
||||
translation = string.Replace(translation, "{" .. i .. "}", select(i, ...))
|
||||
end
|
||||
end
|
||||
return translation
|
||||
end
|
||||
|
||||
function gmInte.loadTranslations()
|
||||
local lang = gmInte.config.language
|
||||
if lang == "en" then
|
||||
translationTable = default
|
||||
else
|
||||
if file.Exists("gmod_integration/shared/languages/sh_" .. lang .. ".lua", "LUA") then
|
||||
translationTable = include("gmod_integration/shared/languages/sh_" .. lang .. ".lua")
|
||||
else
|
||||
print("Unknown Language")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if !gmInte.log then
|
||||
print(" | Translations | Loaded " .. lang .. " translations")
|
||||
else
|
||||
gmInte.log("Loaded " .. lang .. " translations")
|
||||
end
|
||||
end
|
||||
|
||||
if SERVER then gmInte.loadTranslations() end
|
88
lua/gmod_integration/shared/sh_api_format.lua
Normal file
88
lua/gmod_integration/shared/sh_api_format.lua
Normal file
|
@ -0,0 +1,88 @@
|
|||
function gmInte.getPlayerFormat(ply)
|
||||
if !IsValid(ply) || !ply:IsPlayer() then return end
|
||||
return {
|
||||
["steamID"] = ply:SteamID(),
|
||||
["steamID64"] = ply:SteamID64(),
|
||||
["userGroup"] = ply:GetUserGroup(),
|
||||
["team"] = gmInte.getTeamFormat(ply:Team()),
|
||||
["branch"] = ply:gmInteGetBranch(),
|
||||
["name"] = ply:Nick(),
|
||||
["kills"] = ply:Frags(),
|
||||
["deaths"] = ply:Deaths(),
|
||||
["customValues"] = ply:gmIntGetCustomValues(),
|
||||
["connectTime"] = math.Round(math.Round(RealTime() - ply:gmIntGetConnectTime())),
|
||||
["timeLastTeamChange"] = math.Round(RealTime() - ply:gmIntGetTimeLastTeamChange()),
|
||||
["adjustedTime"] = math.Round(ply:getAdjustedTime()),
|
||||
["ping"] = ply:Ping(),
|
||||
["fps"] = ply:gmIntGetFPS(),
|
||||
["position"] = gmInte.getVectorFormat(ply:GetPos()),
|
||||
["angle"] = gmInte.getAngleFormat(ply:EyeAngles()),
|
||||
["weapon"] = gmInte.getWeaponFormat(ply:GetActiveWeapon())
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getPlayersFormat()
|
||||
local players = {}
|
||||
for k, v in ipairs(player.GetAll()) do
|
||||
table.insert(players, gmInte.getPlayerFormat(v))
|
||||
end
|
||||
return players
|
||||
end
|
||||
|
||||
function gmInte.getServerFormat()
|
||||
return {
|
||||
["hostname"] = GetHostName(),
|
||||
["ip"] = game.GetIPAddress(),
|
||||
["port"] = GetConVar("hostport"):GetInt(),
|
||||
["map"] = game.GetMap(),
|
||||
["players"] = #player.GetAll(),
|
||||
["playersList"] = gmInte.getPlayersFormat(),
|
||||
["maxPlayers"] = game.MaxPlayers(),
|
||||
["gameMode"] = engine.ActiveGamemode(),
|
||||
["uptime"] = math.Round(RealTime())
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getWeaponFormat(weapon)
|
||||
if !IsValid(weapon) || !weapon:IsWeapon() then return end
|
||||
return {
|
||||
["class"] = weapon:GetClass(),
|
||||
["printName"] = weapon:GetPrintName()
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getEntityFormat(ent)
|
||||
if !IsValid(ent) then return end
|
||||
return {
|
||||
["class"] = ent:GetClass(),
|
||||
["model"] = ent:GetModel(),
|
||||
["position"] = gmInte.getVectorFormat(ent:GetPos()),
|
||||
["angle"] = gmInte.getAngleFormat(ent:GetAngles())
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getVectorFormat(vec)
|
||||
if !isvector(vec) then return end
|
||||
return {
|
||||
["x"] = math.Round(vec.x),
|
||||
["y"] = math.Round(vec.y),
|
||||
["z"] = math.Round(vec.z)
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getAngleFormat(ang)
|
||||
if !isangle(ang) then return end
|
||||
return {
|
||||
["p"] = math.Round(ang.p),
|
||||
["y"] = math.Round(ang.y),
|
||||
["r"] = math.Round(ang.r)
|
||||
}
|
||||
end
|
||||
|
||||
function gmInte.getTeamFormat(teamID)
|
||||
if !isnumber(teamID) then return end
|
||||
return {
|
||||
["id"] = teamID,
|
||||
["name"] = team.GetName(teamID)
|
||||
}
|
||||
end
|
25
lua/gmod_integration/shared/sh_con.lua
Normal file
25
lua/gmod_integration/shared/sh_con.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local function testConError(ply, cmd, args)
|
||||
if ply && !ply:gmIntIsAdmin() then
|
||||
if SERVER then return end
|
||||
print("[Gmod Integration] Missing permissions to run this command")
|
||||
return
|
||||
end
|
||||
|
||||
if #args == 0 then
|
||||
error("This is a test error")
|
||||
else
|
||||
if args[1] == "loop" then
|
||||
hook.Add("Think", "gmInte:TestError:Loop", function() error("This is a test error") end)
|
||||
timer.Simple(5, function() hook.Remove("Think", "gmInte:TestError:Loop") end)
|
||||
elseif args[1] == "crash" then
|
||||
while true do
|
||||
error("This is a crash error")
|
||||
end
|
||||
else
|
||||
error("This is a test error")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
concommand.Add("gmod_integration_test_error", testConError)
|
||||
concommand.Add("gmi_test_error", testConError)
|
33
lua/gmod_integration/shared/sh_errors.lua
Normal file
33
lua/gmod_integration/shared/sh_errors.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
local cacheErrors = {}
|
||||
function gmInte.sendLuaErrorReport(err, realm, stack, name, id)
|
||||
local count = cacheErrors[err] && cacheErrors[err].count + 1 || 1
|
||||
cacheErrors[err] = {
|
||||
["time"] = CurTime(),
|
||||
["count"] = count,
|
||||
}
|
||||
|
||||
if !gmInte.config.id || !gmInte.config.token then return end
|
||||
if CLIENT && !IsValid(LocalPlayer()) then return end
|
||||
timer.Simple(0.5, function()
|
||||
if !cacheErrors[err] then return end
|
||||
if cacheErrors[err].count != count then
|
||||
if cacheErrors[err].count != 100 then return end
|
||||
else
|
||||
cacheErrors[err] = nil
|
||||
end
|
||||
|
||||
local endpoint = SERVER && "/servers/:serverID/errors" || "/clients/:steamID64/servers/:serverID/errors"
|
||||
gmInte.http.post(endpoint, {
|
||||
["error"] = err,
|
||||
["realm"] = realm,
|
||||
["stack"] = stack,
|
||||
["name"] = name,
|
||||
["id"] = id,
|
||||
["count"] = count,
|
||||
["uptime"] = math.Round(RealTime()),
|
||||
["identifier"] = SERVER && gmInte.config.id || CLIENT && LocalPlayer():SteamID64()
|
||||
})
|
||||
end)
|
||||
end
|
||||
|
||||
hook.Add("OnLuaError", "gmInte:OnLuaError:SendReport", function(err, realm, stack, name, id) gmInte.sendLuaErrorReport(err, realm, stack, name, id) end)
|
|
@ -1,113 +1,139 @@
|
|||
//
|
||||
// HTTP
|
||||
//
|
||||
|
||||
local failMessage = {
|
||||
["401"] = "Bad Credentials",
|
||||
["403"] = "Forbidden",
|
||||
["404"] = "Not Found",
|
||||
["500"] = "Internal Server Error",
|
||||
["503"] = "Service Unavailable",
|
||||
["504"] = "Gateway Timeout",
|
||||
}
|
||||
|
||||
local function errorMessage(body, code)
|
||||
if (body && body.error) then
|
||||
if (failMessage[code]) then
|
||||
return failMessage[code]
|
||||
else
|
||||
return body.error
|
||||
end
|
||||
elseif (failMessage[code]) then
|
||||
return failMessage[code]
|
||||
else
|
||||
return code
|
||||
end
|
||||
local apiVersion = "v3"
|
||||
gmInte.http = gmInte.http || {}
|
||||
local function getAPIURL(endpoint)
|
||||
local method = gmInte.isPrivateIP(gmInte.config.apiFQDN) && "http" || "https"
|
||||
endpoint = string.gsub(endpoint, ":serverID", gmInte.config.id)
|
||||
if CLIENT then endpoint = string.gsub(endpoint, ":steamID64", LocalPlayer():SteamID64()) end
|
||||
return method .. "://" .. gmInte.config.apiFQDN .. "/" .. apiVersion .. endpoint
|
||||
end
|
||||
|
||||
local function sendHTTP(params)
|
||||
// Log the HTTP request
|
||||
gmInte.log("HTTP Request: " .. params.method .. " " .. params.endpoint, true)
|
||||
gmInte.log("HTTP Body: " .. (params.body || "No body"), true)
|
||||
local function showableBody(endpoint, body)
|
||||
if endpoint == "/clients/:steamID64/servers/:serverID/screenshots" then
|
||||
body.screenshot = "[IMAGE DATA]"
|
||||
elseif endpoint == "/clients/:steamID64/servers/:serverID/bugs" then
|
||||
body.screenshot.screenshot = "[IMAGE DATA]"
|
||||
end
|
||||
return util.TableToJSON(body || {})
|
||||
end
|
||||
|
||||
// Send the HTTP request
|
||||
HTTP({
|
||||
url = "https://api.gmod-integration.com" .. params.endpoint,
|
||||
method = params.method,
|
||||
headers = {
|
||||
function gmInte.http.requestAPI(params)
|
||||
local body = params.body && util.TableToJSON(params.body || {}) || ""
|
||||
local bodyLength = string.len(body)
|
||||
local token = params.token || gmInte.config.token || ""
|
||||
local url = getAPIURL(params.endpoint || "")
|
||||
local method = params.method || "GET"
|
||||
local success = params.success || function() end
|
||||
local failed = params.failed || function() end
|
||||
local version = gmInte.version || "Unknown"
|
||||
local localRequestID = util.CRC(tostring(SysTime()))
|
||||
if token == "" then
|
||||
return failed(401, {
|
||||
["error"] = "No token provided"
|
||||
})
|
||||
end
|
||||
|
||||
local headers = {
|
||||
["Content-Type"] = "application/json",
|
||||
["Content-Length"] = params.body && string.len(params.body) || 0,
|
||||
["id"] = gmInte.config.id,
|
||||
["token"] = gmInte.config.token,
|
||||
["version"] = gmInte.version
|
||||
},
|
||||
body = params.body && params.body || "",
|
||||
type = "application/json",
|
||||
success = function(code, body, headers)
|
||||
// Log the HTTP response
|
||||
["Content-Length"] = bodyLength,
|
||||
["Authorization"] = "Bearer " .. token,
|
||||
["Gmod-Integrations-Version"] = version,
|
||||
["Gmod-Integrations-Request-ID"] = localRequestID
|
||||
}
|
||||
|
||||
gmInte.log("HTTP FQDN: " .. gmInte.config.apiFQDN, true)
|
||||
gmInte.log("HTTP Request ID: " .. localRequestID, true)
|
||||
gmInte.log("HTTP Request: " .. method .. " " .. url, true)
|
||||
gmInte.log("HTTP Body: " .. showableBody(params.endpoint, params.body), true)
|
||||
HTTP({
|
||||
["url"] = url,
|
||||
["method"] = method,
|
||||
["headers"] = headers,
|
||||
["body"] = body,
|
||||
["type"] = "application/json",
|
||||
["success"] = function(code, body, headers)
|
||||
gmInte.log("HTTP Request ID: " .. localRequestID, true)
|
||||
gmInte.log("HTTP Response: " .. code, true)
|
||||
if (gmInte.config.debug) then gmInte.log("HTTP Body: " .. body, true) end
|
||||
|
||||
// if body and is json extract it
|
||||
if (body && string.sub(headers["Content-Type"], 1, 16) == "application/json") then
|
||||
body = util.JSONToTable(body)
|
||||
gmInte.log("HTTP Body: " .. body, true)
|
||||
if string.sub(headers["Content-Type"], 1, 16) != "application/json" then
|
||||
gmInte.log("HTTP Failed: Invalid Content-Type", true)
|
||||
return failed(code, body)
|
||||
end
|
||||
|
||||
// Check if the request was successful
|
||||
if (string.sub(code, 1, 1) == "2") then
|
||||
if (params.success) then
|
||||
params.success(code, body, headers)
|
||||
else
|
||||
gmInte.log("HTTP Request Successful", true)
|
||||
end
|
||||
else
|
||||
if (params.failed) then
|
||||
params.failed(code, body, headers)
|
||||
else
|
||||
gmInte.logError(errorMessage(body, code))
|
||||
end
|
||||
body = util.JSONToTable(body || "{}")
|
||||
if code < 200 || code >= 300 then
|
||||
gmInte.log("HTTP Failed: Invalid Status Code", true)
|
||||
return failed(code, body)
|
||||
end
|
||||
|
||||
gmInte.aprovedCredentials = true
|
||||
return success(code, body)
|
||||
end,
|
||||
failed = function(error)
|
||||
gmInte.logError(error)
|
||||
["failed"] = function(error)
|
||||
gmInte.log("HTTP Request ID: " .. localRequestID, true)
|
||||
gmInte.log("HTTP Failed: " .. error, true)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.get(endpoint, onSuccess, onFailed)
|
||||
sendHTTP({
|
||||
endpoint = endpoint,
|
||||
method = "GET",
|
||||
success = onSuccess,
|
||||
failed = onFailed
|
||||
function gmInte.http.get(endpoint, onSuccess, onFailed)
|
||||
gmInte.http.requestAPI({
|
||||
["endpoint"] = endpoint,
|
||||
["method"] = "GET",
|
||||
["success"] = onSuccess,
|
||||
["failed"] = onFailed
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.post(endpoint, data, onSuccess, onFailed)
|
||||
sendHTTP({
|
||||
endpoint = endpoint,
|
||||
method = "POST",
|
||||
body = util.TableToJSON(data),
|
||||
success = onSuccess,
|
||||
failed = onFailed
|
||||
function gmInte.http.post(endpoint, data, onSuccess, onFailed)
|
||||
gmInte.http.requestAPI({
|
||||
["endpoint"] = endpoint,
|
||||
["method"] = "POST",
|
||||
["body"] = data,
|
||||
["success"] = onSuccess,
|
||||
["failed"] = onFailed
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.put(endpoint, data, onSuccess, onFailed)
|
||||
sendHTTP({
|
||||
endpoint = endpoint,
|
||||
method = "PUT",
|
||||
body = util.TableToJSON(data),
|
||||
success = onSuccess,
|
||||
failed = onFailed
|
||||
local nextLogPacket = {}
|
||||
local function flushLogs()
|
||||
if #nextLogPacket > 0 then
|
||||
gmInte.http.requestAPI({
|
||||
["endpoint"] = "/servers/:serverID/logs",
|
||||
["method"] = "POST",
|
||||
["body"] = nextLogPacket
|
||||
})
|
||||
|
||||
nextLogPacket = {}
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("ShutDown", "gmInte:Server:ShutDown:FlushLogs", flushLogs)
|
||||
hook.Add("GMI:SaveBeforeCrash", "gmInte:Server:BeforeCrash:SavePlayers", flushLogs)
|
||||
timer.Create("gmInte:http:flushLogs", 3, 0, flushLogs)
|
||||
function gmInte.http.postLog(endpoint, data)
|
||||
table.insert(nextLogPacket, {
|
||||
["endpoint"] = endpoint,
|
||||
["data"] = data
|
||||
})
|
||||
|
||||
if #nextLogPacket >= 30 then flushLogs() end
|
||||
end
|
||||
|
||||
function gmInte.http.put(endpoint, data, onSuccess, onFailed)
|
||||
gmInte.http.requestAPI({
|
||||
["endpoint"] = endpoint,
|
||||
["method"] = "PUT",
|
||||
["body"] = data,
|
||||
["success"] = onSuccess,
|
||||
["failed"] = onFailed
|
||||
})
|
||||
end
|
||||
|
||||
function gmInte.delete(endpoint, onSuccess, onFailed)
|
||||
sendHTTP({
|
||||
endpoint = endpoint,
|
||||
method = "DELETE",
|
||||
success = onSuccess,
|
||||
failed = onFailed
|
||||
function gmInte.http.delete(endpoint, onSuccess, onFailed)
|
||||
gmInte.http.requestAPI({
|
||||
["endpoint"] = endpoint,
|
||||
["method"] = "DELETE",
|
||||
["success"] = onSuccess,
|
||||
["failed"] = onFailed
|
||||
})
|
||||
end
|
|
@ -1,30 +1,35 @@
|
|||
//
|
||||
// Functions
|
||||
//
|
||||
|
||||
// Log
|
||||
function gmInte.log(msg, debug)
|
||||
if (debug && !gmInte.config.debug) then return end
|
||||
if debug && !gmInte.config.debug then return end
|
||||
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] " .. msg)
|
||||
end
|
||||
|
||||
// Log Error
|
||||
function gmInte.logError(msg, debug)
|
||||
if (debug && !gmInte.config.debug) then return end
|
||||
if debug && !gmInte.config.debug then return end
|
||||
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] [ERROR] " .. msg)
|
||||
if (debug) then print(debug.traceback()) end
|
||||
end
|
||||
|
||||
// Log Warning
|
||||
function gmInte.logWarning(msg, debug)
|
||||
if (debug && !gmInte.config.debug) then return end
|
||||
if debug && !gmInte.config.debug then return end
|
||||
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] [WARNING] " .. msg)
|
||||
if (debug) then print(debug.traceback()) end
|
||||
end
|
||||
|
||||
// Log Hint
|
||||
function gmInte.logHint(msg, debug)
|
||||
if (debug && !gmInte.config.debug) then return end
|
||||
if debug && !gmInte.config.debug then return end
|
||||
print("[" .. os.date("%Y-%m-%d %H:%M:%S") .. "] [Gmod Integration] [HINT] " .. msg)
|
||||
if (debug) then print(debug.traceback()) end
|
||||
end
|
||||
|
||||
// Is Private IP
|
||||
function gmInte.isPrivateIP(ip)
|
||||
// detect localhost
|
||||
if ip == "localhost" then return true end
|
||||
// detect private IP addresses (RFC 1918)
|
||||
local parts = string.Explode(".", ip)
|
||||
if parts[1] == "192" && parts[2] == "168" then return true end
|
||||
if parts[1] == "10" then return true end
|
||||
if parts[1] == "172" && tonumber(parts[2]) >= 16 && tonumber(parts[2]) <= 31 then return true end
|
||||
if parts[1] == "127" then return true end
|
||||
return false
|
||||
end
|
159
lua/gmod_integration/shared/sh_player_meta.lua
Normal file
159
lua/gmod_integration/shared/sh_player_meta.lua
Normal file
|
@ -0,0 +1,159 @@
|
|||
local ply = FindMetaTable("Player")
|
||||
function ply:gmIntGetConnectTime()
|
||||
return self.gmIntTimeConnect || 0
|
||||
end
|
||||
|
||||
function ply:gmIntIsVerified()
|
||||
return self.gmIntVerified || false
|
||||
end
|
||||
|
||||
function ply:gmIntGetTimeLastTeamChange()
|
||||
return self.gmIntTimeLastTeamChange || RealTime()
|
||||
end
|
||||
|
||||
function ply:gmInteResetTimeLastTeamChange()
|
||||
self.gmIntTimeLastTeamChange = RealTime()
|
||||
end
|
||||
|
||||
function ply:gmInteGetBranch()
|
||||
return CLIENT && BRANCH || self.branch || "unknown"
|
||||
end
|
||||
|
||||
function ply:gmIntSetCustomValue(key, value)
|
||||
self.gmIntCustomValues = self.gmIntCustomValues || {}
|
||||
self.gmIntCustomValues[key] = value
|
||||
end
|
||||
|
||||
function ply:gmIntIsAdmin()
|
||||
return gmInte.config.adminRank[self:GetUserGroup()] || false
|
||||
end
|
||||
|
||||
function ply:gmIntGetCustomValue(key)
|
||||
return self.gmIntCustomValues && self.gmIntCustomValues[key]
|
||||
end
|
||||
|
||||
function ply:gmIntRemoveCustomValue(key)
|
||||
if self.gmIntCustomValues then self.gmIntCustomValues[key] = nil end
|
||||
end
|
||||
|
||||
local function getCustomCompatability(ply)
|
||||
local values = {}
|
||||
// DarkRP
|
||||
if DarkRP then
|
||||
values.money = ply:getDarkRPVar("money")
|
||||
values.job = ply:getDarkRPVar("job")
|
||||
end
|
||||
|
||||
// GUI Level System
|
||||
if GUILevelSystem then
|
||||
values.level = ply:GetLevel()
|
||||
values.xp = ply:GetXP()
|
||||
end
|
||||
|
||||
// Pointshop 2
|
||||
if Pointshop2 && ply.PS2_Wallet then
|
||||
values.ps2Points = ply.PS2_Wallet.points
|
||||
values.ps2PremiumPoints = ply.PS2_Wallet.premiumPoints
|
||||
end
|
||||
|
||||
if CH_ATM && SERVER then values.bank = CH_ATM.GetMoneyBankAccount(ply) end
|
||||
return values
|
||||
end
|
||||
|
||||
local function getCustomValues(ply)
|
||||
local values = {}
|
||||
// Get compatability values
|
||||
for key, value in pairs(getCustomCompatability(ply)) do
|
||||
values[key] = value
|
||||
end
|
||||
|
||||
// Get custom values or overwrite compatability values
|
||||
if ply.gmIntCustomValues then
|
||||
for key, value in pairs(ply.gmIntCustomValues) do
|
||||
values[key] = value
|
||||
end
|
||||
end
|
||||
return values
|
||||
end
|
||||
|
||||
function ply:gmIntGetCustomValues()
|
||||
return getCustomValues(self)
|
||||
end
|
||||
|
||||
function ply:gmIntGetFPS()
|
||||
return self.gmIntFPS || 0
|
||||
end
|
||||
|
||||
gmInte.restoreFileCache = gmInte.restoreFileCache || {}
|
||||
function ply:getAdjustedTime()
|
||||
if gmInte.restoreFileCache == nil || gmInte.restoreFileCache.sysTime == nil || gmInte.restoreFileCache.playersList == nil then return 0 end
|
||||
if SERVER then
|
||||
if table.IsEmpty(gmInte.restoreFileCache) then
|
||||
if file.Exists("gm_integration/player_before_map_change.json", "DATA") then
|
||||
gmInte.restoreFileCache = util.JSONToTable(file.Read("gm_integration/player_before_map_change.json", "DATA"))
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
else
|
||||
if table.IsEmpty(gmInte.restoreFileCache) then
|
||||
if file.Exists("gmod_integration/player_before_map_change.json", "DATA") then
|
||||
gmInte.restoreFileCache = util.JSONToTable(file.Read("gmod_integration/player_before_map_change.json", "DATA"))
|
||||
else
|
||||
return 0
|
||||
end
|
||||
|
||||
gmInte.restoreFileCache = gmInte.restoreFileCache[gmInte.config.id]
|
||||
end
|
||||
end
|
||||
|
||||
if !gmInte.restoreFileCache.sysTime || !gmInte.restoreFileCache.playersList then return 0 end
|
||||
if (gmInte.restoreFileCache.sysTime + 60 * 5) < (os.time() - self:gmIntGetConnectTime()) then return 0 end
|
||||
if !gmInte.restoreFileCache.playersList[self:SteamID()] then return 0 end
|
||||
return gmInte.restoreFileCache.playersList[self:SteamID()].connectTime || 0
|
||||
end
|
||||
|
||||
if SERVER then
|
||||
gameevent.Listen("player_connect")
|
||||
hook.Add("player_connect", "gmInte:Player:Connect:RemoveRestore", function(data)
|
||||
if table.IsEmpty(gmInte.restoreFileCache) then
|
||||
if file.Exists("gm_integration/player_before_map_change.json", "DATA") then
|
||||
gmInte.restoreFileCache = util.JSONToTable(file.Read("gm_integration/player_before_map_change.json", "DATA"))
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if gmInte.restoreFileCache.playersList && gmInte.restoreFileCache.playersList[data.networkid] then
|
||||
gmInte.restoreFileCache.playersList[data.networkid] = nil
|
||||
file.Write("gm_integration/player_before_map_change.json", util.TableToJSON(gmInte.restoreFileCache, true))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function saveTimeToLocal()
|
||||
local dataToSave = {
|
||||
["version"] = "1.0",
|
||||
["serverID"] = gmInte.config.id,
|
||||
["playersList"] = {},
|
||||
["sysTime"] = os.time()
|
||||
}
|
||||
|
||||
if SERVER then
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
dataToSave.playersList[ply:SteamID()] = gmInte.getPlayerFormat(ply)
|
||||
end
|
||||
|
||||
if !file.Exists("gm_integration", "DATA") then file.CreateDir("gm_integration") end
|
||||
file.Write("gm_integration/player_before_map_change.json", util.TableToJSON(dataToSave, true))
|
||||
else
|
||||
dataToSave.playersList[LocalPlayer():SteamID()] = gmInte.getPlayerFormat(LocalPlayer())
|
||||
local oldData = {}
|
||||
if file.Exists("gmod_integration/player_before_map_change.json", "DATA") then oldData = util.JSONToTable(file.Read("gmod_integration/player_before_map_change.json", "DATA")) end
|
||||
oldData[gmInte.config.id] = dataToSave
|
||||
file.Write("gmod_integration/player_before_map_change.json", util.TableToJSON(oldData, true))
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("ShutDown", "gmInte:Server:ShutDown:SavePlayer", saveTimeToLocal)
|
||||
hook.Add("GMI:SaveBeforeCrash", "gmInte:Server:BeforeCrash:SavePlayers", saveTimeToLocal)
|
|
@ -1,72 +1,44 @@
|
|||
/*
|
||||
Informations:
|
||||
This file is prioritized over the configuration file in data/gmod-integration/config.json until the id are set.
|
||||
This file is prioritized over the configuration file in data/gmod-integration/config.json if id and token are set in this file.
|
||||
We don't recommend to use a static version of our addon, you should use the workshop version instead.
|
||||
|
||||
Add Server:
|
||||
0. Add the bot to your guild if it's not already done: https://gmod-integration.com/invite
|
||||
1. Go to our dashboard and Login with Discord: https://gmod-integration.com/login
|
||||
2. Go to the "Servers" page: https://gmod-integration.com/config/servers and click on "Create Server"
|
||||
3. Copy the ID and Token of your server and paste them in this file
|
||||
4. Everything is ready, you can now restart your server
|
||||
1. Go to our dashboard and Login with Discord: https://gmod-integration.com/login you should be redirected to the dashboard
|
||||
2. Add the bot to your guild and click on "Add to Guild" or select your guild if it's already added
|
||||
3. Go to the "Servers" page and click on "Create Server"
|
||||
4. Copy the ID and Token of your server and paste them in this file
|
||||
5 Everything is ready, you can now restart your server
|
||||
|
||||
To go further, you can check the documentation: https://docs.gmod-integration.com
|
||||
|
||||
WARNING:
|
||||
NEVER SHARE THE TOKEN OF YOUR SERVER WITH ANYONE,
|
||||
IF ANY PROBLEM OCCURS, GO TO OUR WEBSITE AND FOLLOW THE INSTRUCTIONS:
|
||||
https://gmod-integration.com/emergency
|
||||
*/
|
||||
|
||||
//
|
||||
// General
|
||||
//
|
||||
|
||||
// API Connection
|
||||
gmInte.config.id = "" // Server ID
|
||||
gmInte.config.token = "" // Server Token
|
||||
|
||||
// Websocket
|
||||
/*
|
||||
This is a premium feature, you can buy premium on our website: https://gmod-integration.com/premium
|
||||
Websocket allow you to made a real-time connection between your server and our servers.
|
||||
And so use the real-time features of our addon (like the chat syncronization, role syncronization, ...)
|
||||
*/
|
||||
gmInte.config.websocket = false // If true, the addon will use the websocket instead of the http requests
|
||||
|
||||
// Other
|
||||
gmInte.config.forcePlayerLink = false // If true, the addon will force the players to link their discord account to their steam account before playing
|
||||
gmInte.config.supportLink = "" // The link of your support (shown when a player do not have the requiments to join the server)
|
||||
gmInte.config.debug = false // If true, the addon will show debug informations in the console
|
||||
gmInte.config.logBotActions = false // If true, the addon will log the messages of the bot in the console
|
||||
|
||||
//
|
||||
// Syncronization
|
||||
//
|
||||
|
||||
// General
|
||||
gmInte.config.syncChat = false // If true, the addon will sync the chat gmod with a selected channel on discord (need to be enabled on the dashboard)
|
||||
gmInte.config.syncPlayerStat = true // If true, the addon will sync the player stats (kills, deaths, playtime, ...)
|
||||
|
||||
gmInte.config.websocketFQDN = "ws.gmod-integration.com" // The FQDN of the websocket server
|
||||
gmInte.config.apiFQDN = "api.gmod-integration.com" // The FQDN of the API server
|
||||
// Punishment
|
||||
gmInte.config.syncBan = true // If true, the addon will sync gmod bans with discord bans (and vice versa)
|
||||
gmInte.config.syncTimeout = false // If true, the addon will sync gmod timeouts with discord timeouts (and vice versa)
|
||||
gmInte.config.syncKick = false // If true, the addon will sync gmod kicks with discord kicks (and vice versa)
|
||||
|
||||
//
|
||||
// Player Filter
|
||||
//
|
||||
|
||||
// Trust Factor
|
||||
gmInte.config.minimalTrust = 30 // The minimal trust factor of an user to be able to join the server (0 to 100)
|
||||
gmInte.config.filterOnTrust = true // If true, the addon will filter the players according to their trust factor
|
||||
|
||||
// Ban
|
||||
gmInte.config.filterOnBan = true // If true, the addon will filter the players according to their ban status
|
||||
|
||||
//
|
||||
// Features Kill Switch
|
||||
//
|
||||
|
||||
// Will disable the features of the addon
|
||||
gmInte.config.sendLog = false // Disable the logs
|
||||
// Materials
|
||||
gmInte.config.redownloadMaterials = false // If true, the addon will redownload the materials of the addon (useful if you have a problem with the materials)
|
||||
// Debug & Development
|
||||
gmInte.config.debug = false // If true, the addon will show debug informations in the console
|
||||
// Security
|
||||
gmInte.config.forcePlayerLink = false // If true, the addon will force the players to link their discord account to their steam account before playing
|
||||
gmInte.config.verifyOnJoin = false // If true, the addon will verify the players when they join the server or on player ready
|
||||
gmInte.config.verifyOnReadyKickTime = 600 // The time in seconds before kicking a player that is not verified (0 to disable)
|
||||
gmInte.config.verifyFamilySharing = false // If true, the addon will verify the family sharing of the players
|
||||
gmInte.config.clientBranch = "any" // The branch of the addon that the clients should use (none, dev, prerelease, x86-64)
|
||||
// Other
|
||||
gmInte.config.supportLink = "" // The link of your support (shown when a player do not have the requiments to join the server)
|
||||
gmInte.config.maintenance = false // If true, the addon will only allow the players with the "gmod-integration.maintenance" permission to join the server
|
||||
gmInte.config.language = "en" // The language of the addon (en, fr, de, es, it, tr, ru)
|
||||
gmInte.config.adminRank = {
|
||||
// How can edit the configuration of the addon / bypass the maintenance mode
|
||||
["superadmin"] = true,
|
||||
}
|
BIN
materials/gmod_integration/logo_context_report.png
Normal file
BIN
materials/gmod_integration/logo_context_report.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
BIN
materials/gmod_integration/logo_context_screen.png
Normal file
BIN
materials/gmod_integration/logo_context_screen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Loading…
Reference in New Issue
Block a user