KirosHan / Palworld-server-protector-DotNet

Palworld幻兽帕鲁服务端守护+存档备份+内存监控+优雅重启+Rcon指令
Apache License 2.0
180 stars 18 forks source link

Whitelist function #43

Open lorenzo93 opened 8 months ago

lorenzo93 commented 8 months ago

Hi,

I'm Italian and I speak only english (except italian). I've translated your readme using a translator so I'm not sure if I got everything correct. Is there in your software a whitelist function? Is there support for translations? I'm a C# developer and I could help :)

KirosHan commented 8 months ago

Hi @lorenzo93 , thanks for your attention,i am sorry there is no whitelist function now but the localization work for the program is already in the development plan It would be great if you could give me a hand

lorenzo93 commented 8 months ago

I read the code today. Not in depth but I understand how it is programmed. I have some questions:

  1. Do you have your development plan public somewhere?
  2. I'm having some difficoulties opening some of the files because of the encoding., the chinese characters (mainly comments) are not correctly recognised, so if I save the file to make a change it gets corrupted. Which encoding do you use?
  3. If I make some changes to the structure of the project, are you willing to accept a PR? I would want to organize the code in folders/namespaces and extract all the application login from the form so that it could be easier to mantain.
  4. Once point 2 is completed, my main need is to have the whitelist support, so I'm going to implement that part. Is that ok for you to add this functionality?

P.S.: I've started working, you can find the project in my profile (I've forked yours). Let me know what you think :)

KirosHan commented 8 months ago

Firstly, the recent work plan has been somewhat stagnant due to a lack of creative ideas, so there is no additional specific development plan for now. Later on, I will check the encoding, but most of the encoding should be UTF-8. Also, I will accept beneficial all Pull requests including the whitelist function

For users, the operation should be as simple as possible.

KirosHan commented 8 months ago

Can you tell me which files you encounter problems with when opening?

lorenzo93 commented 8 months ago

I had problem with the Form1.cs, but I fixed it opening with chinese encoding and than saving it again in UTF-8. I made a first working version of the Whitelist function, I've refactored all the communication classes (RCON, PalUserInfo, etc). I have also implemented automatic settings reload if disk file changes. If you want, check the code at my repository.

lorenzo93 commented 8 months ago

I modified your code to use the RCON Client I made. I also changed the timers to be on separate threads so if they hang for some reason the app doesn't freeze. Try to compile and test my code, I have probably messed up some chinese strings that I just copied 😄

KirosHan commented 8 months ago

Your code is great! And you can submit a PR when your work is done.If there are no issues, I will accept it. Thanks for your contributions. XD

KirosHan commented 8 months ago

Hi @lorenzo93 , I have accepted your PR and did a simple test, but I found that most of the Rcon functions do not work properly. Currently, only “Broadcast” command can be sent normally, but the echo also shows as sending failed.

lorenzo93 commented 8 months ago

Hi, I've forgot to commit some lines. Now it is working in #47

KirosHan commented 8 months ago

that's okay it is worked😄

lorenzo93 commented 8 months ago

great!

KirosHan commented 8 months ago

hi @lorenzo93 , I have completed some UI localization work. If you're willing, could you help me confirm whether the translations are correct?