Closed PaloAlo closed 2 years ago
If you want to disable the shout messages being sent, you should change the value in the toggles configuration to disable it.
Set 'Send Player Shout Messages' to false in games.nwest.valheim.discordconnector-toggles.cfg
(doc reference)
I will add some extra case handling for when people have shout messages enabled but a null shout message configured.
This version has a code addition that I think will fix this for you if you leave your settings the same, if you want to try it.
i will try that fix you posted. the issue is i didnt want to have pings or shouts sent to the log, so i left the field blank, but that broke global chat.
in the toggles.cfg i had the option "Chat Shout Messages Notifications = true" but i have now changed it to false.
so, i will test first with the other field "Player Shout Message = " left blank or with "Player Shout Message = %PLAYER_NAME% shouts %SHOUT%. and see if it causes error in log or blocks global chat. but in order to test your zip file i would have to shut down the server and i can't do that for a couple days. i never reboot the server on a weekend, way too many players online.
okay, it working well now. i tested with: "Chat Shout Messages Notifications = false" and "Player Shout Message = %PLAYER_NAME% shouts %SHOUT%. and no probs. also "Chat Shout Messages Notifications = false" and "Player Shout Message = (blank) and that also works no probs. so, it seems the only problem was when i had the toggle set to "true" and the the msg field left blank which caused log errors and broke global chat. if and when i get the time this week i will try to test the file you sent and report back
Thanks for the feedback. I'm pretty confident you outlined exactly why the chat was breaking, with the toggle set true but the message blank. I will try and test the fix I posted with those settings this weekend as well, just to confirm. If that addresses that combination of settings, I think I will have to add a configuration sanity check as well, to run when loaded, to check if there are other mismatching toggle and message settings and put out a message. (The fix I put in place should handle any of those as well, however.)
while we are on topic, theres another issue i was going to mention as well. i was following a discussion in discord about why someone said they wouldnt use your mod, and the coder person said "it's not async and the timeout is way too high. if discord fails to reply for whatever reason, the discord connector blocks the server, until all connected players time out." and then another coder replied "he didn't put webrequest into async? i mean task* ...nvm, i see it now lol. well yeah true, i guess it was hard to write Task.Run"
idk bc im not a coder, but i have seen a lot of the big servers refuse to use your mod, and apparently this above is the reason. me personally i love the functionality of the mod and it works great for me, but i have good hardware, superb internet, and only maybe 25 players so i never run into this issue. but sometimes people DC when connected to my server so who knows. anyyway, maybe you can look into it and decide if its a problem. i hope this is well received, im only sharing what i read because id like to see your mod be the best it can be. thx for all the hard work you put in, its very much appreciated.
sry if maybe i shoulda put this in a separate thread...
Yeah I'll make a new issue for making the request async. I appreciate you sharing, I wouldn't have heard about it otherwise... even though anyone can open an issue or make a pull request for this mod.
In release 1.8.0
hi, im running a modded valheim server and all global chat is blocked on the server. i tried with the vanilla chat client, and also with Chatter mod, but in each case global chat is blocked. people can use local and whisper mode chat, but global is not working. and it looks like discord connector is spitting a lot of errors into my server log.
edit: i had "Player Shout Message = " left blank, because i dont want every single shout msg sent to the server, nor the pings, but when it's blank then global chat is blocked. when i put the option back in then it works and people can shout on the server again. thats not a great option because it causes a whole lot of extra traffic from client to server that i dont want.
so, i spoke to a coder (not a skillset thats in my wheelhouse) and she told me to "Tell the mod author that": https://github.com/nwesterhausen/valheim-discordconnector/blob/bc09926e3853c4ebf569391fde6314e1c5468505/src/DiscordApi.cs#L31-L46
needs to be wrapped in a try-catch{} so that it doesn't stop the rest of the game code from continuing normally.
i hope that information is somewhat useful, and thx for reading this. idk if this is correct or not, but im experiencing issues disabling options in the config which im hoping you can take a look at. Log file entry below showing the error.
LogOutput for discord connector.txt