( search forums )
Testers needed! - [1.2.0 now released!]
Soldat Forums - Soldat Talk - Developers Corner
rusty
March 13, 2005, 11:10 pm
Hey fellow Soldatters,

I'm looking for one or two people to test out my next SARJ release before I release it publicly. For those of you who don't know, SARJ is a server admin utility.

Testers will really need admin access to a Soldat server, and preferably should have a little knowledge of Java or JavaScript to test out the scripting features (although not neccessary). You will also need the Java 1.5 RE for it to run. I would like some people to test on both Windows and Linux.

Any help would be greatly appreciated - please PM your contact details and the OS you use to me within the next day or two.

Thanks in advance :)

Optik
March 13, 2005, 11:30 pm
check email m8, btw SARJ is the best...

Fangus Deef
March 14, 2005, 12:49 am
holy [IMAGE], optik!

AWH_ReApEr
March 14, 2005, 1:16 am
I'd be glad to test it. I'll try contacting you.

[EDIT]
The option to PM you isn't there. =S

Contact details:

Email and MSNM: awh.reaper@gmail.com

I run Windows XP on this system. The sever is run on a Linux system.
[/EDIT]

rusty
March 14, 2005, 8:26 am
Sorry, looks like you have to click on my nick and then 'send email'

AWH_ReApEr
March 14, 2005, 11:47 pm
Email sent. =D

[EDIT]
Everything looks amazing. I did, however find one small bug so far. This was also present in the last version. I run a TDM server, but it says it's Rambomatch. That's the only problem I've found so far. I'll be sure to notify you when/if I find more.

By the way, this has motivated me to learn Java. :)
[/EDIT]

[EDIT2]
I did the /password command, and the connection was closed. I reconnected, did it again, and it worked fine. Don't know if that was a server-side bug or not. Figured I'd let you know.
[/EDIT2]

[EDIT3]
I hope all of these are more helpful than a nuisance. =S

I'm trying to run SARJ on a different computer (Still Windows XP) but I get the error: "Could not find the main class. Program will exit." Then it closes, like it said it would. >.<!
[/EDIT3]

Pulp
March 15, 2005, 3:33 am
Are you sure the SUN java-packet ( Java 1.5 RE ) is installed on that PC, Reaper ? SARJ won't run without.

AWH_ReApEr
March 15, 2005, 6:13 am
Yeah, I'm pretty sure. The old SARJ worked fine on it, though this one seems to require a more recent version than the last. Guess I could check tomorrow. =P

[EDIT]
Yes, another one. >.<

My server seems to be running a little less stable than before. It will randomly give everyone in the server a Connection Timeout, and when they try to rejoin, they can't. In SARJ, though, everything is still looking perfectly fine. So I go to restart my server with SSH, and everyone can join, no problem. I log back in with SARJ, and WHAM! Everyone gets a Connection Timeout again. So, again, I restart with SSH, close SARJ, restart SARJ, log back in, everything is fine and dandy. =S
[/EDIT]

rusty
March 15, 2005, 8:27 am
Thanks for the reports - keep them coming! :)

As for the main class not found error, I switched to Java 1.5 SDK while developing, and unfortunately now it seems to only run in the Java 1.5 runtime environment. If you run it from a command prompt as:

java -jar sarj.jar


you should get a more informative error

quote:I did the /password command, and the connection was closed. I reconnected, did it again, and it worked fine. Don't know if that was a server-side bug or not. Figured I'd let you know.

Strange! Let me know if it happens again.

quote:My server seems to be running a little less stable than before. It will randomly give everyone in the server a Connection Timeout, and when they try to rejoin, they can't. In SARJ, though, everything is still looking perfectly fine. So I go to restart my server with SSH, and everyone can join, no problem. I log back in with SARJ, and WHAM! Everyone gets a Connection Timeout again. So, again, I restart with SSH, close SARJ, restart SARJ, log back in, everything is fine and dandy. =S

