From 379d9121b4421b87edca22bce6aff9f543dbf991 Mon Sep 17 00:00:00 2001 From: xPaw Date: Wed, 25 Feb 2015 00:56:17 +0200 Subject: [PATCH] Remove version checks from all include files --- plugins/include/cstrike.inc | 12 +++------ plugins/include/csx.inc | 12 +++------ plugins/include/dbi.inc | 8 ++---- plugins/include/dodfun.inc | 12 +++------ plugins/include/dodx.inc | 12 +++------ plugins/include/engine.inc | 12 +++------ plugins/include/fakemeta.inc | 10 +++---- plugins/include/fun.inc | 12 +++------ plugins/include/geoip.inc | 10 +++---- plugins/include/hamsandwich.inc | 46 +++++++++++++++------------------ plugins/include/ns.inc | 14 +++------- plugins/include/nvault.inc | 12 +++------ plugins/include/regex.inc | 10 +++---- plugins/include/sockets.inc | 10 +++---- plugins/include/sqlx.inc | 12 ++++----- plugins/include/tfcx.inc | 12 +++------ plugins/include/tsfun.inc | 12 +++------ plugins/include/tsx.inc | 12 +++------ 18 files changed, 84 insertions(+), 156 deletions(-) diff --git a/plugins/include/cstrike.inc b/plugins/include/cstrike.inc index 6bd2846d..cc0b6ec4 100755 --- a/plugins/include/cstrike.inc +++ b/plugins/include/cstrike.inc @@ -12,17 +12,13 @@ // #if defined _cstrike_included - #endinput + #endinput #endif #define _cstrike_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib cstrike - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib cstrike - #endif -#else - #pragma library cstrike +#pragma reqlib cstrike +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib cstrike #endif /* Returns player deaths. diff --git a/plugins/include/csx.inc b/plugins/include/csx.inc index 3616d178..ece82ceb 100755 --- a/plugins/include/csx.inc +++ b/plugins/include/csx.inc @@ -12,19 +12,15 @@ // #if defined _csx_included - #endinput + #endinput #endif #define _csx_included #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass xstats - #if !defined AMXMODX_NOAUTOLOAD - #pragma defclasslib xstats csx - #endif -#else - #pragma library csx +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats csx #endif /* diff --git a/plugins/include/dbi.inc b/plugins/include/dbi.inc index ba371483..aa3e9f95 100755 --- a/plugins/include/dbi.inc +++ b/plugins/include/dbi.inc @@ -26,7 +26,7 @@ // #if defined _dbi_included - #endinput + #endinput #endif #define _dbi_included @@ -34,11 +34,7 @@ // there's really no reason to anyway. #assert !defined _sqlx_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass dbi -#else - #pragma library dbi -#endif +#pragma reqclass dbi enum Sql { diff --git a/plugins/include/dodfun.inc b/plugins/include/dodfun.inc index 5add00ed..cc8ea1e7 100755 --- a/plugins/include/dodfun.inc +++ b/plugins/include/dodfun.inc @@ -12,19 +12,15 @@ // #if defined _dodfun_included - #endinput + #endinput #endif #define _dodfun_included #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib dodfun - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib dodfun - #endif -#else - #pragma library dodfun +#pragma reqlib dodfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib dodfun #endif /* Function is called after grenade throw */ diff --git a/plugins/include/dodx.inc b/plugins/include/dodx.inc index 09396899..42e21dab 100755 --- a/plugins/include/dodx.inc +++ b/plugins/include/dodx.inc @@ -12,20 +12,16 @@ // #if defined _dodx_included - #endinput + #endinput #endif #define _dodx_included #include #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass xstats - #if !defined AMXMODX_NOAUTOLOAD - #pragma defclasslib xstats dodx - #endif -#else - #pragma library dodx +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats dodx #endif /************* Shared Natives Start ********************************/ diff --git a/plugins/include/engine.inc b/plugins/include/engine.inc index 56551716..3690baf9 100755 --- a/plugins/include/engine.inc +++ b/plugins/include/engine.inc @@ -13,19 +13,15 @@ // #if defined _engine_included - #endinput + #endinput #endif #define _engine_included #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib engine - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib engine - #endif -#else - #pragma library engine +#pragma reqlib engine +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib engine #endif native traceresult(type,any:...); diff --git a/plugins/include/fakemeta.inc b/plugins/include/fakemeta.inc index b401616c..a32844a9 100755 --- a/plugins/include/fakemeta.inc +++ b/plugins/include/fakemeta.inc @@ -18,13 +18,9 @@ #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib fakemeta - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib fakemeta - #endif -#else - #pragma library fakemeta +#pragma reqlib fakemeta +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fakemeta #endif /** diff --git a/plugins/include/fun.inc b/plugins/include/fun.inc index 16d3a457..ffb5242d 100755 --- a/plugins/include/fun.inc +++ b/plugins/include/fun.inc @@ -12,17 +12,13 @@ // #if defined _fun_included - #endinput + #endinput #endif #define _fun_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib fun - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib fun - #endif -#else - #pragma library fun +#pragma reqlib fun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fun #endif /* Returns 1 if receiver hears sender via voice communication. */ diff --git a/plugins/include/geoip.inc b/plugins/include/geoip.inc index 423ceed7..9bc211f5 100755 --- a/plugins/include/geoip.inc +++ b/plugins/include/geoip.inc @@ -16,13 +16,9 @@ #endif #define _geoip_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib geoip - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib geoip - #endif -#else - #pragma library geoip +#pragma reqlib geoip +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib geoip #endif /** diff --git a/plugins/include/hamsandwich.inc b/plugins/include/hamsandwich.inc index 9718cc36..d39b0ed5 100644 --- a/plugins/include/hamsandwich.inc +++ b/plugins/include/hamsandwich.inc @@ -27,13 +27,9 @@ #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib hamsandwich - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib hamsandwich - #endif -#else - #pragma library hamsandwich +#pragma reqlib hamsandwich +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib hamsandwich #endif /** @@ -320,24 +316,24 @@ native GetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); */ native SetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); -/** - * Creates an ItemInfo handle. This value should never be altered. - * The handle can be used in Get/SetHamItemInfo. - * - * NOTE: You must call FreeHamItemInfo() on every handle made with CreateHamItemInfo(). - * - * @return A new ItemInfo handle. - */ -native CreateHamItemInfo(); - -/** - * Frees an ItemIndo handle created with CreateHamItemInfo(). Do not call - * this more than once per handle, or on handles not created through - * CreateHamItemInfo(). - * - * @param itemInfo_handle ItemInfo handle created via CreateHamItemInfo(). - * @noreturn - */ +/** + * Creates an ItemInfo handle. This value should never be altered. + * The handle can be used in Get/SetHamItemInfo. + * + * NOTE: You must call FreeHamItemInfo() on every handle made with CreateHamItemInfo(). + * + * @return A new ItemInfo handle. + */ +native CreateHamItemInfo(); + +/** + * Frees an ItemIndo handle created with CreateHamItemInfo(). Do not call + * this more than once per handle, or on handles not created through + * CreateHamItemInfo(). + * + * @param itemInfo_handle ItemInfo handle created via CreateHamItemInfo(). + * @noreturn + */ native FreeHamItemInfo(itemInfo_handle); diff --git a/plugins/include/ns.inc b/plugins/include/ns.inc index f2ba0000..75f1b5ba 100755 --- a/plugins/include/ns.inc +++ b/plugins/include/ns.inc @@ -14,19 +14,13 @@ #if defined NS_INC #endinput #endif -#define NS_INC +#define NS_INC -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib ns - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib ns - #endif -#else - #pragma library ns +#pragma reqlib ns +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib ns #endif - - #include diff --git a/plugins/include/nvault.inc b/plugins/include/nvault.inc index 60db914a..9a8e9bd0 100755 --- a/plugins/include/nvault.inc +++ b/plugins/include/nvault.inc @@ -12,17 +12,13 @@ // #if defined _nvault_included - #endinput + #endinput #endif #define _nvault_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib nvault - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib nvault - #endif -#else - #pragma library nvault +#pragma reqlib nvault +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib nvault #endif /* All timestamps are in UNIX epoch form. */ diff --git a/plugins/include/regex.inc b/plugins/include/regex.inc index 2ac171d0..5c777e48 100755 --- a/plugins/include/regex.inc +++ b/plugins/include/regex.inc @@ -16,13 +16,9 @@ #endif #define _regex_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib regex - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib regex - #endif -#else - #pragma library regex +#pragma reqlib regex +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib regex #endif diff --git a/plugins/include/sockets.inc b/plugins/include/sockets.inc index 4b14c116..42bd4d9c 100755 --- a/plugins/include/sockets.inc +++ b/plugins/include/sockets.inc @@ -19,13 +19,9 @@ #endif #define _socket_included -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib sockets - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib sockets - #endif -#else - #pragma library socket +#pragma reqlib sockets +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib sockets #endif // Use SOCKET_TCP for TCP Socket connections diff --git a/plugins/include/sqlx.inc b/plugins/include/sqlx.inc index 6b92c3aa..59629b60 100644 --- a/plugins/include/sqlx.inc +++ b/plugins/include/sqlx.inc @@ -12,19 +12,17 @@ // #if defined _sqlx_included - #endinput + #endinput #endif #define _sqlx_included //eh.. #define SQL_NumRows SQL_NumResults -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass sqlx - #if !defined AMXMODX_NOAUTOLOAD - #pragma defclasslib sqlx mysql - #endif //!defined AMXMODX_NOAUTOLOAD -#endif //AMXX_VERSION_NUM +#pragma reqclass sqlx +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib sqlx mysql +#endif enum Handle { diff --git a/plugins/include/tfcx.inc b/plugins/include/tfcx.inc index 0ca17895..0da01188 100755 --- a/plugins/include/tfcx.inc +++ b/plugins/include/tfcx.inc @@ -12,20 +12,16 @@ // #if defined _tfcx_included - #endinput + #endinput #endif #define _tfcx_included #include #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass xstats - #if !defined AMXMODX_NOAUTOLOAD - #pragma defclasslib xstats tfcx - #endif -#else - #pragma library tfcx +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tfcx #endif /************* Shared Natives Start ********************************/ diff --git a/plugins/include/tsfun.inc b/plugins/include/tsfun.inc index d0192412..aed7cb0e 100755 --- a/plugins/include/tsfun.inc +++ b/plugins/include/tsfun.inc @@ -12,7 +12,7 @@ // #if defined _tsxfun_included - #endinput + #endinput #endif #define _tsxfun_included @@ -27,13 +27,9 @@ enum { XMF_DEATH, }; -#if AMXX_VERSION_NUM >= 175 - #pragma reqlib tsfun - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib tsfun - #endif -#else - #pragma library tsfun +#pragma reqlib tsfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib tsfun #endif /************* Shared Natives End ********************************/ diff --git a/plugins/include/tsx.inc b/plugins/include/tsx.inc index 4e1b3c12..e9592af0 100755 --- a/plugins/include/tsx.inc +++ b/plugins/include/tsx.inc @@ -12,19 +12,15 @@ // #if defined _tsx_included - #endinput + #endinput #endif #define _tsx_included #include -#if AMXX_VERSION_NUM >= 175 - #pragma reqclass xstats - #if !defined AMXMODX_NOAUTOLOAD - #pragma defclasslib xstats tsx - #endif -#else - #pragma library tsx +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tsx #endif /************* Shared Natives Start ********************************/