Menu

Code cleanup

I thought I would post here to let those people who are interested know: I've seriously overhauled gameserv.cpp, which is the main "switchboard" that determines the function-to-string mappings. Meaning, when you do /msg gameserv store list armor, based on "/msg gameserv store" the gameserv() function passes off to do_store() from within the gameserv.cpp file.

Since the beginning, I've been dumping stuff into gameserv.cpp, knowing full well that the day would come for a complete overhaul, and that I was making it much harder on myself by not sorting things as I went. This is not to mention the fact that gameserv.cpp grew and grew, and it was the longest .cpp file to compile and transfer. This was never an issue for me until I started to use BVRDE (GREAT Remote IDE BTW). I noticed that any change I made to gameserv.cpp took forever to upload on even a cable modem (upstream sucks), so I had to do something.

The result of a 2 day effort was to completely remove all functions from gameserv.cpp. That's right... ALL functions. I took all of the do_something() related functions, and gave each one its own do_something.cpp file. That means there are a ton of files for gameserv now (49 .cpp files total); however, it also means that the code is much easier to maintain since it's so modular now. One person can work on a do_something() function, and submit a patch just for the do_something.cpp now if they want, and when you make changes, only the necessary files are compiled. This is going to make things a lot easier for anyone involved in gameserv development. I'm not sure how many of you there actually are, but I hope you appreciate this. My next step is language files, I think. It's going to be a long process, but I can do it easier now that the code is the way it is.

If you're reading this, thank you... you are the reason I keep working on this old beast. I appreciate your enthusiasm more than you could know, and I hope you stay as interested as I have been over these last few years. It's been a blast, and I hope to keep going for many years to come.

Posted by Domenic Datti 2007-01-24

Log in to post a comment.