NexgenDelayUnknownUser mutator

Search, find and discuss about Mutators!
Post Reply
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

NexgenDelayUnknownUser mutator

Post by Buggie »

Tiny and easy mutator.
Make delay for users which come first time to server.
During delay they muted in chat, any attempt make teamkill or teamdamage lead to instant kick.
Map vote blocked too. User not able even open it.
Require Nexgen.

As result:
If you ban some player via Nexgen and he change IP and Nexgen ID, he must wait delay time before he able speak in chat.
Any attempt attack own team lead to instant kick, any deal damage zeroed, deal momentum zeroed (not able push in lava for example).

Any user before send NexgenID limited, so not able use chat and will be kicked on any teamdamage/teamkill.

On attempt write something in chat (or use map vote) user get notice with left timeout for wait.
On timeout end, user get notification message.

This delay work only for users who firstly come with this NexgenID to your server.
After timeout expired, user not need wait anymore, even if connect again.

Database of users IDs not limited in size and must work pretty fast.

Timer for delay work only when user on server. If user not on server, timer stopped and continued after user rejoin.

Install:
1. Configure settings in NexgenDelayUnknownUser.ini.
2. Add to mutator list NexgenDelayUnknownUser.NexgenDelayUnknownUser (or to ServerActors - preferred way) - must be first in list, for block map vote.

Not need add it into ServerPackages.

If you have database of Nexgenids, you can add records by some script which generate info in
NexgenDelayUnknownUserDb.ini

Records look like:

[G_0123456789ABCDEF0123456789ABCDEF]
T=1000
N=NickName1,NickName2,

Where 0123456789ABCDEF0123456789ABCDEF is NexgenID of player without "-".
T - time in seconds spent on server. Must be same or more from DelayMinutes*60 for remove all limitation for this user.
N - names list separated by separator from ini. Default - comma. Optional.
NexgenDelayUnknownUser.zip
(9.22 KiB) Downloaded 11 times
Last edited by Buggie on Wed Jul 20, 2022 9:18 pm, edited 7 times in total.
User avatar
[rev]rato.skt
Adept
Posts: 438
Joined: Mon Aug 16, 2010 1:09 pm

Re: NexgenDelayUnknownUser mutator

Post by [rev]rato.skt »

Very good later i go teste :D
Brazilian Server:
Alma Negra - 34.95.189.187:7777
Classic - madruga.utbr.cf:7777
Duel - x1.utbr.cf:6666
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: NexgenDelayUnknownUser mutator

Post by Barbie »

Thanks for this. :gj:
Two additional things would be nice:
1) A (configurable) welcome message for new players where is explained why they are muted.
2) An optional string variable for each data set where the used player names are stored, divided by a configurable delimiter. Example:

Code: Select all

[G_0123456789ABCDEF0123456789ABCDEF]
t=1000
Names="Peter|Paul|Harry"
AFAIR player names are cut off at a length of 20, so a string has space for at least MaxLen(string) / (len(delimiter) + 20) = 1023 / 21 = 48 entries.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: NexgenDelayUnknownUser mutator

Post by Buggie »

v1

- Faster login sequence.
- Better English in messages.
- Added new options:
bKickOnTeamDamageBeforeLogin=False
bKickOnTeamKillBeforeLogin=False
bStoreNicks=True
NicksSeparator=,
StartMessage=You are on this server for the first time. You must be in the game for at least %d minutes before you can write to the chat. Please, wait.
EndMessage=The waiting time has ended. You can now write to the chat.
MutedMessage=You can't write to chat yet. Please wait %d minutes.
*BeforeLogin options applied before applied actual login data from Nexgen. If nexgen login slow by some reason all players can be affected here, so by default it turn off for reduce impact.

Nicks stored in N field in Db, separated by separator. no any limitation in code. What size engine able write to it, so this is be.
Possible v436 limited to 1023 symbols or even 256.
Possible v469 not limited at all.

You can turn off store nicks, if want reduce db size.

Updated in first post: viewtopic.php?f=7&t=15305

Automatically merged

Make test for v469c - 97 000+ chars for nicks list saved and loaded without any truncate.

Automatically merged

v2

- Show actual wait time in enter message.
- New options:
NicksMaxLength=65535
NicksMaxLength - Nick List truncated to this value on add new nick.

Updated in first post: viewtopic.php?f=7&t=15305
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: NexgenDelayUnknownUser mutator

Post by Barbie »

Found this in log for v2:
Function NexgenDelayUnknownUser.NexgenDelayUnknownUser.CheckGuidInfo:026B) Accessed None 'GuidInfo'
Sometimes one, sometimes two of them just after a player has joined. And not always the same for same player.
---
Also it looks like that the nickname list is not updated for existing entries.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: NexgenDelayUnknownUser mutator

Post by Buggie »

v3

- additional check for None from `new`.

Updated in first post: viewtopic.php?f=7&t=15305

Automatically merged

Barbie wrote: Thu Jul 14, 2022 11:48 pm Also it looks like that the nickname list is not updated for existing entries.
Can not say anything. need more info. Config at least.
Example how it must be. And how be.

And what you mean.
For my tests all fine.

If nick already in list it not added again. And not move to forward.
Items which already in list - ignored for add.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: NexgenDelayUnknownUser mutator

Post by Barbie »

Buggie wrote: Fri Jul 15, 2022 12:55 am
Barbie wrote: Thu Jul 14, 2022 11:48 pm Also it looks like that the nickname list is not updated for existing entries.
Can not say anything. need more info. Config at least.
Example how it must be. And how be.

And what you mean.
For my tests all fine.

If nick already in list it not added again. And not move to forward.
Items which already in list - ignored for add.
I thought the names a player has used would be added to the string "N" of NexgenGuidInfo.
Example: Player named "John" has a GUID of "ABC123".
The record would be

Code: Select all

[G_ABC123]
Names=John,
Next time he joins with the same GUID but with name "Peter".
Then the record would be

Code: Select all

[G_ABC123]
Names=John,Peter,
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: NexgenDelayUnknownUser mutator

Post by Buggie »

v4

- Fix access None.
- Fix Logging Nicks.

Updated in first post: viewtopic.php?f=7&t=15305
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: NexgenDelayUnknownUser mutator

Post by Barbie »

Is it possible to include a prohibition for voting and kicking, too?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: NexgenDelayUnknownUser mutator

Post by Buggie »

I will try it. But this only worked if this mutator be last in mutator list (and first in mutator chain) for able block "mutate" calls to other mutators.

Also this not entirely proper solution. Proper solution must check not only presence player here, but check it activity.
As one suggestion - map vote/kick system able be use only 5 minutes of activity player on server. you must run and shoot. If you not do such, then you not able kick someone or cast vote.
So he must work hard as hell work abuse map vote kick system...
Because he able enter with 10 clones, wait 10 minutes, and make kick majority.
Also enough just vote for shit map, and stay on server, for prevent make majority for revote. Not need do anything.
Also this steal random rewards as well.

Automatically merged

v5

- Block use map vote (user not able even open it). Mutator must be first in list (or at least before map vote).

Updated in first post: viewtopic.php?f=7&t=15305
Post Reply