Added #pragma deprecated to include files for deprecated functions and constants

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401274
This commit is contained in:
Scott Ehlert 2007-08-07 22:11:00 +00:00
parent fb2e5dc142
commit 9d0c2ea4d8
11 changed files with 30 additions and 13 deletions

View File

@ -84,7 +84,7 @@ public ReadSimpleUsers()
ReadAdminLine(const String:line[])
{
new String:auth[64];
new cur_idx = StrBreak(line, auth, sizeof(auth));
new cur_idx = BreakString(line, auth, sizeof(auth));
new idx = cur_idx;
if (cur_idx == -1)
@ -98,7 +98,7 @@ ReadAdminLine(const String:line[])
/* Read flags */
new String:flags[64];
cur_idx = StrBreak(line[idx], flags, sizeof(flags));
cur_idx = BreakString(line[idx], flags, sizeof(flags));
idx += cur_idx;
if (flags[0] == '@')
@ -148,7 +148,7 @@ ReadAdminLine(const String:line[])
if (cur_idx != -1)
{
decl String:password[64];
StrBreak(line[idx], password, sizeof(password));
BreakString(line[idx], password, sizeof(password));
SetAdminPassword(admin, password);
}

View File

@ -77,10 +77,10 @@ public SMCResult:ReadUsers_KeyValue(Handle:smc,
if (StrEqual(key, "auth"))
{
auth = true;
StrCopy(g_CurAuth, sizeof(g_CurAuth), value);
strcopy(g_CurAuth, sizeof(g_CurAuth), value);
} else if (StrEqual(key, "identity")) {
auth = true;
StrCopy(g_CurIdent, sizeof(g_CurIdent), value);
strcopy(g_CurIdent, sizeof(g_CurIdent), value);
} else if (StrEqual(key, "password")) {
SetAdminPassword(g_CurUser, value);
} else if (StrEqual(key, "group")) {

View File

@ -521,4 +521,4 @@ SendPanelToAll(String:name[], String:message[])
public Handler_DoNothing(Handle:menu, MenuAction:action, param1, param2)
{
/* Do nothing */
}
}

View File

@ -209,4 +209,4 @@ public Action:Command_Slay(client, args)
ForcePlayerSuicide(target);
return Plugin_Handled;
}
}

View File

