From e449b8384ca6d3fa26cbd89794599cd476ce23e6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 11 Jan 2009 23:56:34 -0500 Subject: [PATCH] Webternet extension now exposes API and acts like other SM extensions. --- extensions/curl/Makefile | 2 +- extensions/curl/extension.cpp | 7 ++ extensions/curl/msvc9/curl.vcproj | 8 ++- extensions/curl/sdk/smsdk_config.h | 5 +- extensions/curl/svn_version.h | 44 ++++++++++++ extensions/curl/svn_version.tpl | 44 ++++++++++++ extensions/curl/version.rc | 104 +++++++++++++++++++++++++++++ 7 files changed, 209 insertions(+), 5 deletions(-) create mode 100644 extensions/curl/svn_version.h create mode 100644 extensions/curl/svn_version.tpl create mode 100644 extensions/curl/version.rc diff --git a/extensions/curl/Makefile b/extensions/curl/Makefile index 45049e09..2579a8f7 100644 --- a/extensions/curl/Makefile +++ b/extensions/curl/Makefile @@ -12,7 +12,7 @@ MMSOURCE17 = ../../../mmsource-1.7 ### EDIT BELOW FOR OTHER PROJECTS ### ##################################### -PROJECT = curl +PROJECT = webternet #Uncomment for Metamod: Source enabled extension #USEMETA = true diff --git a/extensions/curl/extension.cpp b/extensions/curl/extension.cpp index 0fc1e1e4..ce01b121 100644 --- a/extensions/curl/extension.cpp +++ b/extensions/curl/extension.cpp @@ -33,6 +33,7 @@ #include #include #include +#include "curlapi.h" /** * @file extension.cpp @@ -60,6 +61,12 @@ bool CurlExt::SDK_OnLoad(char *error, size_t maxlength, bool late) return false; } + if (!sharesys->AddInterface(myself, &g_webternet)) + { + UTIL_Format(error, maxlength, "Could not add IWebternet interface"); + return false; + } + return true; } diff --git a/extensions/curl/msvc9/curl.vcproj b/extensions/curl/msvc9/curl.vcproj index 9ddebef2..d34c25af 100644 --- a/extensions/curl/msvc9/curl.vcproj +++ b/extensions/curl/msvc9/curl.vcproj @@ -65,7 +65,7 @@ + + . + * + * 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 . + * + * 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_ diff --git a/extensions/curl/svn_version.tpl b/extensions/curl/svn_version.tpl new file mode 100644 index 00000000..679a3732 --- /dev/null +++ b/extensions/curl/svn_version.tpl @@ -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 . + * + * 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 . + * + * 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_ diff --git a/extensions/curl/version.rc b/extensions/curl/version.rc new file mode 100644 index 00000000..974ba5c0 --- /dev/null +++ b/extensions/curl/version.rc @@ -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 +