Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord bot spamming on logoffs on 7 days to die #119

Open
reserect opened this issue Dec 20, 2021 · 43 comments
Open

Discord bot spamming on logoffs on 7 days to die #119

reserect opened this issue Dec 20, 2021 · 43 comments
Assignees
Labels

Comments

@reserect
Copy link

Hi apparently the bot spams the discord more than i want when players leave or join the game. other than removing the addon is there a way round this ?

@LakeYS
Copy link
Owner

LakeYS commented Dec 20, 2021

If this is add-on related, there may not be a way to make your configuration fully compatible for Dishorde at the moment.

One thing you could try is resetting the system the bot is running on -- multiple messages can be caused by extra instances of the bot. If this does not fix the problem, and it only affects join/leave messages: in theory, you may disable only these messages with the disable-join-leave-gmsgs.

If you could provide a list of your server's add-ons or modifications, this would be greatly appreciated. I am working on compiling a list of conflicting add-ons so we can look into fixing them.

@reserect
Copy link
Author

Hi the current modlets i have is these
image
The version of the 7days is alpha 20 also checked in the task manager there is no duplicate entries of the bot running i do how ever have 4 seperate instances of 7 days to die servers each have there own bots for it.

@LakeYS
Copy link
Owner

LakeYS commented Dec 21, 2021

Still looking into this -- we just got another report of the same issue in via the support server.

@reserect
Copy link
Author

okay thank you very much :)

@trevorjd
Copy link

Hi Lake, we just have the three mods from Allocs that reserect has. Ver 39 according to the modinfo.xml. We're also running the bot from botman.nz. I think that just works via Telnet which is a possible conflict although probably not as I'm pretty sure it was happening during A20 Experimental before the bot had been updated and linked in. Other telnet users are BattleMetrics RCON and the scheduled announcements via TCAdmin. Otherwise... it's a Win 2016 server with 32G that last ran Windows Update a week or so ago. We're running TCAdmin v2.0.174.0. Also have Conan Exiles and Ark Survival servers. They also use RCON for discord chat but on different ports.

I'm happy to run a debug logging version of the code. The stall is happening a couple of times a day so it shouldn't take too long to get some data.

@LakeYS
Copy link
Owner

LakeYS commented Dec 27, 2021

Has anyone encountered this before alpha 20? I will be testing today to see if we can narrow it down to the latest major version of the game.

@reserect
Copy link
Author

reserect commented Dec 27, 2021

I did have the issue before Alpha 20 just thought i could handle it but still does it. I was using it on wotw before he has not updated it for alpha 20 yet so made a fresh alpha 20 myself :)

@trevorjd
Copy link

I don't recall it happening on A19. If it did, it was obviously rare enough that no one really noticed.

@LakeYS
Copy link
Owner

LakeYS commented Dec 29, 2021

I have successfully reproduced the issue as seen here (The "undefined" is a result of my tinkering):
image

@reserect
Copy link
Author

ReSAlpha20-8K-Map-Test
BOT
— Today at 6:44 PM
Player Nylarlathotep left the game
Player Nylarlathotep left the game
Player Nylarlathotep left the game
Player Nylarlathotep left the game

this ahowed today as well

@LakeYS
Copy link
Owner

LakeYS commented Dec 29, 2021

Interesting -- is it always in sets of four like this?

@reserect
Copy link
Author

reserect commented Dec 29, 2021

one player logged out and it said left game only once but yesterday it was a whole load of info like cross id's and stuff like that.
ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 6:25 PM
Player Ranais left the 2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam______________________', CrossId='EOS_0002f58abb2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam___________________', CrossId='EOS_0002f58abbf14731a7582d409d006817', OwnerID='Steam________________________', PlayerName='Ranais'
2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam___________________', CrossId='EOS_0002f58abb2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam____________________', CrossId='EOS_0002f58abbf14731a7582d409d006817', OwnerID='Steam_______________________', PlayerName='Ranais'
[6:25 PM]
Player Ranais left the game

obviously steam then _____ was there steam id's.

@reserect
Copy link
Author

Them parts would be spammed no end at one point

@LakeYS
Copy link
Owner

LakeYS commented Dec 29, 2021

one player logged out and it said left game only once but yesterday it was a whole load of info like cross id's and stuff like that.
ReSAlpha20-8K-Map-Test BOT — Yesterday at 6:25 PM Player Ranais left the 2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam______________________', CrossId='EOS_0002f58abb2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam___________________', CrossId='EOS_0002f58abbf14731a7582d409d006817', OwnerID='Steam________________________', PlayerName='Ranais' 2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam___________________', CrossId='EOS_0002f58abb2021-12-28T18:25:01 8832.977 INF Player disconnected: EntityID=15068, PltfmId='Steam____________________', CrossId='EOS_0002f58abbf14731a7582d409d006817', OwnerID='Steam_______________________', PlayerName='Ranais' [6:25 PM] Player Ranais left the game

