egebilecen / PZServerDiscordBot

A Project Zomboid Discord Bot written in C# using Discord.NET to manage and execute commands on Project Zomboid Server.
GNU General Public License v3.0
67 stars 14 forks source link

Mod Checker Not Working #20

Closed saro8802 closed 1 year ago

saro8802 commented 1 year ago

Hi, ty for the bot. Atm im using the bot on a dedicated server (windows based) the mod checker is not working we got a mod update but not check came up, i waited 2 circle of setted time, in my case was every 30 minutes. Afetr 1 hour i setted at 5 minutes but anything. Let me know how to help. Maybe if you can put a command to activate this restart could be more easy to find the problem. ty

egebilecen commented 1 year ago

Hey there. There should be a pzbot.log file in the same folder as bot's. Please send it as an attachment. Also, if the mod that is updated either unlisted or private, bot won't detect it. Other than that, I need to check the log file. Also be sure bot has access / permissions in the log channel.

saro8802 commented 1 year ago

Hi, confirm all mod are public, and bot has access to log channel. I upload the log. pzbot.log

egebilecen commented 1 year ago

Ah, okay. So issue with your server is, it isn't located in default server folder which is C:\Users\<username>\Zomboid\Server. Because of this, bot can't find the workshop mod list used in your server. Can you send me your server.bat file? I have an open issue to check alternative server folder by parsing it's content. I will try to implement it in few days. I want to check if it's the same case for you as well.

saro8802 commented 1 year ago

Yeah, i did move my install folder in (D:) i upload the bat. ty server bat.zip

egebilecen commented 1 year ago

Thank you. I will fix this issue today or tomorrow!

saro8802 commented 1 year ago

Nice, tyvmuch! ;)

egebilecen commented 1 year ago

Hey! v1.2.5-beta, I have added the future for supporting updated server locations. Can you check it out and confirm it is working?

saro8802 commented 1 year ago

Sure, testing now.

saro8802 commented 1 year ago

same, Exception: System.IO.DirectoryNotFoundException Message: Impossibile trovare una parte del percorso 'C:\Users\ChiaFarm\Zomboid\Server'. Stack trace: in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) in System.IO.FileSystemEnumerableIterator1.CommonInit() in System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) in System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) in ServerUtility.GetServerConfigIniFilePath() in C:\Documents\Programming\C#\PZServerDiscordBot\src\ServerUtility.cs:riga 19 in Schedules.WorkshopItemUpdateChecker(List1 args) in C:\Documents\Programming\C#\PZServerDiscordBot\src\Schedules\WorkshopItemUpdateChecker.cs:riga 36 in Scheduler.ClockElapsed(Object sender, ElapsedEventArgs e) in C:\Documents\Programming\C#\PZServerDiscordBot\src\Scheduler.cs:riga 66 Date: 18/10/2022 17:54:38 UTC Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker

egebilecen commented 1 year ago

Hmm. Sorry for the inconvenience. Will try to debug the problem.

saro8802 commented 1 year ago

ty

egebilecen commented 1 year ago

Found the issue, fixing it now. Will soon re-release the v1.2.5-beta version.

egebilecen commented 1 year ago

v1.2.5-beta-2 Please give this a try! I hope I didn't mess up something again, haha.

saro8802 commented 1 year ago

Ok, actually it dosen't allow me to download, it says "virus detected" found Wacatac trojan... why??

saro8802 commented 1 year ago

i'm using windows defender, i did download with another pc and tested the file on antivirus, nothing detected, idk why my first pc is blocking this...

saro8802 commented 1 year ago

trying the release now

saro8802 commented 1 year ago

Ok so, i did upload the new version, atm i'm not getting any error, rn i can't upgrade one of my mods to trigger the bot cause im not at home, but as soon when it happens i'll let you know. ty

egebilecen commented 1 year ago

Thank you!

saro8802 commented 1 year ago

not related issue, the bot is telling me to upload to version 1.2.4 cause im currently on the 1.2.5 XD, maybe it's cause is beta? idk

egebilecen commented 1 year ago

Don't worry about that. Version checking system isn't too advanced, haha. If it is older than your version, you can safely ignore. Especially for betas.

saro8802 commented 1 year ago

So, we got an update and the bot seems to be worked as planned! :D let me know if you need some other tests. Waiting for the definitive version! ty

saro8802 commented 1 year ago

Question: is there some way to have a log of what mod did upgrade? So to be able to know what eventually broke the server or just to go check the new updates on steam? ty

egebilecen commented 1 year ago

So, we got an update and the bot seems to be worked as planned! :D let me know if you need some other tests. Waiting for the definitive version! ty

No problem, there isn't any tests needed at this point, thank you again. It may take a week for me to work on new version. Keep an eye on the log channel as bot prints out the new version.

Question: is there some way to have a log of what mod did upgrade? So to be able to know what eventually broke the server or just to go check the new updates on steam? ty

Bot stops checking other mods when it encounters an update for the first time so at the moment, it's not possible. Also there might be cases where a mod getting updated meanwhile server has a pending restart which will cause mod update checker to skip as server will be restarted anyway. So I am not sure how useful it could be but feel free to create an issue about it. I will mark it as enhancement. No promises on it's getting implemented, though.

saro8802 commented 1 year ago

I see your point, generally speaking you know some other ways to get this information? Not related to your bot. ty

egebilecen commented 1 year ago

No idea to be honest. I never managed server myself. :(