Uh-oh! This one is a bit worrying. If it happens again, could you run a packet logger and see if there's any data being sent between the SARJ client and the server admin port during the time that this Connection Timeout happens? It sounds as if something has caused a huge flood of packets to the server, effectively DOSing it. If so, I'll definitely want to fix this before the release.

AWH_ReApEr
March 15, 2005, 11:52 pm
It happened 3 times last night, but I found out someone was hacking my server. Or at least that's the idea I got when someone joined the server, tried logging into admin with a bad password, and the server crashed. After that, the same guy would join the server, and *poof*, server's dead. So I banned his IP and it hasn't happened since.

Also, is it possible to run this from a webserver so my computer doesn't have to constantly be on and logged into SARJ for its WONDERFUL features to be available?

[EDIT]
Okay, the server crashed again (This time, it's apparently because of a bad map change). So, leaving SARJ open, I restarted the server through SSH. I try to reconnect with SARJ, and it says "Connecting..." and never actually connects. I have to restart SARJ to connect again.
[/EDIT]

[EDIT2]
It crashed again, this time for no apparent reason. How do I run a packet logger? =S
[/EDIT2]

[EDIT3]
Very small, nit-picky thing. ;)

The pings are displayed differently in SARJ than they are in the server. I had a clan member join the server, and tell me the ping of someone in there. He said it was between 500 and 750. In SARJ, it said he had about 210.
[/EDIT3]

[EDIT4]
The right click menu is gone. Not sure if you inteded to take it out, but it's gone. =(
[/EDIT4]

rusty
March 16, 2005, 9:27 am
quote:Originally posted by AWH_ReApErIt happened 3 times last night, but I found out someone was hacking my server. Or at least that's the idea I got when someone joined the server, tried logging into admin with a bad password, and the server crashed. After that, the same guy would join the server, and *poof*, server's dead. So I banned his IP and it hasn't happened since.

OK - sadly I don't think I can prevent from this happening if there's someone else involved.

quote:Also, is it possible to run this from a webserver so my computer doesn't have to constantly be on and logged into SARJ for its WONDERFUL features to be available?

Not for this release, I'm afraid. However, since I'm releasing the source code, perhaps someone could make something like this?

quote:[EDIT]
Okay, the server crashed again (This time, it's apparently because of a bad map change). So, leaving SARJ open, I restarted the server through SSH. I try to reconnect with SARJ, and it says "Connecting..." and never actually connects. I have to restart SARJ to connect again.
[/EDIT]

Bad map change? Hmm...I don't think SARJ has anything to do with changing maps.

quote:[EDIT2]
It crashed again, this time for no apparent reason. How do I run a packet logger? =S
[/EDIT2]

If you're on linux you can use tcpdump. Ethereal is also popular and works in Windows.

quote:[EDIT3]
Very small, nit-picky thing. ;)

The pings are displayed differently in SARJ than they are in the server. I had a clan member join the server, and tell me the ping of someone in there. He said it was between 500 and 750. In SARJ, it said he had about 210.
[/EDIT3]

This might just be the result of getting a different 'snapshot' of the ping. SARJ just extracts it from refresh packet - I'm not sure how it's done when in-game. I'll test out what SARJ says against the Soldat Admin tool later and see if they're different.

quote:[EDIT4]
The right click menu is gone. Not sure if you inteded to take it out, but it's gone. =(
[/EDIT4]

Yeah, I noticed that myself yesterday. That's fixed now, so don't worry about it :)

Thanks for the detailed reports - they're helping a lot.

[EDIT]
I've managed to fix a few things and have updated the file. Please download the new one and use that one now (same address). Also, could you run SARJ from the command prompt instead of the jar file? That way you will see useful information spat out from the JVM when things go wrong :) If SARJ is 'crashing', it is likely that an exception has ocurred and it's halted - you just can't see the message unless you run from a console. Remember, the command is:

java -jar sarj.jar

[/EDIT]

Aquarius
March 16, 2005, 9:33 pm
What's new in the new version?

rusty
March 16, 2005, 10:32 pm
quote:Originally posted by AquariusWhat's new in the new version?



