Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
397 stars 73 forks source link

[FEAT] Server Admin Console commands #672

Open Airforc opened 3 years ago

Airforc commented 3 years ago

Add commands to the server console for the server admin to manage basic functions:

/listaccts (list all player usernames/emails if supplied during registration, maybe list campaigns that accounts are attached to?) /resetpswd (resets account password to default 1234567890 or something in case of forgotten password) /listcampaigns (list all created campaigns and useraccts that are assigned to dm/co-dm role) /delacct (delete user account, maybe needs some logic if useracct is dm of campaign?) /delcamp (deletes campaign) /chgdm (replace current dm acct with new dm account on already created campaign) /campassets (returns information on space used for campaign assets, probably important for checking what campaign is using space) /chgemail (change usernames email account if email function is used)

dthv commented 3 years ago

@Kruptein if you see this as a valuable feature, I could try to get up a basic python3 tool that does it. Yet, I'm afraid it would probably be outside of the server console, at least at first.

Think of something like ./planarmanager list accs, ./planarmanager list campaigns etc.

Kruptein commented 3 years ago

go for it :)

Kruptein commented 3 years ago

I personally would just use full command words btw list accounts with maybe a shorthand notation like list accs available too, but these commands are not something you have to do often and rapidly so I think it's better to write them out in full.

Airforc commented 3 years ago

@Kruptein @dthv

I have no preference, just something that allows easy maintenance of users/campaigns/assets, some of those commands probably could use additional parameters to specify which account to perform the command on.

I think a separate script is fine, but hopefully over time it gets merged into the main script :)

dthv commented 3 years ago

Oh, I certainly plan (with the permission of our benevolent developer, of course :wink: ) to open a PR into this repository. With outside of the server console I meant that one would use a different shell than the one PA runs in.

Don't expect progress before March, though. Sorry.

Airforc commented 3 years ago

@dthv honestly, if I brush up on my python, I might take a crack at it.

dthv commented 3 years ago

Well, I was about to use this as a mini-project to brush up my python but that shall not hinder you. Feel free. :D

Kruptein commented 3 years ago

Hey there, has any of the two of you been able to do something in this regard? :D

If nobody has the time which is understandable, I can pick it up myself as well

dthv commented 3 years ago

Yes, I've done some preparatory works but nothing to show off. Next time I'll have spare-time to delve back into it will be the first weekend in July, I'm afraid. Sorry. If the issue is critical, I'm happy to give it out of my hands, as I won't deliver a finished product, anyway.

In case it is not critical, though, I'm also very happy to do this and give you the time to do more important stuff. :)

CalebKoch commented 2 years ago

I assume after a few months without activity you weren't still working on this, so I took a stab at this for some of the commands in this issue.

It's all part of the existing launch script currently, but wouldn't be to difficult to move into another one if that would be preferred.