Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
INI Checking tool
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  FACTs SRC? Post :: Post SubSpace NewsMaker  View next topic  
Author Message
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Dec 09, 2003 6:19 pm    Post subject: INI Checking tool Reply to topic Reply with quote

Here's a program inspired by this post. It's open source (the source is in the zip) and all it does is check your server.ini and subbill.ini for common errors. (They must be in the same directory as the program.) It's very un-userfriendly (command line interface), but gets the job done. This is probably all I'll do on it for a while, so feel free to add on to it! Please post any new versions/suggestions here.

Cyan
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.




INIcheck.exe, inicheck.cpp

INIcheck.zip - 14.34 KB
File downloaded or viewed 116 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Wed Dec 10, 2003 12:32 am    Post subject: Reply to topic Reply with quote

You could check for an argument to your program (if (argc > 1)), and assume that the inputted file is which directory you wish to check. So instead of using the current directory, you can split the inputed file (argv[1]) after the last \ or /, and then tack on the server.ini/subbill.ini. This way, it will work if they check either file.

Looking good. I'm sure others can suggest some more doh! type checks.
Back to top
View users profile Send private message Add User to Ignore List Send email
stuperfied
Novice


Age:45
Gender:Gender:Male
Joined: Dec 05 2003
Posts: 37
Location: wollongong
Offline

PostPosted: Wed Dec 10, 2003 7:51 am    Post subject: Reply to topic Reply with quote

Well I cant help with that Mine GO BOOM as im not that good with C++ but I did some work on the [Directory].IP bit. I dont have a compilar and seeing as im not that good with C++ can someone please check this and if its ok compile it and post in this thread? Thanx.



I updated the version too, hope that is how its done.

inicheck.cpp - 4.01 KB
File downloaded or viewed 52 time(s)


Last edited by stuperfied on Wed Dec 10, 2003 8:06 am, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Plody
Guest


Offline

PostPosted: Wed Dec 10, 2003 7:59 am    Post subject: Reply to topic Reply with quote

That should work, I havent tried it, just read it. However, I wouldnt putz around with the directory part, as they may have a diferent order or whatever, or may not wish to list at all as most people generally do.

Try making it check for malicious settings. For example, setting Minimum Vitual to 0 can crash the server.
Back to top
stuperfied
Novice


Age:45
Gender:Gender:Male
Joined: Dec 05 2003
Posts: 37
Location: wollongong
Offline

PostPosted: Wed Dec 10, 2003 8:11 am    Post subject: Reply to topic Reply with quote

Thanx Plody. The purpose is to assume that the user does not know about these settings and correct any errors the user may have made. That directory ip is a big one that can stop their site being listed, hence they come in here and ask why. If they know what they want it set to they can just change it back afterwards. Good call on the malicious settings too Plody.

Was I supposed to put "* edited by stuperfied" in there too or not? If so can the person who compiles it for me put that in too? Thanx.
Back to top
View users profile Send private message Add User to Ignore List
50% Packetloss
Server Help Squatter


Age:39
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Wed Dec 10, 2003 1:37 pm    Post subject: Reply to topic Reply with quote

Nice! I get noobies asking me about this stuff all the time.

Code: Show/Hide
      WritePrivateProfileString("Directory", "IP", "sscentral.subspace.inet.fi,sscentral.ds98.com,sscentral.subspacehq.com,sscentral.subspace.net", spath);

Isnt ds98.com and subspace.net not up anymore?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
1stStrike
Cute like a kitty


Joined: Dec 28 2002
Posts: 426
Offline

PostPosted: Wed Dec 10, 2003 2:45 pm    Post subject: Reply to topic Reply with quote

When you get this app finalized a bit more, let me know and I'll put it on the ssi site so users can DL it.
Back to top
View users profile Send private message Add User to Ignore List
stuperfied
Novice


Age:45
Gender:Gender:Male
Joined: Dec 05 2003
Posts: 37
Location: wollongong
Offline

PostPosted: Wed Dec 10, 2003 3:44 pm    Post subject: Reply to topic Reply with quote

