core/sourcemm_api.cpp
author David Anderson <dvander@alliedmods.net>
Fri Dec 15 13:58:22 2006 +0000 (2006-12-15)
changeset 214 4d97709c9376
parent 209 fae1894d884c
child 216 38b1bdbc5bc9
permissions -rw-r--r--
added global class initializers
     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 
    10 PLUGIN_EXPOSE(SourceMod, g_SourceMod_Core);
    11 
    12 bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
    13 {
    14 	PLUGIN_SAVEVARS();
    15 
    16 	GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
    17 
    18 	return g_SourceMod.InitializeSourceMod(error, maxlen, late);
    19 }
    20 
    21 bool SourceMod_Core::Unload(char	*error, size_t maxlen)
    22 {
    23 	return true;
    24 }
    25 
    26 bool SourceMod_Core::Pause(char *error, size_t maxlen)
    27 {
    28 	return true;
    29 }
    30 
    31 bool SourceMod_Core::Unpause(char *error, size_t maxlen)
    32 {
    33 	return true;
    34 }
    35 
    36 void SourceMod_Core::AllPluginsLoaded()
    37 {
    38 }
    39 
    40 const char *SourceMod_Core::GetAuthor()
    41 {
    42 	return "AlliedModders, LLC";
    43 }
    44 
    45 const char *SourceMod_Core::GetName()
    46 {
    47 	return "SourceMod";
    48 }
    49 
    50 const char *SourceMod_Core::GetDescription()
    51 {
    52 	return "Extensible administration and scripting system";
    53 }
    54 
    55 const char *SourceMod_Core::GetURL()
    56 {
    57 	return "http://www.sourcemod.net/";
    58 }
    59 
    60 const char *SourceMod_Core::GetLicense()
    61 {
    62 	return "See LICENSE.txt";
    63 }
    64 
    65 const char *SourceMod_Core::GetVersion()
    66 {
    67 	return SOURCEMOD_VERSION;
    68 }
    69 
    70 const char *SourceMod_Core::GetDate()
    71 {
    72 	return __DATE__;
    73 }
    74 
    75 const char *SourceMod_Core::GetLogTag()
    76 {
    77 	return "SRCMOD";
    78 }