View Full Version : Introducing the C-SLAP, the uhh.. C-Sharp Log of Altitude Parser?
Monotone Doppler
06-02-2010, 10:50 PM
Yeah.. So uhh... I just made the name, right now..
Anyway, I was annoyed that Altitude's server console doesn't come with a built in chat log/other stuff in the interface, so I made my own. It's kind of cool!</author bias>
Here's the stuff that it does/will do:
Does
-Logs all servers in separate tabs for easy distinguation(?), as well as all of them in a single tab.
-Logs this stuff:
--Chat messages
--Map changes
--Connections/Disconnections
-Has a player window with up-to-date info about this stuff:
--ID
--Port
--Nick
--Kills
--Deaths
--Team
--Ping
-Lets you put messages and commands into the interface itself
Will do
-Cool ! commands
-Right clicking people and kicking/banning/etc them
-Linked database of player statistics (might even be uploaded to a web server?)
-Be uploaded to my server, so you can download it for your server (?)
-Scriptable commands? =D
-More stuff in the player list box
-Other stuff that I thought of but can't remember
-Other stuff that I didn't think of yet
Won't do
-Other stuff that I won't think of
-Work on a Mac or Linux computer without an emulator
Screenshot:
http://www.gynlorf.com/Images/Altitude Server Console Picture.png
What do you think? Useless? Cool? Stupid? Epic? Medium..?
Download:
-June 3, 2010 -> Download (http://www.gynlorf.com/Projects/C-SLAP/Jun03-2010/C-SLAP.exe)
To use, place the file into the folder that your server_launcher.exe folder is. For example: C:\Program Files\Altitude\
Ajuk999
06-02-2010, 11:02 PM
Wow, I can't wait. Hurry already. By the way, if you need any help, I would love to help.
Monotone Doppler
06-03-2010, 10:48 PM
Added a download link. I'm not sure what version of .NET is required, but I am assuming .NET 3.5. Please tell me about any bugs =)
Also, it parses the log files once for each server, which is something that I might fix, or not, depending on what I plan to do with the server tabs. If you're log.txt file is larger than 2 megabytes, you'll probably want to close the server and delete it, and relaunch the server to increase initial load times. After it does the first pass on the file, you shouldn't experience any wait times.
EDIT: Oh, and one more thing. If you see people in a pink team, make sure to tell me what it says their team is (in the players list), and what their team really is (ingame). Thanks!
Ajuk999
06-03-2010, 10:58 PM
Can you by chance make a copy for MAC ?
Monotone Doppler
06-03-2010, 11:26 PM
Well, seeing as I don't know anything about programming on a mac (tried it several times), and that I coded it in a windows only format, this probably won't go to the mac.
(though if they do ever release the software on an Xbox or Zune, I can port this over -.-)
I really do want to learn how to make Mac software, though. The language just seems a little weird to me.
[J.C.] Technician
06-05-2010, 07:02 AM
could use crossover to run it on mac. go to codeweavers.com. don't even need to buy it. i found out that if you use an app called AppTrap then you can use crossover over and over again. by the way doppler, i have a little knowledge with mac scripting but none whatsoever with windows. just out of curiosity, does windows apps have source codes like mac apps?
tec27
06-05-2010, 10:38 PM
Technician;57122']could use crossover to run it on mac. go to codeweavers.com. don't even need to buy it. i found out that if you use an app called AppTrap then you can use crossover over and over again. by the way doppler, i have a little knowledge with mac scripting but none whatsoever with windows. just out of curiosity, does windows apps have source codes like mac apps?
No, Windows applications are forged out of twigs, rocks, and mud (and occasionally, out of paper and glue as well), so there's no source code involved. Expert bricklayers should have no trouble migrating from Mac to Windows development, but novices should probably apprentice under a more knowledgeable bricklayer before attempting to make the change.
[J.C.] Technician
06-06-2010, 02:10 AM
monotone, i downloaded the c-slap, and put it in my altitude folder, but when i start it up, it says im missing a system.core file of sort or something like that. this is the complete message:
could not load file or assembly 'System.Core, Version=3.5.9.0, Cuulture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependences. the system cannot find the file specified. I have the .net thingy installed version 3.5 sp1. any ideas?
[J.C.] Technician
06-06-2010, 02:58 AM
LOL. This is how bad I am with Windows. I downloaded the wrong .net thingy. I finally found it and got it working.:D It works great! I love it. I can finally manage several servers at once without having to be on all of them. I feel alive and back in power. Thanks Monotone! This is the greatest app I have seen for the servers yet!
[J.C.] Technician
06-06-2010, 03:35 AM
ok, so i found a little issue. I can't right click a name and kick/ban, and if a player joins and leaves then the name stays in the server list. I don't know if it was caused by me shutting down the server or if this is just a plain bug. any ideas?
Firestrike
06-06-2010, 03:41 PM
That sounds great, I hope the work, payed off. I have a mac, so it won't work for me, and I'm probably too stupid to do that emulator stuff, but it looks GREAT! Congratz!
Thanks for making this AFTER we made our server program which does practically all the same and then some ... ..
http://img138.imageshack.us/img138/1835/ihasamega12862704797434.jpg
And btw, for Linux/Mac users: THIS (http://www.mono-project.com/Main_Page)
Monotone Doppler
06-07-2010, 02:23 AM
Alrighty..
@[J.C.] Technician:
If you notice, the right click feature on users is under the "Will do" section in the first post, meaning it's not implemented yet. I'll get that working sometime this week, maybe. As for the second bug, it probably has to do with you restarting the server. I'll see if I can get it to recognize a server restart. For the time being, you can delete log.txt and log_old.txt from your servers folder before you launch the server.
@Boko:
I love how that site has mono written all over it. It makes me feel special in some odd way. Anyway, I'll take a look and see if I can get something worked out, though I would have no way to test on a Linux machine.
Now that I'm done camping, I can get to work and make this better =)
In the process of making this better, make sure it doesn't crash while dumping the old logfile to old_log.txt (or whatever it's called) if you haven't already done that.
Or you could choose to write it in jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaava (mikesol will get this one) so they can integrate it with the server_launcher and it'll be platform independant! (woohoo.)
Monotone Doppler
06-07-2010, 02:43 AM
I never had a problem with it crashing for that reason. It only touches old_log.txt when it first loads (which is why you should delete it if you restart the server to avoid load times). It also detects if the file is empty, and if it is, it pretends nothing happens and starts parsing log.txt from the beginning.
As for Java, no. I'm not a magical guy who can do everything, and I don't like Java, even if it is platform independent.
Fair enough, just curious tho: why touch the old log.txt ?
Monotone Doppler
06-07-2010, 03:25 AM
the old log contains the date and time of when the server was started, and it also might contain things like player connections that the new log doesn't have. The program only deals with it once, though, so it really doesn't matter that much.
Don't know if the log goes all the way back if the server is really busy. The old log might get overwritten and you'll lose the starting lines and other important data. Might want to look into that, I'm too lazy :D
And btw, it's cool http://img143.imageshack.us/img143/7449/thumbsuph.jpg
Monotone Doppler
06-07-2010, 03:33 AM
I'll probably just store the last known startup time into a file and load that until a new one pops up in the logs (usually line 1). I could, however, create server-specific log files. That might be something worth trying.
Tavillion
06-07-2010, 04:38 AM
Monotone: You need to set the program up to check which drive it is on. I run my server off of my E:\ drive, but the program automatically attempts to access the same location on the C:\ drive (which, obviously doesn't exist and causes the program to throw an error). If there's a way to point it to the E drive that I'm missing, please slap me on the back of the head and show it to me, because I can't find it.
In short: Please add multiple hard drive support.
Monotone Doppler
06-07-2010, 04:45 AM
The program attempts to access the logs within the directory that it is running from. Please place it into the same directory that your "servers" folder and server launcher executable are in. The default is "C:\Program Files\Altitude". (The program uses "./servers/log.txt" to access the newest log file)
Tavillion
06-08-2010, 05:09 AM
The executable is located exactly where it is supposed to be located on the E drive. It STILL attempts to access the exact same location on the C drive instead.
http://img21.imageshack.us/img21/8849/altitudefolder.jpg
Monotone Doppler
06-08-2010, 07:34 AM
I'll have to look into that. I don't know why it wouldn't be able to see files on a non-C drive.
Tavillion
06-08-2010, 09:11 AM
I'll have to look into that. I don't know why it wouldn't be able to see files on a non-C drive.
That oddity is, indeed, the reason for my posts :D
Hopefully you can nail down the source of the problem, as I'm rather anxious to take this for a test run!
I guess your problem is in Form1 at UpdateThread():
stream = new FileStream(@"C:\Program Files\Altitude\servers\log.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
How dirty coded of you. :D It's all over that method, so you might want to clear it up.
Monotone Doppler
06-10-2010, 04:19 AM
I didn't leave it like that, did I?
EDIT: No, I didn't.
FileStream logFileStream = new FileStream(Global.LogLocation, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
And in the public static Global class
public const string ConfigLocation = "./servers/launcher_config.xml";
public const string LogLocation = "./servers/log.txt";
public const string OldLogLocation = "./servers/log_old.txt";
Why not just change them to relative paths and see how it will magically work, trust me. :D
Monotone Doppler
06-10-2010, 07:11 PM
those are relative paths
Of course I'm referring to the absolute paths in your code, which are not relative.
Monotone Doppler
06-10-2010, 11:46 PM
I did a quick search of the entire solution, and I did find one absolute path, but it wasn't the one you mentioned. I fixed it. I'll update the download after I make some more changes. =)
It may be possible that I implement some kind of lua system for the commands, but it would be pretty useless considering all you can really do is the built-in commands for the server (though you could make some cool algorithms or something). I want more server customization! >:D
Monotone Doppler
06-21-2010, 08:03 PM
Sorry guys, but I sort of lost interest in this project. If you wish to add on to the project or take it over, you can download the solution below. Thanks for your support.
Download: http://www.gynlorf.com/Projects/C-SLAP/Jun21-2010/Solution.zip
Please don't fight over it ;)
Thanks for posting the source, I'll have a look if there's anything useful I overlooked for the co-op server.
vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.