Hide message
[Infographic] Aggregame has published "1 Year of Gaming Tweets" - the last year of gaming seen through the Tweets of Gamers! Read about it here. 

AGrcon 1.0 - Progress Report!
12 posts • Page 1 of 2 • 1, 2
AGrcon 1.0 - Progress Report!
Hi all,
Welcome to the first Progress Report for AGrcon! I'm JD, and am the author of this remote admin Rcon utility. AGrcon will support Call of Duty 4: Modern Warfare and Call of Duty: World at War with its 1.0 release. After that, who knows what other games it may wind up supporting. It all depends on how much free time I have, as this program will be offered completely free of charge, and is something I build in my spare time for fun & utility.
First, a brief background; AGrcon is an evolution of a program I made a little over a year ago, called "ModernRcon." ModernRcon was the first Remote Rcon utility for Call of Duty 4, releasing mere days after the game's worldwide release. It evolved over 8 iterations, to add a litany of new community-requested features. This ModernRcon platform is the basis for which AGrcon will be built from.
So with the new name, many of the same GUI elements will remain intact, and the overall attention to ease-of-use for the end-user will not be sacrificed. Also, I will look to this community at Aggregame for suggestions for future versions, future features, and for feedback & bug reports on all releases.
So having said that, how's it coming along?
Below are the first screenshots of AGrcon in action. It fully supports CoD:WaW at this point, and I am building in UI elements necessary for users to specify which type of server they are connecting to. For those of you familiar with ModernRcon, you'll know that previously I only asked for the IP, Port, and Rcon Password for you to connect to your servers. Now you'll also have to simply specify the Game as well (CoD4 or CoD:WaW).
(Click to enlarge)

So a running list of features AGrcon will support with its 1.0 release is below. In addition, I may add In-Game chat auto-kick for foul language, Local Ban List for unbanning, and "Name" field for In-Game Chat tab so that players can see which admin is talking to them. This all depends again on my schedule. My main goal is to get this CoD:WaW supported version out the door as quickly as possible, so if any of those features would add significant delays, I will push them back to future versions =).
AGrcon 1.0 Features will include:
Regards,
-JD
Welcome to the first Progress Report for AGrcon! I'm JD, and am the author of this remote admin Rcon utility. AGrcon will support Call of Duty 4: Modern Warfare and Call of Duty: World at War with its 1.0 release. After that, who knows what other games it may wind up supporting. It all depends on how much free time I have, as this program will be offered completely free of charge, and is something I build in my spare time for fun & utility.
First, a brief background; AGrcon is an evolution of a program I made a little over a year ago, called "ModernRcon." ModernRcon was the first Remote Rcon utility for Call of Duty 4, releasing mere days after the game's worldwide release. It evolved over 8 iterations, to add a litany of new community-requested features. This ModernRcon platform is the basis for which AGrcon will be built from.
So with the new name, many of the same GUI elements will remain intact, and the overall attention to ease-of-use for the end-user will not be sacrificed. Also, I will look to this community at Aggregame for suggestions for future versions, future features, and for feedback & bug reports on all releases.
So having said that, how's it coming along?
Below are the first screenshots of AGrcon in action. It fully supports CoD:WaW at this point, and I am building in UI elements necessary for users to specify which type of server they are connecting to. For those of you familiar with ModernRcon, you'll know that previously I only asked for the IP, Port, and Rcon Password for you to connect to your servers. Now you'll also have to simply specify the Game as well (CoD4 or CoD:WaW).
(Click to enlarge)
So a running list of features AGrcon will support with its 1.0 release is below. In addition, I may add In-Game chat auto-kick for foul language, Local Ban List for unbanning, and "Name" field for In-Game Chat tab so that players can see which admin is talking to them. This all depends again on my schedule. My main goal is to get this CoD:WaW supported version out the door as quickly as possible, so if any of those features would add significant delays, I will push them back to future versions =).
AGrcon 1.0 Features will include:
- Feature Parity support for CoD4 & CoD:WaW servers!
- Rcon Limiter! Give clan mates lesser Rcon access!
- Save servers to a server list.
- Realtime in-game chat monitoring! (PBUCON)
- View server information (gametype, map, name, players, etc).
- Kick, Ban, TempBan, Message, Private Message, and monitor players.
- Kick, Ban, Screenshot, and more via PunkBuster controls.
- Restart Map, FastRestart Map, Load next map.
- Load a selected map from a list of maps.
- Load custom maps!
- Config Builder tool for creating server configs.
- Set a new gametype when loading a map from a list.
- Configure all basic settings, including Hardcore mode, Autobalance, Friendly Fire, etc.
- Set or remove server passwords!
- Manually enter commands into the console and read responses.
- Configure all aspects of all supported gametypes.
- View / modify map rotation settings. Easy tools like Rotation Builder exist!
- Send messages to the server.
- Send messages to individual players.
- Setup rotating messages to display to the server on an interval.
- Save message rotations.
- Auto-update player list for easy server monitoring.
Regards,
-JD
Follow me on Twitter: @JD_2020
-