Added 'time limit' and 'time left' fields to server information
New integrated scripting engine with JavaScript (EcmaScript) interpreter allows programmed and automated control of the SARJ client.
New 'script buttons' allow buttons to be linked to run a script when clicked
Added scripting events, linkable to script files to be executed
Added timed script support to allow scripts to run at certain times or after certain intervals
Added log console for messages. Use ALT+S to hide/show log console
Added optimisations to make SARJ a lot less CPU intensive
Several minor bug fixes


[IMAGE]

AWH_ReApEr
March 16, 2005, 11:20 pm
quote:Originally posted by rusty
Bad map change? Hmm...I don't think SARJ has anything to do with changing maps.

That was about me having to restart SARJ in order to connect after the server had crashed. Not the bad map change. ;)


quote:Originally posted by rusty
Thanks for the detailed reports - they're helping a lot.

No problem. I enjoy beta testing. =D

quote:Originally posted by rusty
[EDIT]
I've managed to fix a few things and have updated the file. Please download the new one and use that one now (same address). Also, could you run SARJ from the command prompt instead of the jar file? That way you will see useful information spat out from the JVM when things go wrong :) If SARJ is 'crashing', it is likely that an exception has ocurred and it's halted - you just can't see the message unless you run from a console. Remember, the command is:

java -jar sarj.jar

[/EDIT]


I'll give that a shot.

[EDIT]
Okay, I ran it from the console. If something goes wrong, I'll post what I got.

Also, I've been messing around with the scripts, and everything is working out great. Not a single problem with those, yet. Then again, all I've done so far is set up automated server messeges. =/

Anyway, SARJ is looking amazingly awesome. I'll keep you informed with more edits, no doubt. =P
[/EDIT]

Aquarius
March 17, 2005, 9:18 am
quote:Originally posted by rustyquote:Originally posted by AquariusWhat's new in the new version?



Added 'time limit' and 'time left' fields to server information
New integrated scripting engine with JavaScript (EcmaScript) interpreter allows programmed and automated control of the SARJ client.
New 'script buttons' allow buttons to be linked to run a script when clicked
Added scripting events, linkable to script files to be executed
Added timed script support to allow scripts to run at certain times or after certain intervals
Added log console for messages. Use ALT+S to hide/show log console
Added optimisations to make SARJ a lot less CPU intensive
Several minor bug fixes


[IMAGE]


Wow, it looks really really cool, especially the scripting part.
I hope you will include a few script examples in the final version :]

Optik
March 17, 2005, 12:57 pm
yea it was great be4 this one's even better :)

Dathker
March 17, 2005, 11:38 pm
quote:Originally posted by Fangus Deefholy [IMAGE], optik!

<3 him too

AWH_ReApEr
March 17, 2005, 11:41 pm
Well, rusty. The server crashed, but I didn't get anything important in the console. SARJ, however, sent me this:

quote:Connection error: IO Exception while sending data

It seemingly only crashes when people join the game. Whenever I come home and find the server dead, the SARJ console has something like:

"Blahblah joining game (123.123.123.123:12345)
Connection Closed" (Or the error I posted above)

rusty
March 18, 2005, 9:00 am
quote:Originally posted by AWH_ReApErWell, rusty. The server crashed, but I didn't get anything important in the console. SARJ, however, sent me this:

quote:Connection error: IO Exception while sending data

It seemingly only crashes when people join the game. Whenever I come home and find the server dead, the SARJ console has something like:

"Blahblah joining game (123.123.123.123:12345)
Connection Closed" (Or the error I posted above)


I *think* this problem isn't caused by SARJ. I say that because SARJ doesn't have much interaction with the server at that time other than listening over the admin port (that is, unless you have a script running for the onPlayerJoin event). The IO Exception ocurred because something was wrong with the socket - i.e. it was closed by the server. Anyway, it's definitely still something to note. Would this sort of thing happen this frequently before?

Btw, I'm hoping to release 1.2.0 either later on today or at the weekend. The testers will all be credited on the 'about' screen and in the readme :) Please let me know if you'd like your real name there instead of your nickname.