@ -166,6 +166,7 @@ native bool:IsClientInGame(client);
* Backwards compatibility stock - use IsClientInGame
* @deprecated Renamed to IsClientInGame
*/
#pragma deprecated Use IsClientInGame() instead
stock bool:IsPlayerInGame(client)
{
return IsClientInGame(client);

View File

@ -228,6 +228,7 @@ stock RoundFloat(Float:value)
*
* @deprecated
*/
#pragma deprecated Use RoundToNearest() or RoundFloat() instead
stock FloatRound(Float:value)
{
return RoundToNearest(value);

View File

@ -472,6 +472,7 @@ native FormatNativeString(out_param,
*
* @deprecated
*/
#pragma deprecated Use GetNativeCell() or GetNativeCellRef() instead
stock Float:GetNativeFloat(param, bool:byref)
{
if (!byref)
@ -487,6 +488,7 @@ stock Float:GetNativeFloat(param, bool:byref)
*
* @deprecated
*/
#pragma deprecated Use GetNativeCell() or GetNativeCellRef() instead
stock Handle:GetNativeHandle(param, bool:byref)
{
if (!byref)

View File

@ -137,6 +137,7 @@ native bool:IsPlayerAlive(client);
/**
* @deprecated
*/
#pragma deprecated Use IgniteEntity() instead
stock IgnitePlayer(client, Float:time, bool:npc=false, Float:size=0.0, bool:level=false)
{
return IgniteEntity(client, time, npc, size, level);
@ -145,6 +146,7 @@ stock IgnitePlayer(client, Float:time, bool:npc=false, Float:size=0.0, bool:leve
/**
* @deprecated
*/
#pragma deprecated Use ExtinguishEntity() instead
stock ExtinguishClient(client)
{
return ExtinguishEntity(client);
@ -153,6 +155,7 @@ stock ExtinguishClient(client)
/**
* @deprecated
*/
#pragma deprecated Use TeleportEntity() instead
stock TeleportPlayer(client, const Float:origin[3], const Float:angles[3], const Float:velocity[3])
{
return TeleportEntity(client, origin, angles, velocity);

View File

@ -141,6 +141,7 @@ forward OnConfigsExecuted();
/**
* @deprecated Use OnConfigsExecuted() instead.
*/
#pragma deprecated Use OnConfigsExecuted() instead
forward OnServerCfg();
/**

View File

@ -76,6 +76,7 @@ native strncmp(const String:str1[], const String:str2[], num, bool:caseSensitive
* Backwards compatible stock - StrCompare is now strcmp
* @deprecated Renamed to strcmp
*/
#pragma deprecated Use strcmp() instead
stock StrCompare(const String:str1[], const String:str2[], bool:caseSensitive=true)
{
return strcmp(str1, str2, caseSensitive);
@ -92,7 +93,7 @@ stock StrCompare(const String:str1[], const String:str2[], bool:caseSensitive=tr
*/
stock bool:StrEqual(const String:str1[], const String:str2[], bool:caseSensitive=true)
{
return (StrCompare(str1, str2, caseSensitive) == 0);
return (strcmp(str1, str2, caseSensitive) == 0);
}
/**
@ -111,6 +112,7 @@ native strcopy(String:dest[], destLen, const String:source[]);
* Backwards compatibility stock - use strcopy
* @deprecated Renamed to strcopy
*/
#pragma deprecated Use strcopy() instead
stock StrCopy(String:dest[], destLen, const String:source[])
{
return strcopy(dest, destLen, source);
@ -230,6 +232,7 @@ native BreakString(const String:source[], String:arg[], argLen);
* Backwards compatibility stock - use BreakString
* @deprecated Renamed to BreakString.
*/
#pragma deprecated Use BreakString() instead
stock StrBreak(const String:source[], String:arg[], argLen)
{
return BreakString(source, arg, argLen);

View File

@ -29,15 +29,21 @@ enum UserMsg
/**
* @section Message Flags.
*/
#define USERMSG_PASSTHRU (1<<0) /**< (DEPRECATED, NO EFFECT) */
#define USERMSG_PASSTHRU_ALL (1<<1) /**< (DEPRECATED, NO EFFECT) */
#define USERMSG_RELIABLE (1<<2) /**< Message will be set on the reliable stream */
#define USERMSG_INITMSG (1<<3) /**< Message will be considered to be an initmsg */
#define USERMSG_BLOCK_MM (1<<4) /**< (DEPRECATED, NO EFFECT) */
#define USERMSG_BLOCK_SM (1<<5) /**< (DEPRECATED, NO EFFECT) */
#define USERMSG_BLOCK_ALL (1<<6) /**< (DEPRECATED, NO EFFECT) */
#define USERMSG_BLOCKHOOKS (1<<7) /**< Prevents the message from triggering SourceMod and Metamod hooks */
#pragma deprecated Constant has no effect
#define USERMSG_PASSTHRU (1<<0) /**< (DEPRECATED, NO EFFECT) */
#pragma deprecated Constant has no effect
#define USERMSG_PASSTHRU_ALL (1<<1) /**< (DEPRECATED, NO EFFECT) */
#pragma deprecated Constant has no effect
#define USERMSG_BLOCK_MM (1<<4) /**< (DEPRECATED, NO EFFECT) */
#pragma deprecated Constant has no effect
#define USERMSG_BLOCK_SM (1<<5) /**< (DEPRECATED, NO EFFECT) */
#pragma deprecated Constant has no effect
#define USERMSG_BLOCK_ALL (1<<6) /**< (DEPRECATED, NO EFFECT) */
/**
* @endsection
*/