I wouldnt know 50% Packetloss, I just coppied it off the server help index and assumed that info was upto date. Please feel free to make corrections wherever needed.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Dec 10, 2003 5:01 pm    Post subject: Reply to topic Reply with quote

I dunno about the whole Directory server thing, as someone may have it in a different order or maybe an extra server that's not so common or whatever. I changed it to
Code: Show/Hide
if (strcmp(server.dip, "") == 0)
{
   printf("Directory IP set to \'sscentral.subspace.inet.fi,sscentral.subspacehq.com\'\n");
   WritePrivateProfileString("Directory", "IP", "sscentral.subspace.inet.fi,sscentral.subspacehq.com", spath);
   error = true;
}
so it'll only add that in when there's no directory server entries. And also subspace.net and ds98.com are down so I took em off.
And I don't think I'll add in the MinimumVirtual thing (or at least not yet) since that would mean loading CFGs too, and right now it's just an INI checker. And doesn't FACTS check for that setting anyway? Every server owner should have FACTS. icon_razz.gif

Also, I think the arguments thing would be too easy for a 'server newb' to mess up somehow and it's probably just easier anyway to put the exe in your server directory.

Thanks for all of your suggestions! icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
ExplodyThingy
Server Help Squatter


Age:37
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Wed Dec 10, 2003 7:48 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:

And I don't think I'll add in the MinimumVirtual thing (or at least not yet) since that would mean loading CFGs too, and right now it's just an INI checker. And doesn't FACTS check for that setting anyway? Every server owner should have FACTS. icon_razz.gif


Good point. I really ought to put it into my converter program, which deals with that very file. However, if the settings sucked or were untested, would someone really be converting them?

I sense someone should make a settings checker. I would if it werent midterm time.

However, you should make an optional parameter thing. If it runs and there are no parameters, check the files in that folder. The optional parameter should be a directory. Make it take that directory and prefix it to the files. Much easier, lets simple one-timers use it, and lets server owners double check their settings without moving around an exe.
_________________
There are no stupid question, but there are many inquisitive idiots.
Loot

Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Dec 11, 2003 8:42 pm    Post subject: Reply to topic Reply with quote

OK I added command-line arguments.
You can get the latest binary and source at my website, to save space on this forum. (Click the open-source link for the source.)

I also decided on a little rule about version numbers. So the number doesn't start skyrocketing, I say put a letter on the end if you add a check or two, and bump up the minor version for anything else. Therefore this new version is .2 and stuperified's is .1a.
Also (again to save space), when submitting a new check or two, just post it up in a [code] box and I'll put it up on my website. But if it's a big change, you mightn't as well just put up the new cpp file.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Dec 11, 2003 10:07 pm    Post subject: Reply to topic Reply with quote

I've always liked skyrocketing version numbers icon_smile.gif. When I was using CVS for my bot, I got to version .65 before my computer decided it didn't like CVS.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Thu Dec 11, 2003 10:10 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
to save space on this forum


I have no problems with you updating your files here, as it is pretty small anyways.
Back to top
View users profile Send private message Add User to Ignore List Send email
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Dec 12, 2003 6:00 pm    Post subject: Reply to topic Reply with quote

Well I figured if a lot of people start getting active in this, there'll be a lot of inicheck.cpp files sitting around here icon_razz.gif

And since I have a website anyway, mightn't as well use it.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
stuperfied
Novice


Age:45
Gender:Gender:Male
Joined: Dec 05 2003
Posts: 37
Location: wollongong
Offline

PostPosted: Mon Dec 15, 2003 5:38 am    Post subject: Reply to topic Reply with quote

Which compilar do you use Cyan~Fire and where can I download one?
Back to top
View users profile Send private message Add User to Ignore List
ExplodyThingy
Server Help Squatter


Age:37
Gender:Gender:Male
Joined: Dec 15 2002
Posts: 528
Location: Washington DC
Offline

PostPosted: Mon Dec 15, 2003 4:11 pm    Post subject: Reply to topic Reply with quote