obviously steam then _____ was there steam id's.

This looks similar to issue #118, which is being addressed in the next update.

@reserect
Copy link
Author

okay hopefully in the next update it'll be addressed then just glad it was not just me then. :) i mean it would spam like 10-20 of the same message :)

@LakeYS
Copy link
Owner

LakeYS commented Dec 29, 2021

We have a dev build ready that attempts to remedy some of these issues. Thus far, I have not encountered the issue in this build. However, it needs further testing, and I want to implement some extra anti-spam safeguards before a full release.

Beware that this is a development build and not to be considered stable.

Changelog:

+ 7DTD-Discord is now known as Dishorde. The new name is now used in the bot's files.
+ Added extra safeguards to filter out Discord pings from messages. This means that in-game users can no-longer ping @ everyone, @ here, or other users (via `<@(userid)>`), regardless of the bot's permissions. Attempts to do so now show up with special formatting.
+ Links posted in messages from the game are no-longer clickable.
+ Updated the bot to discord.js v13.
* Internally reworked the way messages from the game are parsed. This should fix issues including console data spilling through to messages.
* Fixed token and login errors not displaying their correct error text.
* Fixed console errors related to the GitHub repository URL.

Dishorde.tar.gz
Dishorde.zip

@reserect
Copy link
Author

thank you very much i will test it if anything and let you know further with it.

@trevorjd
Copy link

Installed the new version about 4 hrs ago.

We're not getting the log-like strings we were getting before. e.g.
Player vetisx left the2021-12-30T09:18:07 11526.597 INF Botman PlayerDisconnected
Player vetisx left the game
Player vetisx left the2021-12-30T09:18:07 11526.597 INF Botman PlayerDisconnected
Player vetisx left the game
Just getting "Player vetisx left the game" now.

Given that I didn't take records, it's hard to say for sure that it's less frequent than before (could just be wishful thinking) but we are still getting repeated messages. Two instances of a double message, once each for 4x and a 16x. All between midday and 4pm Sydney time.

Interestingly, we also got an 8x on a player-generated chat message. I only recall having seen it before on server generated player leaving messages.

I don't know if Discord permits data mining from channels but I'm not opposed to permitting a listener bot if you wanted to get some analytics.

@trevorjd
Copy link

hehe https://i.imgur.com/IvM58F5.png

@trevorjd
Copy link

Ah, this is new. This dev version (may be intentional because it's a dev version!) Dishorde is now echoing stuff that comes from Discord back into Discord.

https://i.imgur.com/mQ3si6D.png

@trevorjd
Copy link

Sorry boss, just got the weird stuff again, too.

8 lots of:

Player 'BigCone' left the2021-12-30T22:56:23 1796.155 INF Botman PlayerDisconnected2021-12-30T22:56:23 1796.155 INF Botman PlayerDisconnected
Player 'BigCone' left the game

@reserect
Copy link
Author

reserect commented Dec 30, 2021

This is all i have been receiving today

Player 'Laura Milne' joined the game
res-gaming-inc-14k-alpha-20-nopw
BOT
— Today at 2:07 AM
Player 'Laura Milne' died
Player 'Laura Milne' died
res-gaming-inc-14k-alpha-20-nopw
BOT
— Today at 2:27 AM
Player 'Laura Milne' died
res-gaming-inc-14k-alpha-20-nopw
BOT
— Today at 2:38 AM
Player 'Laura Milne' died
Player 'Laura Milne' left the game
res-gaming-inc-14k-alpha-20-nopw
BOT
— Today at 5:26 AM
Player 'Laura Milne' joined the game
Player 'Laura Milne' died
res-gaming-inc-14k-alpha-20-nopw
BOT
— Today at 5:43 AM
Player 'Laura Milne' died
Player 'Laura Milne' died
Player 'Laura Milne' died
Player 'Laura Milne' died
Player 'Laura Milne' left the game
Player 'Laura Milne' left the game
Player 'Laura Milne' left the game
Player 'Laura Milne' left the game

@reserect
Copy link
Author

"allow-exec-command": true,
"allow-multiple-instances": true,
"disable-commands": false,
"disable-chatmsgs": false,
"disable-join-leave-gmsgs": false,
"disable-misc-gmsgs": false,
"show-private-chat": true,
"disable-status-updates": false,
"disable-version-check": false,
"hide-prefix": false,
"log-messages": true,
"log-telnet": true,
"prefix": "7d!"
}

@LakeYS
Copy link
Owner

LakeYS commented Dec 30, 2021

Thanks for the reports. I'll make some changes based on what we're seeing today.

I suppose the way I can remedy this in the short-term is to add a detection system so the application identifies when it's trying to send a duplicate message. This is hardly a proper solution, though, and I'd like to figure out the root cause as well.

@LakeYS
Copy link
Owner

LakeYS commented Dec 30, 2021

And another quick-fix for the weird "left" messages, we can validate any message reading as "GMSG" to ensure it contains a whitelisted set of strings, being "died", "left the game", or "joined the game".

This would similarly be a temporary solution, and you would see a warning in console indicating that something is still wrong.

@reserect
Copy link
Author

okay just received this

ReSAlpha20-8K-Map-Test
BOT
— Today at 7:33 PM
Player 'Nylarlathotep' died
[7:33 PM]
Player 'Nylarlathotep' died
[7:34 PM]
Player 'Nylarlathotep' died
[7:34 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died
[7:40 PM]
Player 'Nylarlathotep' died

@LakeYS
Copy link
Owner

LakeYS commented Dec 30, 2021

Ah, this is new. This dev version (may be intentional because it's a dev version!) Dishorde is now echoing stuff that comes from Discord back into Discord.

https://i.imgur.com/mQ3si6D.png

This is a result of some of the new changes to how chat messages are handled. A new config option has been added, disable-non-player-chatmsgs, for this. This should disable all messages not sent by players, i.e. server utilities and console commands included. Still working on a solution to disable only the echoing.

@LakeYS
Copy link
Owner

LakeYS commented Dec 30, 2021

Another pre-release is ready, 2.0.0-rc2. This addresses the hide-prefix issue.

Linux: Dishorde.tar.gz
Windows: Dishorde.zip

@trevorjd
Copy link

Installed 2.0.0.rc2 about 5 hours ago. Still a few double-ups. Got a 4x on someone joining the game
Just got an 8x of funky stuff.
Player 'KIT' left the game2021-12-31T15:09:24 4126.744 INF Botman PlayerDisconnected
[3:09 PM]
Player 'KIT' left the game

@trevorjd
Copy link

Another odd one from chat rather than a logon or logoff.
BulletTestDummy: he sometimes spawns there2021-12-31T20:08:34 7352.129 INF Executing command 'bm-chatplayercolor Steam_76561198075103921 FFFFFF 1' by Telnet from 158.69.27.229:46728

@LakeYS
Copy link
Owner

LakeYS commented Dec 31, 2021

New release candidate to help remedy some problems and better detect others. Instructions and change-log are as follows:

v2.0.0-rc3
+ Updated the config option "debug-mode" with additional logs.
+ Added a new config option: "log-console". This will log all of the bot's console output to a file, console.log, in the bot's folder.
* [22f6835] Fixed issues with the bot failing to detect certain lines from the game's servers. This may help with messages failing to show up for long amounts of time.
* [3d4fc45] Fixed disable-join-leave-gmsgs and disable-misc-gmsgs config options.
* [6f510f9] To remedy message spam issues, the bot now checks for duplicate messages. If found, the message will not be sent, and a warning will appear in the console.

I recommend enabling the new logging functions to hopefully shed some more light on the issues. New logging options can be enabled by adding the following line to your config: "debug-mode": true,. Same for the console file logger. Example below.

image

(To note, the message spam detection works off the messages' timestamps, so it shouldn't catch the same message actually being sent multiple times.)

Downloads:
Windows: Dishorde.zip
Linux: Dishorde.tar.gz

@LakeYS
Copy link
Owner

LakeYS commented Dec 31, 2021

okay just received this

ReSAlpha20-8K-Map-Test BOT — Today at 7:33 PM Player 'Nylarlathotep' died [7:33 PM] Player 'Nylarlathotep' died [7:34 PM] Player 'Nylarlathotep' died [7:34 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died

Do you know if this person died multiple times in a row, or just once? In particular, I'm looking to see if the messages at 7:40 are just echoes of the same one sent at 7:33, or if the person died more than once, and one of the deaths triggered the spam.

@RustLighter
Copy link

RustLighter commented Dec 31, 2021

i used version 1.7.3 on my dc server, with A20 and it works most of the time, but it spams allways on left messages, and doesnt allways send messages, or sends them like minutes or even hours later, i downloaded version 2.0.0 and it didnt work, only messages from the dc to game worked but nothing came back to discord, now in rc3 no spam issue what so ever, but everything typed on dc echoes to dc straight, msg from game works, join/leave works, diemessages dont know yet, messages from dc gets to game, but that echo is annoying.

@LakeYS
Copy link
Owner

LakeYS commented Dec 31, 2021

i used version 1.7.3 on my dc server, with A20 and it works most of the time, but it spams allways on left messages, and doesnt allways send messages, or sends them like minutes or even hours later, i downloaded version 2.0.0 and it didnt work, only messages from the dc to game worked but nothing came back to discord, now in rc3 no spam issue what so ever, but everything typed on dc echoes to dc straight, msg from game works, join/leave works, diemessages dont know yet, messages from dc gets to game, but that echo is annoying.

The current workaround for the echo is to set disable-non-player-chatmsgs to true in config (If using an old config file, you can add the option as a line in config yourself).

The only downside to this is that it will disable all "Server" messages (i.e. if you use the "say" command in console, or possibly mod-based messages)

@trevorjd
Copy link

trevorjd commented Jan 1, 2022

Installed 2.0.0.rc3 about 2 hrs ago. So far so good, haven't noticed any dupes.

Console is full of lines like the following: WARNING: Caught attempting to send a duplicate line from the game. This line will be skipped. Line: 2022-01-01T20:44:29 9507.329 WRN Path node otherHeight bad -0.2100002, ( -865500, 41800, 2676500), ( -865500, 42010, 2676500)

@reserect
Copy link
Author

reserect commented Jan 1, 2022

okay just received this
ReSAlpha20-8K-Map-Test BOT — Today at 7:33 PM Player 'Nylarlathotep' died [7:33 PM] Player 'Nylarlathotep' died [7:34 PM] Player 'Nylarlathotep' died [7:34 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died [7:40 PM] Player 'Nylarlathotep' died

Do you know if this person died multiple times in a row, or just once? In particular, I'm looking to see if the messages at 7:40 are just echoes of the same one sent at 7:33, or if the person died more than once, and one of the deaths triggered the spam.

Sorry for my long reply decided i would go out haha. okay basically they only died the once with that day. as you said though it could have just been it triggering. As he only died the once.

@reserect
Copy link
Author

reserect commented Jan 1, 2022

The bot is not spammed hardly at all over the past couple of days. not as much as it was doing.
ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 1:58 PM
Player 'Nylarlathotep' joined the game

ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 2:36 PM
Player 'Nylarlathotep' left the game
[2:36 PM]
Player 'Nylarlathotep' left the game

ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 4:42 PM
Player 'Nylarlathotep' joined the game

ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 5:11 PM
Player 'Booty' joined the game

ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 5:21 PM
Booty: saw that

ReSAlpha20-8K-Map-Test
BOT
— Yesterday at 8:50 PM
Player 'Nylarlathotep' left the game
[8:50 PM]
Player 'Booty' left the game
January 1, 2022

ReSAlpha20-8K-Map-Test
BOT
— Today at 2:59 PM
Player 'Nylarlathotep' joined the game
NEW

ReSAlpha20-8K-Map-Test
BOT
— Today at 4:07 PM
Player 'Nylarlathotep' died

@LakeYS LakeYS self-assigned this Jan 1, 2022
@LakeYS LakeYS added the bug label Jan 1, 2022
@RustLighter
Copy link

how i cant get death messages to those like "was eaten alive by a mountainbear" or something, it says only "died"?

@trevorjd
Copy link

trevorjd commented Jan 2, 2022

@RustLighter Please keep questions relevant to this particular bug (which is about repeats/spam in the chat).

To address your question, that appears to be a change in the game. I looked in the main output_log.txt, it only records "Player XYZ died." So Dishorde / 7DTD-Discord doesn't know the reason, so it can't report it.

@LakeYS
Copy link
Owner

LakeYS commented Jan 4, 2022

Another release candidate ready. Here's the rundown:

+ Messages from Discord now use nicknames, if any, rather than Discord names.
* Added a workaround for quotes causing messages to be cut off (Quotes are removed)
* [46d1ea6, 02c6d84, eb70828] More improvements to the way the bot detects lines from the game's console. This should remedy issues including message spam, message cutoff, and console data spilling into messages. 

Windows: Dishorde.zip
Linux: Dishorde.tar.gz

@trevorjd
Copy link

trevorjd commented Jan 5, 2022

Installed, thank you! Confirmed that nicknames and quotes are being processed as expected.

@RustLighter
Copy link

RustLighter commented Jan 5, 2022

tested today the new rc4, some of the messages from the dc to game wont come in, and left msg echoing making string is still there, also in like 30minutes rc4 losts connection and doesnt respond on 7d! commands or anything

@LakeYS
Copy link
Owner

LakeYS commented Jan 11, 2022

The release candidate builds have now been rolled out as one full release, 2.0.0. Some additional fixes are included in it. Please defer any issue reports to the new full release build. Further changes will be released in additional patches as needed.

https://github.com/LakeYS/Dishorde/releases/tag/v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants