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

Admin Tools Needed #5388

Open
LordNex opened this issue Oct 14, 2018 · 39 comments
Open

Admin Tools Needed #5388

LordNex opened this issue Oct 14, 2018 · 39 comments
Labels
enhancement FAQ Instructions to fix problems server

Comments

@LordNex
Copy link

LordNex commented Oct 14, 2018

I can see a huge need for Administration tools such as the ability to reset user passwords or email addresses, kicking or banning problem users. Closing Stuck Tables, and general moderation of the server. The server registration becomes a problem as if a user forgets their password or looses access to their email address, they basically have to create a whole new account.

LoRd_NeX
www.powersofwar.com

@JayDi85
Copy link
Member

JayDi85 commented Oct 14, 2018

There are already server admin tool available with users mute/block, tables close, global message broadcast. It's not distributed with xmage client/server zip, but can be build from source code. Hmm...

shot_181015_024941

@LordNex
Copy link
Author

LordNex commented Oct 14, 2018

Im just starting to learn JavaScript. Im pretty well versed in HTML and CSS and just starting to get my feet wet with Java but im still really green. Is there any "how too" or walk through on how to do this?

@JayDi85
Copy link
Member

JayDi85 commented Oct 14, 2018

I'm was builded current version. You can download admin console files from that link. Extract it to launcher dir (I'm put launcher file for dirs tree info).

You need:

  • update xmage (download client and java files from launcher);
  • download and extract admin panel files from zip to launcher folder;
  • run server with additional special command line: -adminPassword=your_secret_password;
  • run admin panel and connect to server.

You can find full scripts to run server and admin panel at zip file too.

@JayDi85
Copy link
Member

JayDi85 commented Oct 14, 2018

Command scripts example to run from launcher folder (for Windows).

Run server with admin password: run-z-server-service.cmd

set SERVER_DIR=.\xmage\mage-server
set JAVA_DIR=.\java\jre1.8.0_181\bin
pushd %CD%

cd /d %JAVA_DIR%
set JAVA_DIR=%CD%

popd
cd /d %SERVER_DIR%
set SERVER_DIR=%CD%

cd /d %SERVER_DIR%

%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage-server-1.4.31.jar -adminPassword=123

Run admin panel : run-z-server-admin.cmd

set SERVER_DIR=.\xmage\mage-admin
set JAVA_DIR=.\java\jre1.8.0_181\bin
pushd %CD%

cd /d %JAVA_DIR%
set JAVA_DIR=%CD%

popd
cd /d %SERVER_DIR%
set SERVER_DIR=%CD%

cd /d %SERVER_DIR%

%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.31.jar

@LordNex
Copy link
Author

LordNex commented Oct 14, 2018

Ok i modified my start batch script that gets fired off as a Windows Service and added the "-adminPassword=your_secret_password;" to the end of the call to start the server. and set a specific password.

So now I need to create 2 batch scripts shown above in the same directory as the startMage.bat file I use to start the server? Then Run those and connect with the admin pass I chose?

@LordNex
Copy link
Author

LordNex commented Oct 14, 2018

Just so you know. I'm not using the launcher to start the server. I'm using a batch script that has been configured to run as a Windows Service

@JayDi85
Copy link
Member

JayDi85 commented Oct 14, 2018

You can run admin panel from your PC. Server needs only special command with admin password setup. All other scripts must run from client side (run it with same code as xmage client).

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

I cant seem to find %SERVER_DIR%\lib\mage.server.console-1.4.31.jar on the server or locally on my PC. Is this something I need to download from GitHub? The link in your above post goes 404

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

Got the link, had to copy and paste it to a new window

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

Well I got the admin console to fire up but got the following when I attempted to connect to my server. Im pretty sure the server started with the admin password flag added so im not sure if this is something else or if it didnt gab the password flag right

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

xmageadminerr

@JayDi85
Copy link
Member

JayDi85 commented Oct 15, 2018

It's can be a wrong password. Look at server's logs for error message.

shot_181015_045133

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

Yea thats what its doing. I am using an @ sign in the password, Could that be throwing it off?

@LordNex
Copy link
Author

LordNex commented Oct 15, 2018

Got it!

Went through and had to modify the actual service with a command argument. That did it. I put the AI back in and will continue to monitor it

Thanks again for all your help bro!. Hopefully the better I get with Java the more I'll be able to contribute!

@LordNex
Copy link
Author

LordNex commented Feb 3, 2019

Is this something that has to be recompiled with each new version? Havent been able to get my console to work again since the latest updates. And ive had some issues lately with users that need kicked for various reasons

@JayDi85
Copy link
Member

JayDi85 commented Feb 3, 2019

Yes, it's must be recompiled. Or try that:

  • Download console file from here;
  • Put it to .\xxx\xmage\mage-server\lib folder;
  • Create run-admin.cmd text file in launcher folder;
  • Insert that line to it and save as ANSI format:
set SERVER_DIR=.\xmage\mage-server
set JAVA_DIR=.\java\jre1.8.0_201\bin
pushd %CD%
cd /d %JAVA_DIR%
set JAVA_DIR=%CD%
popd
cd /d %SERVER_DIR%
set SERVER_DIR=%CD%
cd /d %SERVER_DIR%
%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.33.jar

P.S. it's a windows file. If you have linux then can do same commands or take startServer.sh script from mage-server folder and change it to run mage.server.console-1.4.33.jar instead mage-server-1.4.33.jar

@siyiye
Copy link

siyiye commented Aug 11, 2019

@JayDi85
Copy link
Member

JayDi85 commented Aug 11, 2019

@siyiye
Copy link

siyiye commented Aug 23, 2019

Use that link: http://xmage.today/X/mage.server.console-1.4.37.jar

set` SERVER_DIR=.\xmage\mage-admin
set JAVA_DIR=.\java\jre1.8.0_201\bin
pushd %CD%

cd /d %JAVA_DIR%
set JAVA_DIR=%CD%

popd
cd /d %SERVER_DIR%
set SERVER_DIR=%CD%

cd /d %SERVER_DIR%

%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.37.jar

run "run-z-server-admin"——The DOS window appears, it is closed immediately, and the control panel is not open.

@JayDi85
Copy link
Member

JayDi85 commented Aug 23, 2019

Add at the end of file: pause to see error message after run. Maybe wrong path or missing files (you must copy that lib file after each update).

@siyiye
Copy link

siyiye commented Aug 23, 2019

1111111

Add at the end of file: pause to see error message after run. Maybe wrong path or missing files (you must copy that lib file after each update).

Error: Cannot find or can't load main class mage.server.console.ConsoleFrame

@JayDi85
Copy link
Member

JayDi85 commented Aug 23, 2019

Don't use admin tools (it's outdated). Download full release and copy mage.server.console-1.4.37.jar to xmage\mage-server\lib\ folder and use same run command file. That's all.

@siyiye
Copy link

siyiye commented Aug 23, 2019

Oh~i know!!!

1111

@siyiye
Copy link

siyiye commented Aug 26, 2019

@JayDi85

New question:
I changed the java path of xmage (directly using the system installed java)
Edit the corresponding path in "service.cmd" like this:

set SERVER_DIR=D:\GAME\Magic\Xmage\bin\Xmage-Release\mage-server
set JAVA_DIR=C:\Program Files\Java\jre1.8.0_191\bin

pushd %CD%

cd /d %JAVA_DIR%
set JAVA_DIR=%CD%

popd
cd /d %SERVER_DIR%
set SERVER_DIR=%CD%

cd /d %SERVER_DIR%

java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.37.jar -adminPassword=123

The console appeared after running, but the server process was not running. (Just like only running "admin.cmd" directly.)
111

Normal should be like this:
222

How do I get it to work? THX

@JayDi85
Copy link
Member

JayDi85 commented Aug 26, 2019

Run server:

set SERVER_DIR=D:\GAME\Magic\Xmage\bin\Xmage-Release\mage-server
set JAVA_DIR=C:\Program Files\Java\jre1.8.0_191\bin

cd /d %SERVER_DIR%
%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage-server-1.4.37.jar -adminPassword=123

Run admin tools:

set SERVER_DIR=D:\GAME\Magic\Xmage\bin\Xmage-Release\mage-server
set JAVA_DIR=C:\Program Files\Java\jre1.8.0_191\bin

cd /d %SERVER_DIR%
%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.37.jar

@siyiye
Copy link

siyiye commented Aug 26, 2019

THX!
but fix it:JAVA_DIR="xxxx"

Run server:

set SERVER_DIR=D:\GAME\Magic\Xmage\bin\Xmage-Release\mage-server
set JAVA_DIR="C:\Program Files\Java\jre1.8.0_191\bin"

cd /d %SERVER_DIR%
%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage-server-1.4.37.jar -adminPassword=123

Run admin tools:

set SERVER_DIR=D:\GAME\Magic\Xmage\bin\Xmage-Release\mage-server
set JAVA_DIR="C:\Program Files\Java\jre1.8.0_191\bin"

cd /d %SERVER_DIR%
%JAVA_DIR%\java.exe -jar %SERVER_DIR%\lib\mage.server.console-1.4.37.jar

@siyiye
Copy link

siyiye commented Sep 10, 2019

Use that link: http://xmage.today/X/mage.server.console-1.4.37.jar

pls,update “mage.server.console-1.4.38.jar”

THX~!

@JayDi85
Copy link
Member

JayDi85 commented Sep 10, 2019 via email

@siyiye
Copy link

siyiye commented Sep 11, 2019

Try to rename file name from 37 to 38. It's must work fine (new release do not have changes in client-server connection). If not help then I'll build new one.

I test rename file,but it can't work

@JayDi85
Copy link
Member

JayDi85 commented Sep 11, 2019

@JayDi85
Copy link
Member

JayDi85 commented Sep 27, 2019

@JayDi85
Copy link
Member

JayDi85 commented Nov 29, 2019

@JayDi85
Copy link
Member

JayDi85 commented Dec 21, 2019

@JayDi85
Copy link
Member

JayDi85 commented Jan 9, 2020

@ChoochTheAnimalSteel
Copy link

Is there an updated version of the admin tools for version 1.4.43. I tried using the old version of the admin tools with 1.4.43 and it fails upon launching with:
Error: Could not find or load main class mage.server.console.ConsoleFrame

@JayDi85
Copy link
Member

JayDi85 commented Jun 21, 2020

@JayDi85 JayDi85 added the FAQ Instructions to fix problems label Jun 21, 2020
@JayDi85
Copy link
Member

JayDi85 commented Jul 10, 2020

@siyiye
Copy link

siyiye commented Nov 7, 2023

where is new “mage.server.console” version?

@JayDi85
Copy link
Member

JayDi85 commented Nov 7, 2023

@siyiye try to use link above. If it doesn't work then report — I’ll update. You don't need to update it after each new release/beta.

JayDi85 added a commit that referenced this issue Mar 22, 2024
* added game ids and created time to tables list;
* added popup hints support to tables list;
* fixed wrong sorting and columns resizing in tables list;
* refactored some modules to share table related code between client and admin console;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement FAQ Instructions to fix problems server
Projects
None yet
Development

No branches or pull requests

4 participants