core/smn_console.cpp
changeset 2684 a802f5cebe28
parent 2648 dbcc58361ada
child 2800 74c32429908e
     1.1 --- a/core/smn_console.cpp	Wed Mar 18 18:50:20 2009 -0700
     1.2 +++ b/core/smn_console.cpp	Wed Mar 25 03:27:32 2009 -0400
     1.3 @@ -43,7 +43,6 @@
     1.4  #include <inetchannel.h>
     1.5  #include <bitbuf.h>
     1.6  #include <sm_trie_tpl.h>
     1.7 -#include "TagsSystem.h"
     1.8  
     1.9  #if SOURCE_ENGINE == SE_LEFT4DEAD
    1.10  #define NET_SETCONVAR	6
    1.11 @@ -1307,55 +1306,11 @@
    1.12  
    1.13  static cell_t AddServerTag(IPluginContext *pContext, const cell_t *params)
    1.14  {
    1.15 -	char *value;
    1.16 -	pContext->LocalToString(params[1], &value);
    1.17 -
    1.18 -	if (!g_Tags.AddTag(value))
    1.19 -	{
    1.20 -		return 0;
    1.21 -	}
    1.22 -
    1.23 -	IPlugin *pPlugin = g_PluginSys.FindPluginByContext(pContext->GetContext());
    1.24 -	SourceHook::List<char *> *pList = NULL;
    1.25 -
    1.26 -	if (!pPlugin->GetProperty("ServerTags", (void **)&pList, false) || !pList)
    1.27 -	{
    1.28 -		pList = new SourceHook::List<char *>;
    1.29 -		pPlugin->SetProperty("ServerTags", pList);
    1.30 -	}
    1.31 -
    1.32 -	pList->push_back(strdup(value));
    1.33 -
    1.34 -	return 1;
    1.35 +	return 0;
    1.36  }
    1.37  
    1.38  static cell_t RemoveServerTag(IPluginContext *pContext, const cell_t *params)
    1.39  {
    1.40 -	char *value;
    1.41 -	pContext->LocalToString(params[1], &value);
    1.42 -
    1.43 -	IPlugin *pPlugin = g_PluginSys.FindPluginByContext(pContext->GetContext());
    1.44 -	SourceHook::List<char *> *pList = NULL;
    1.45 -
    1.46 -	if (!pPlugin->GetProperty("ServerTags", (void **)&pList, false) || !pList)
    1.47 -	{
    1.48 -		pList = new SourceHook::List<char *>;
    1.49 -		pPlugin->SetProperty("ServerTags", pList);
    1.50 -	}
    1.51 -
    1.52 -	SourceHook::List<char *>::iterator iter = pList->begin();
    1.53 -
    1.54 -	while (iter != pList->end())
    1.55 -	{
    1.56 -		if (strcmp(*iter, value) == 0)
    1.57 -		{
    1.58 -			g_pMemAlloc->Free(*iter);
    1.59 -			pList->erase(iter);
    1.60 -
    1.61 -			return g_Tags.RemoveTag(value);
    1.62 -		}
    1.63 -	}
    1.64 -
    1.65  	return 0;
    1.66  }
    1.67