PDA

View Full Version : SourceOP Code Released



Drunken F00l
Jul 28, 2011, 06:32 PM
You can view it here:
http://code.google.com/p/sourceop/source/browse/#hg%2Ftrunk

Code for other projects coming soon.

Sorry that some of it is a mess. It's a fairly old project (2004/2005) and it hasn't really ever been cleaned up. There are gems spread all over, though. AdminOP.cpp and adminopplayer.cpp contain more code than they probably should.
bans.cpp contains all the code for loading and dealing with MySQL bans.
CAOP* are the code files for the SourceOP entities. All entities created in Lua are handled by CAOPLuaNormal.cpp.
DFBaseent/Radio are old and I don't think compiled any more but I've included them anyways in case something useful is in there, but not likely.
gamerulesproxy.cpp is responsible for finding the game rules object and hooking/interacting with it.
isopgamesystem.cpp is similar to the SDK's IGameSystem.
l_class_* files are the implementation for various Lua classes and are exposed via a modified version of Lunar.
Other l* code files are libraries.
playerdatabase.cpp contains all the code for maintaining the MySQL player database.
plugin_mm.cpp allows for the plugin to be loaded with Metamod Source. The plugin can also be loaded as a VSP which is exposed in serverplugin_empty.cpp.
queuethread.h is a thread-safe template class that inherits Valve's CThread and provides a queue for handling items of any type. You provide the implementation for handling each item. Items can be added to the queue from any thread and are serviced/handled on their own thread.
reservedslots.cpp load and handle the MySQL reserved slots.
sopmysql is a thin wrapper around the raw MySQL library calls.
specialitems loads custom TF2 items from a MySQL database. These are applied in HookGiveNamedScriptItem in AdminOP.cpp.
sourceopadmin.cpp contains the server-side implementation for the remote admin client.
vfuncs.cpp is responsible for loading the DF_funcoffs.txt file and allowing calls to the virtual functions specified there. It also searches the data tables for offsets to various member variables and exposes functions to get/set them.
You can use this thread and subforum to ask questions, share things you found that were helpful, etc.

Russianeer
Jul 29, 2011, 03:56 PM
Thank you for releasing it at last.

Russianeer
Jul 29, 2011, 10:57 PM
So how would I compile this under Release - Orangebox?

nicatronTg
Jul 30, 2011, 01:31 AM
You specifically mention reservedslots.cpp and playerdatabase.cpp, but neither are in the actual repo.

Russianeer
Jul 30, 2011, 02:20 AM
You specifically mention reservedslots.cpp and playerdatabase.cpp, but neither are in the actual repo.

I had the same problem in the beginning. There's actually a 'Next' button at the top right part of the screen that will bring you to the next page.

It's very hard to navigate on google code indeed.

Drunken F00l
Aug 01, 2011, 10:57 PM
You can also just download the entire repository with hg clone

hg clone https://drunkenf00l@code.google.com/p/sourceop/ sourceop

Russianeer
Aug 20, 2011, 09:01 PM
Can you please answer my question of how I would compile this against Orange Box?