There is a free one at bloodshed.com, called dev-c++
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Dec 15, 2003 6:42 pm    Post subject: Reply to topic Reply with quote

I use MS Visual C++ 6. Snag yourself a copy (legally, if possible icon_razz.gif) if you wanna do a lot of Windows programming.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Dec 18, 2003 5:19 pm    Post subject: Reply to topic Reply with quote

VS.net is 1337
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Dec 18, 2003 5:31 pm    Post subject: Reply to topic Reply with quote

It may be, but then again its HUGE compared to 6.
And it's infected with the new .NET languages (C# bleh)!
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
stuperfied
Novice


Age:45
Gender:Gender:Male
Joined: Dec 05 2003
Posts: 37
Location: wollongong
Offline

PostPosted: Thu Dec 18, 2003 7:02 pm    Post subject: Reply to topic Reply with quote

I downloaded ms visual c++ and im going through the help files now, any idea of a better, easier and faster way to learn the language? If you know of one im listenning, I havent found a better one yet but im allways open to suggestions.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Dec 18, 2003 7:18 pm    Post subject: Reply to topic Reply with quote

www.cplusplus.com
It has all the basics.

Another really good way is looking at people's code. This INICheck program is really basic, try understanding every little thing it does and it'll help you out a lot.

BTW: I added a check on the existence of the two files. Files on my website are now updated to version .2a
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Fri Jan 09, 2004 1:52 pm    Post subject: Reply to topic Reply with quote

I decided to try this out.

I tried this: 'inicheck.exe subbill.ini server.ini' and it doesn't seem to be reading subbill.ini at all. I also tried switching the args around (server.ini subbill.ini) which gives me the same results.

When I do this: 'inicheck' and add 1 to Misc:Port (now 901) in subbill.ini windows gives me an illegal operation. I also make sure my sysop passwords differ and it gives no error (because it doesn't matter?).

I think the program should print to the screen contact details of where to send comments and the server version it is compatible with (1.34.xxx).

I got this error 'Missing DefaultLevelFile. Please set one.' but it didn't tell me which file to correct, or which [Section] in the file. I also have Misc:DefaultLevelFile already set in server.ini.

I got this error 'Billing IP set to 'localhost'', does that mean it is set to localhost, or should be set to localhost? This was when I had it set as an IP in server.ini.

In the readme it says:
Quote:
Checks server.ini and subbill.ini for common errors and corrects them
Does it really write back to the file, and if so what about implementing a command line switch and confirmation whether it should do so (ok so any decent operator should keep backups in the first place).
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Jan 09, 2004 4:45 pm    Post subject: Reply to topic Reply with quote

Before I released the version with the command line arguments, I did test it, and it did work. I'll test it out again tonight.

Dunno why it would give you an illegal operation with the ports, I tested out every single error fixed in the program, no problems.

When you said you made sure the sysop passwords differed, what do you mean? Do you mean the billing pw? It does check for that.

OK I will add in server version and contact details in the readme.

OK I'll check out DefaultLevelFile, and I'll add in a section to the error message.

I made the program set the IP to localhost because if you have both the subbill.ini and server.ini on the same computer, I assumed you were running both servers on the same computer.

I will also add in a confirm on every error message, too.

Thanks for your critique!
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
-Smong-
Guest


Offline

PostPosted: Sat Jan 10, 2004 3:51 pm    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
When you said you made sure the sysop passwords differed, what do you mean? Do you mean the billing pw? It does check for that.
I made SysopPassword in server.ini differ from SysopPassword in subbill.ini

Cyan~Fire wrote:
I made the program set the IP to localhost because if you have both the subbill.ini and server.ini on the same computer, I assumed you were running both servers on the same computer.
Good thinking
Back to top
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Sat Jan 10, 2004 8:56 pm    Post subject: Reply to topic Reply with quote

oh too, i dont think password's are case sensitive ... not sure if you took that into consideration if that's true.. lol... MEH XD
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 644 page(s) served in previous 5 minutes.

phpBB Created this page in 0.438521 seconds : 52 queries executed (88.9%): GZIP compression disabled