Webternet extension now exposes API and acts like other SM extensions.
This commit is contained in:
parent
9514c12982
commit
e449b8384c
@ -12,7 +12,7 @@ MMSOURCE17 = ../../../mmsource-1.7
|
|||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
PROJECT = curl
|
PROJECT = webternet
|
||||||
|
|
||||||
#Uncomment for Metamod: Source enabled extension
|
#Uncomment for Metamod: Source enabled extension
|
||||||
#USEMETA = true
|
#USEMETA = true
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sm_platform.h>
|
#include <sm_platform.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
#include "curlapi.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file extension.cpp
|
* @file extension.cpp
|
||||||
@ -60,6 +61,12 @@ bool CurlExt::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sharesys->AddInterface(myself, &g_webternet))
|
||||||
|
{
|
||||||
|
UTIL_Format(error, maxlength, "Could not add IWebternet interface");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="..\curl-src\lib\LIB-Release\libcurl.lib ws2_32.lib"
|
AdditionalDependencies="..\curl-src\lib\LIB-Release\libcurl.lib ws2_32.lib"
|
||||||
OutputFile="$(OutDir)\curl.ext.dll"
|
OutputFile="$(OutDir)\webternet.ext.dll"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
@ -144,7 +144,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="..\curl-src\lib\LIB-Release\libcurl.lib ws2_32.lib"
|
AdditionalDependencies="..\curl-src\lib\LIB-Release\libcurl.lib ws2_32.lib"
|
||||||
OutputFile="$(OutDir)\curl.ext.dll"
|
OutputFile="$(OutDir)\webternet.ext.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
@ -870,6 +870,10 @@
|
|||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\version.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="SourceMod SDK"
|
Name="SourceMod SDK"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||||
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||||
|
#include "svn_version.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file smsdk_config.h
|
* @file smsdk_config.h
|
||||||
@ -40,10 +41,10 @@
|
|||||||
/* Basic information exposed publicly */
|
/* Basic information exposed publicly */
|
||||||
#define SMEXT_CONF_NAME "Webternet"
|
#define SMEXT_CONF_NAME "Webternet"
|
||||||
#define SMEXT_CONF_DESCRIPTION "Extension for interacting with URLs"
|
#define SMEXT_CONF_DESCRIPTION "Extension for interacting with URLs"
|
||||||
#define SMEXT_CONF_VERSION "0.0.0.0"
|
#define SMEXT_CONF_VERSION SVN_FULL_VERSION
|
||||||
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
||||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||||
#define SMEXT_CONF_LOGTAG "cURL"
|
#define SMEXT_CONF_LOGTAG "WEB"
|
||||||
#define SMEXT_CONF_LICENSE "GPL"
|
#define SMEXT_CONF_LICENSE "GPL"
|
||||||
#define SMEXT_CONF_DATESTRING __DATE__
|
#define SMEXT_CONF_DATESTRING __DATE__
|
||||||
|
|
||||||
|
44
extensions/curl/svn_version.h
Normal file
44
extensions/curl/svn_version.h
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod GeoIP Extension
|
||||||
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autogenerated by build scripts
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
||||||
|
#define _INCLUDE_GEOIP_VERSION_H_
|
||||||
|
|
||||||
|
#define SM_BUILD_STRING "-dev"
|
||||||
|
#define SM_BUILD_UNIQUEID "2488:f7f1bbcc85e4" SM_BUILD_STRING
|
||||||
|
#define SVN_FULL_VERSION "1.2.0" SM_BUILD_STRING
|
||||||
|
#define SVN_FILE_VERSION 1,2,0,0
|
||||||
|
|
||||||
|
#endif //_INCLUDE_GEOIP_VERSION_H_
|
44
extensions/curl/svn_version.tpl
Normal file
44
extensions/curl/svn_version.tpl
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* vim: set ts=4 :
|
||||||
|
* =============================================================================
|
||||||
|
* SourceMod GeoIP Extension
|
||||||
|
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
|
||||||
|
* =============================================================================
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||||
|
* Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||||
|
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||||
|
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||||
|
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||||
|
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||||
|
* this exception to all derivative works. AlliedModders LLC defines further
|
||||||
|
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||||
|
* or <http://www.sourcemod.net/license.php>.
|
||||||
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autogenerated by build scripts
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _INCLUDE_GEOIP_VERSION_H_
|
||||||
|
#define _INCLUDE_GEOIP_VERSION_H_
|
||||||
|
|
||||||
|
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||||
|
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||||
|
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||||
|
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||||
|
|
||||||
|
#endif //_INCLUDE_GEOIP_VERSION_H_
|
104
extensions/curl/version.rc
Normal file
104
extensions/curl/version.rc
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
//#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "winres.h"
|
||||||
|
|
||||||
|
#include "svn_version.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION SVN_FILE_VERSION
|
||||||
|
PRODUCTVERSION SVN_FILE_VERSION
|
||||||
|
FILEFLAGSMASK 0x17L
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "000004b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Comments", "Webternet Extension"
|
||||||
|
VALUE "FileDescription", "SourceMod Webternet Extension"
|
||||||
|
VALUE "FileVersion", SVN_FULL_VERSION
|
||||||
|
VALUE "InternalName", "SourceMod Webternet Extension"
|
||||||
|
VALUE "LegalCopyright", "Copyright (c) 2004-2009, AlliedModders LLC"
|
||||||
|
VALUE "OriginalFilename", "webternet.ext.dll"
|
||||||
|
VALUE "ProductName", "SourceMod Webternet Extension"
|
||||||
|
VALUE "ProductVersion", SVN_FULL_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""winres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
Loading…
Reference in New Issue
Block a user