JD_2020 - Community User Level
- Posts: 112
- Joined: Tue Sep 02, 2008 11:44 pm
Re: AGrcon 1.0 - Progress Report!
Oh how I love / hate Regular Expressions.
So today I got to rewrite the regular expression that parses up the player data that the Rcon command "status" returns. So you can get an idea for what kind of logic goes into a regular expression that has to handle something like this, the code is below.
Now what does that do? It takes the raw response data (shown below) and converts it into something that can be nicely inserted into the tables you see on the main AGrcon "Players" tab.
Raw "status" Rcon response
See the subtle difference between the CoD4 and CoD:WaW responses? The "guid" of a player in CoD:WaW seems to be an arbitrary length of digits, ranging from 7 to 10 figures long. The CoD4 GUID of a player is always a 32-character MD5 hash, which was much easier to identify in a regular expression string, believe it or not.
At any rate, that's done now, and my regular expression can identify whether it wants to look for the 32-character GUID, or the shorter one, based on whether "mode" is set to 4 or 5.
Also, see how in CoD4's Rcon response from above, how my player name is ^3CoDHQ ^1JD^7? Well in-game that obviously displays as CoDHQ JD; however, raw Rcon packets cannot carry color with it. It has to show the color codes by their ^[1-9] representations. How do you think I strip those color codes out of the name?
that's right - regular expressions.
See, because there's no definitive location for a ^[1-9] color code operation, I can't just write code that always removes the first X number of characters. Instead, I have to write code that can sniff out each instance of it. Also, since a player can have numbers in his name legitimately, I can't just delete all numbers out of a name. I have to use regular expressions to specifically rip out any occurrence of the ^ followed by a single digit.
Pretty handy eh?
Well Regular Expressions and I have a love-hate relationship. They are an absolute life saver for advanced parsing operations like this, and take what would be a dozen or more lines of code and shrink it down into one, easy, efficient command. Unfortunately, the amount of brain-numbing logic that goes into creating them can get pretty tiresome.
There are Regular Expressions riddled about AGrcon for all the various parse operations. From parsing the above "status" responses, to parsing the server DVARs, to the in-game chat; almost every response the server can give you via Rcon is parsed up in some way - often times with these regular expressions
.
Okay, back to work for me. There's my update for today, with a little edumacation thrown in!
Regards,
-JD
So today I got to rewrite the regular expression that parses up the player data that the Rcon command "status" returns. So you can get an idea for what kind of logic goes into a regular expression that has to handle something like this, the code is below.
- Code: Select all
String regex = "^\\s*(\\d+)\\s+(-?\\d+)\\s+(\\d+)\\s+" + (mode == 4 ? "([a-fA-F0-9]{32})" : "(\\d+)") + "\\s+(.*?)\\s+\\d* (.+?)\\s+[0-9-]+\\s+\\d+\\s*$";
Now what does that do? It takes the raw response data (shown below) and converts it into something that can be nicely inserted into the tables you see on the main AGrcon "Players" tab.
Raw "status" Rcon response
- Code: Select all
CoD4:
map: mp_overgrown
num score ping guid name lastmsg address qport rate
--- ----- ---- -------------------------------- --------------- ------- --------------------- ----- -----
0 -1 104 727ecaba55b4f67b61a64191053438e8 ^3CoDHQ ^1JD^7 50 76.91.155.15:28960 14770 25000
CoD5:
map: mp_seelow
num score ping guid name lastmsg address qport rate
--- ----- ---- ------ --------------- ------- --------------------- ----- -----
0 15000 72 424561414 JD_2020^7 0 76.91.155.15:28960 -3369 25000
See the subtle difference between the CoD4 and CoD:WaW responses? The "guid" of a player in CoD:WaW seems to be an arbitrary length of digits, ranging from 7 to 10 figures long. The CoD4 GUID of a player is always a 32-character MD5 hash, which was much easier to identify in a regular expression string, believe it or not.
At any rate, that's done now, and my regular expression can identify whether it wants to look for the 32-character GUID, or the shorter one, based on whether "mode" is set to 4 or 5.
Also, see how in CoD4's Rcon response from above, how my player name is ^3CoDHQ ^1JD^7? Well in-game that obviously displays as CoDHQ JD; however, raw Rcon packets cannot carry color with it. It has to show the color codes by their ^[1-9] representations. How do you think I strip those color codes out of the name?
See, because there's no definitive location for a ^[1-9] color code operation, I can't just write code that always removes the first X number of characters. Instead, I have to write code that can sniff out each instance of it. Also, since a player can have numbers in his name legitimately, I can't just delete all numbers out of a name. I have to use regular expressions to specifically rip out any occurrence of the ^ followed by a single digit.
Pretty handy eh?
Well Regular Expressions and I have a love-hate relationship. They are an absolute life saver for advanced parsing operations like this, and take what would be a dozen or more lines of code and shrink it down into one, easy, efficient command. Unfortunately, the amount of brain-numbing logic that goes into creating them can get pretty tiresome.
There are Regular Expressions riddled about AGrcon for all the various parse operations. From parsing the above "status" responses, to parsing the server DVARs, to the in-game chat; almost every response the server can give you via Rcon is parsed up in some way - often times with these regular expressions
Okay, back to work for me. There's my update for today, with a little edumacation thrown in!
Regards,
-JD
Follow me on Twitter: @JD_2020
-

