core/sourcemm_api.cpp
author David Anderson <dvander@alliedmods.net>
Tue Jan 02 01:44:46 2007 +0000 (2007-01-02)
changeset 259 ca9b124a2544
parent 226 4663ea3fc2d3
child 289 87ad530d141b
permissions -rw-r--r--
fixed various issues in the handle system with cloning
fixed plugins being able to free each other's handles
     1 #include <oslink.h>
     2 #include "sourcemm_api.h"
     3 #include "sm_version.h"
     4 #include "sourcemod.h"
     5 
     6 SourceMod_Core g_SourceMod_Core;
     7 IVEngineServer *engine = NULL;
     8 IServerGameDLL *gamedll = NULL;
     9 IServerGameClients *serverClients = NULL;
    10 
    11 PLUGIN_EXPOSE(SourceMod, g_SourceMod_Core);
    12 
    13 bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
    14 {
    15 	PLUGIN_SAVEVARS();
    16 
    17 	GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
    18 	GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
    19 	GET_V_IFACE_CURRENT(serverFactory, serverClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
    20 
    21 	return g_SourceMod.InitializeSourceMod(error, maxlen, late);
    22 }
    23 
    24 bool SourceMod_Core::Unload(char *error, size_t maxlen)
    25 {
    26 	return true;
    27 }
    28 
    29 bool SourceMod_Core::Pause(char *error, size_t maxlen)
    30 {
    31 	return true;
    32 }
    33 
    34 bool SourceMod_Core::Unpause(char *error, size_t maxlen)
    35 {
    36 	return true;
    37 }
    38 
    39 void SourceMod_Core::AllPluginsLoaded()
    40 {
    41 }
    42 
    43 const char *SourceMod_Core::GetAuthor()
    44 {
    45 	return "AlliedModders, LLC";
    46 }
    47 
    48 const char *SourceMod_Core::GetName()
    49 {
    50 	return "SourceMod";
    51 }
    52 
    53 const char *SourceMod_Core::GetDescription()
    54 {
    55 	return "Extensible administration and scripting system";
    56 }
    57 
    58 const char *SourceMod_Core::GetURL()
    59 {
    60 	return "http://www.sourcemod.net/";
    61 }
    62 
    63 const char *SourceMod_Core::GetLicense()
    64 {
    65 	return "See LICENSE.txt";
    66 }
    67 
    68 const char *SourceMod_Core::GetVersion()
    69 {
    70 	return SOURCEMOD_VERSION;
    71 }
    72 
    73 const char *SourceMod_Core::GetDate()
    74 {
    75 	return __DATE__;
    76 }
    77 
    78 const char *SourceMod_Core::GetLogTag()
    79 {
    80 	return "SRCMOD";
    81 }