Optik
March 18, 2005, 12:37 pm
hey rusty me again this is weird i loaded up sarj 1.2 today connected to my serv and for sum reason when i right click on a player nothing happens =/ can't really find the reason tried to extract a new copy but i upgraded my java be4 could that be the reason or it's something else ? doesn't seem like anyone else got this prob. tried sarj 1.1 at the same time it works fine

rusty
March 18, 2005, 10:29 pm
quote:Originally posted by Optikhey rusty me again this is weird i loaded up sarj 1.2 today connected to my serv and for sum reason when i right click on a player nothing happens =/ can't really find the reason tried to extract a new copy but i upgraded my java be4 could that be the reason or it's something else ? doesn't seem like anyone else got this prob. tried sarj 1.1 at the same time it works fine


Hmm, I thought I fixed this bug a few days ago. Try re-downloading the zip file (same URL) and see if it still happens.

AWH_ReApEr
March 18, 2005, 11:16 pm
Yeah, just redownload it. It works fine for me.

Anyway, I am running a script using onPlayerJoin. The Soldier Auto-Kicker. However, if I am correct, nothing should go worng unless it's a Soldier that joins the game and the script is read wrong or something. And, no, the server wasn't quite this unstable in the past. I've had it crash 6 times in 4 minutes with SARJ running. =/

rusty
March 19, 2005, 10:40 am
Does the server run on a separate computer to SARJ?

Also, do you have logging enabled on the server? If so, try turning it off.

AWH_ReApEr
March 19, 2005, 11:36 pm
Yes and yes. The server is run on a different computer than SARJ, and I do have file logging enabled. I have to leave it on, though, because I have stats for the server on my site. I'll just put up with the crashing until Big MM can find out what is causing the logs on the linux version to crash. I just saw that he released a new server, so I updated mine and we'll see how it goes.

[EDIT]
Maybe you could have it save the size of the window from last time it was closed. I run a 12-person server, so I have to resize the window every time I start the program. Just another of those nit-picky things. ;)
[/EDIT]

Optik
March 20, 2005, 4:12 pm
yea works ok now rusty just wasn't sure where to dl a newer version :P

AWH_ReApEr
March 21, 2005, 5:26 am
Hey, rusty, what is the player data for player number? Like.. " + PLAYER_NAME + " is the player data for their name. What about for number?

I'm trying to write a script to set the person that says !specme to spectators. Unfortunately, names don't work for that. >.<

[EDIT]
My connection seems to be randomly closing recently. I havn't a clue what's causing it, but every now and then, when I look at SARJ, the connection is closed. o.O
[/EDIT]

rusty
March 21, 2005, 10:14 am
I'm afraid you only get the player name because it's parsed from what you see in the console, i.e. [name] text
What you can do is use the name to get the other details from the player table as an array of Strings using the getPlayerData(name) method. The player number will then be in the array somewhere (corresponding to the column number).

[EDIT]
1.2.0 is now officially released! Go get it at:

[URL]

Optik
March 21, 2005, 11:40 pm
that was q quick beta period like 3 days lol think you shoulda waiting bit more maybe but it's all good still awsome m8 good job once again...

AWH_ReApEr
March 21, 2005, 11:59 pm
quote:Originally posted by rusty
What you can do is use the name to get the other details from the player table as an array of Strings using the getPlayerData(name) method. The player number will then be in the array somewhere (corresponding to the column number).

=O *Confused*

Bah, I'm afraid it's going to take me a while to figure out how to script something like that..

By the way, everyone running a server needs to try this program. Absolute best admin program out there, without a doubt.

You did a great job, rusty. Thanks for letting me help you along the way. =D

rusty
March 22, 2005, 10:31 am
quote:
=O *Confused*

Bah, I'm afraid it's going to take me a while to figure out how to script something like that..

By the way, everyone running a server needs to try this program. Absolute best admin program out there, without a doubt.

You did a great job, rusty. Thanks for letting me help you along the way. =D


Thank you! Your help was very much appreciated also :)
btw I relaise that I didn't give the testers any documentation about scripting in the beta (d'oh!). You should find a file knocked up called scripting.html with the release.

*is off to have a rest from Soldat now :)*

AWH_ReApEr
March 22, 2005, 11:48 pm
A well deserved rest, at that. =P

I'll be trying to do the whole "array of Strings" thing eventually. o.O

Maybe I'll post it when I get it figured out.

[EDIT]
Well, I looked at it, and got further confused. >.<!

I have a good feeling it has something to do with one of the following:

java.lang.String[] getPlayerData(java.lang.String playerName)
-OR-
java.lang.String[][] getPlayerData()

But I don't know what to do with them. =(

*Googles "array of strings"*
[/EDIT]

rusty
March 23, 2005, 3:26 am
Here you go:

[code]mainProgram = Packages.sarj.Sarj.instance();

playerData = mainProgram.getPlayerData("PlayerNameHere");
if(playerData.length > 0)
{
playerNumber = playerData[7];
...
}
else // Name wasn't found for some reason
{
...
}
[/code]

Elephant_Hunter
March 23, 2005, 3:31 am
Is it possible to modify or access files with this scripting?

AWH_ReApEr
March 23, 2005, 6:12 am
Hmmm.. I'll tinker around with that. Thanks!

Hmmmmm... I'm horrible in Java. >.<

What I have so far:

[code] if(toks[0] == "spectate" && toks.length == 1)
{
playerData = mainProg.getPlayerData(PLAYER_NAME);
mainProgram = Packages.sarj.Sarj.instance();

playerData = mainProgram.getPlayerData("PLAYER_NAME");
if(playerData.length > 0)
{
playerNumber = playerData[7];
...
}
else // Name wasn't found for some reason
{
...
}
}[/code]

Don't know where to add (Or if I'm even supposed to)
mainProg.sendData("/setteam5\n");


Arf! I'm sure it's like... way off from what it's supposed to look like.

rusty
March 24, 2005, 12:14 am
quote:Originally posted by Elephant_HunterIs it possible to modify or access files with this scripting?

Yes

Reaper: I put this into onPlayerSpeak.js and it seemed to work:

[code]else if(toks[0] == "specme" && toks.length == 1)
{
playerData = mainProg.getPlayerData(PLAYER_NAME);
if(playerData.length > 0)
{
playerNumber = playerData[7];
mainProg.sendData("/setteam5 " + playerNumber + "\n");
}
else // Name wasn't found for some reason
{
mainProg.writeToConsole("Player name not found: " + PLAYER_NAME + "\n");
}
}[/code]

When I say 'work' I mean it sent the data ok and I saw '/setteam5 1' in the console. However, nothing happened in-game - probably because I didn't have the server configured correctly.

FliesLikeABrick
March 24, 2005, 1:44 am
/setteam5 is only working in all game modes in 2.2.7, in any earlier version it might not work right.

AWH_ReApEr
March 24, 2005, 2:42 am
I'm running 2.2.7.

Aquarius
March 24, 2005, 3:11 am
I've tested it and by some strange reason the script doesn't work when onDataReceived event is enabled. With disabled onDataReceived it works.

Perhaps only one event at one time is allowed? Because player's speech should activate both onDataReceived and onPlayerSpeak.

BTW, I think the unspecme command will be usefull too (I had to change only 3 characters in rusty's code to make it ;]


[code]
else if(toks[0] == "unspecme" && toks.length == 1)
{
playerData = mainProg.getPlayerData(PLAYER_NAME);
if(playerData.length > 0)
{
playerNumber = playerData[7];
mainProg.sendData("/setteam1 " + playerNumber + "\n");
}
else// Name wasn't found for some reason
{
mainProg.writeToConsole("Player name not found: " + PLAYER_NAME + "\n");
}
}
[/code]

AWH_ReApEr
March 24, 2005, 7:12 am
YAY! Thanks a ton, Aquarius! =D