JD_2020 - Community User Level
- Posts: 112
- Joined: Tue Sep 02, 2008 11:44 pm
Re: AGrcon 1.0 - Progress Report!
Nice work JD
cant wait to test the new features with CoD WaW
-

jiggly - Community User Level
- Posts: 1
- Joined: Thu Jan 29, 2009 3:47 pm
Re: AGrcon 1.0 - Progress Report!
looking good JD
as i use your rcon 4 cod mw i,m looking forward to thr new rcon from you 
- gunnerfrank
- Community User Level
- Posts: 1
- Joined: Tue Jan 27, 2009 11:24 am
Re: AGrcon 1.0 - Progress Report!
Nice and keep up the great work.
-

StoneyTony - Community User Level
- Posts: 1
- Joined: Mon Feb 02, 2009 8:52 pm
Re: AGrcon 1.0 - Progress Report!
In short, AGrcon 1.0 is 98% complete. As the screenshot below indicates, the program is now compatible with either CoD4, or CoD5, and it is up to the user which server he or she would like to connect to. The only thing I really have left is removing any and all ModernRcon references with AGrcon, and package this puppy up in an installer. Oh, and of course Obfuscate the code first =D (more on why I do that later perhaps).

Today's Java lesson is with inline if's. Like regular expressions (see above), inline if's can sometimes take a pretty serious amount of logic to comprehend, write, and follow. I'm going to try to walk you through it here, and show why it is so powerful in developing a tool like AGrcon.
What is an Inline If?
Wikipedia aside, how would I define an inline if? Well first, I have to explain what an If statement is, in programming lingo. An "If" statement is nothing more than plain old English. "If JD is the author, add him as a friend. Otherwise, kill him!" would translate in Java to:
That code basically says "Is Josh the author?" and if so, it does what is within the first set of brackets. If not, it does what's inside the "else" brackets. In this example, it executes all code contained within the functions "addAsFriend()" or "killJD()" respectively.
Okay, so what an "Inline If" allows for is a similar logical function, but doesn't require 5 lines of code as seen above. It will do it on a single line, and often times within other statements.
That's the literal equivalent of the above if statement. The "?" effectively indicates that you want to compute the previous comparator (the "==" operation is asking whether the variable prior and after are equal to each other). Then everything before the ":" is what executes if the statement was true, and everything after it is what executes if it was false.
Okay so silly examples aside, where is this used in AGrcon?
There's a pretty standard Inline If statement that will be found riddled about AGrcon's source code. In this case, I am writing those Server *.svr files you may remember from ModernRcon. These files hold the information for your CoD4 or CoD5 server (like IP, Port, Label, etc).
This specific line is determining what to place on the very first line in the *.svr file, which is the "Label" of that server (which will display in the Server List for bookmarking your servers). What it effectively is doing is:
Okay, so I can calculate ALL THAT on just a single line? Pretty dope! But what would this have previously required, without my knowledge of Inline If's?
Now I am sure Inline If's also serve some optimization purposes at compile time, which ultimately can make a program run a bit smoother, but I am no computer scientist. I am a hobbyist programmer by night, so I simply use them at their face value - cleaner code, fewer lines, and they're fun!
So what's the most complex Inline If in AGrcon? Hard to say... I don't want to spend too much time looking. But glancing just a few lines above my previous example, I found a pretty hefty one that even took me a few seconds to re-figure out what I was doing
. Enjoy!
This is a single line of code:
(Imagine how many lines of code that'd require fully-expanded!)
Regards,
-JD

Today's Java lesson is with inline if's. Like regular expressions (see above), inline if's can sometimes take a pretty serious amount of logic to comprehend, write, and follow. I'm going to try to walk you through it here, and show why it is so powerful in developing a tool like AGrcon.
What is an Inline If?
Wikipedia aside, how would I define an inline if? Well first, I have to explain what an If statement is, in programming lingo. An "If" statement is nothing more than plain old English. "If JD is the author, add him as a friend. Otherwise, kill him!" would translate in Java to:
- Code: Select all
if( JD == author ) {
addAsFriend();
} else {
killJD();
}
That code basically says "Is Josh the author?" and if so, it does what is within the first set of brackets. If not, it does what's inside the "else" brackets. In this example, it executes all code contained within the functions "addAsFriend()" or "killJD()" respectively.
Okay, so what an "Inline If" allows for is a similar logical function, but doesn't require 5 lines of code as seen above. It will do it on a single line, and often times within other statements.
- Code: Select all
JD == author ? addAsFriend() : killJD();
That's the literal equivalent of the above if statement. The "?" effectively indicates that you want to compute the previous comparator (the "==" operation is asking whether the variable prior and after are equal to each other). Then everything before the ":" is what executes if the statement was true, and everything after it is what executes if it was false.
Okay so silly examples aside, where is this used in AGrcon?
- Code: Select all
out.println("Label: " + (label == null ? (d.sv_hostname == null || d.sv_hostname.equals("") ? myIP + ":" + myPort : parseNames(d.sv_hostname)) : label) );
There's a pretty standard Inline If statement that will be found riddled about AGrcon's source code. In this case, I am writing those Server *.svr files you may remember from ModernRcon. These files hold the information for your CoD4 or CoD5 server (like IP, Port, Label, etc).
This specific line is determining what to place on the very first line in the *.svr file, which is the "Label" of that server (which will display in the Server List for bookmarking your servers). What it effectively is doing is:
- Code: Select all
Has no label been set explicitly? (label == null?)
| If indeed not, has my server's hostname never been declared? (d.sv_hostname == null?) OR is the hostname blank? (d.sv_hostname.equals("")?)
| | If either one of those is the case, set my label as my IP and Port.
| | If neither is the case, that means my hostname is set, so use my Hostname (but first parse out special characters).
| If a label has been set explicitly, just use it.
Okay, so I can calculate ALL THAT on just a single line? Pretty dope! But what would this have previously required, without my knowledge of Inline If's?
- Code: Select all
if( label == null ) {
if( d.sv_hostname == null || d.sv_hostname.equals("") ) {
label = myIP + ":" + myPort;
} else {
parseNames(d.sv_hostname);
}
}
Now I am sure Inline If's also serve some optimization purposes at compile time, which ultimately can make a program run a bit smoother, but I am no computer scientist. I am a hobbyist programmer by night, so I simply use them at their face value - cleaner code, fewer lines, and they're fun!
So what's the most complex Inline If in AGrcon? Hard to say... I don't want to spend too much time looking. But glancing just a few lines above my previous example, I found a pretty hefty one that even took me a few seconds to re-figure out what I was doing
This is a single line of code:
- Code: Select all
PrintWriter out = new PrintWriter(dir + (savedConnect ? serversMap.get(servers.getSelectionPath().getPath()[1].toString()).get(serversMap.get(servers.getSelectionPath().getPath()[1].toString()).size() -1) : (name != null && !name.equals("") ? name + "-" : "") + myIP + "." + myPort + ".svr"));
(Imagine how many lines of code that'd require fully-expanded!)
Regards,
-JD
Follow me on Twitter: @JD_2020
-

JD_2020 - Community User Level
- Posts: 112
- Joined: Tue Sep 02, 2008 11:44 pm
Re: AGrcon 1.0 - Progress Report!
Hi
Been watching this for weeks is ther any more news on this JD?
Been watching this for weeks is ther any more news on this JD?
- Amay_Zing
- Community User Level
- Posts: 3
- Joined: Tue Feb 17, 2009 2:24 am
Re: AGrcon 1.0 - Progress Report!
Hi JD we have been watching this as well
We give the whole clan rcon rights, any idea's on an ish release date
Suggsy
HoFClan.co.uk
We give the whole clan rcon rights, any idea's on an ish release date
Suggsy
HoFClan.co.uk
- Suggsy
- Community User Level
- Posts: 2
- Joined: Thu Feb 19, 2009 7:18 am
Re: AGrcon 1.0 - Progress Report!
Haha, this weekend-ish - had some setbacks but I am reasonably confident in this time frame.
-JD
-JD
Follow me on Twitter: @JD_2020
-

JD_2020 - Community User Level
- Posts: 112
- Joined: Tue Sep 02, 2008 11:44 pm
Re: AGrcon 1.0 - Progress Report!
Looks like JD ran into some more setbacks. Loved the old program. Can't wait for the new one.
- tazman911
- Community User Level
- Posts: 5
- Joined: Sat Feb 21, 2009 3:47 pm
12 posts • Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest






