Advertisement
roach_

RSIP - Reliable Security IP System

Feb 19th, 2012
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.70 KB | None | 0 0
  1. /*
  2.             .................................
  3.             RSIP
  4.               Reliable Security IP System
  5.             .................................
  6.              
  7. Description:
  8.     This is a little include that uses GetServerVarAsString( "bind", .. ) to check
  9.     if the server is on the right Host / Computer.
  10.  
  11. License:
  12.     The contents of this file are subject to the Mozilla Public License Version
  13.     1.1 (the "License"); you may not use this file except in compliance with
  14.     the License. You may obtain a copy of the License at
  15.     http://www.mozilla.org/MPL/
  16.  
  17. */
  18. #if defined _rsip_inluded
  19.     #endinput
  20. #endif
  21. #define _rsip_included
  22.  
  23. #define HOST_ADDRESS \
  24.             "***.***.*.**"
  25.  
  26. #if defined FILTERSCRIPT
  27.     public OnFilterScriptInit( )
  28. #else
  29.     public OnGameModeInit( )
  30. #endif
  31. {
  32.     if( !strcmp( GetServerIP( ), HOST_ADDRESS, true ) )
  33.     {
  34.         print( "..................................................." );
  35.         print( "Your IP Address isn't correct:"                        );
  36.         print( " - This server has been hacked or stoled."             );
  37.         print( " - Please check if the server is on the right Host."   );
  38.         print( "...................................................\n" );
  39.         SendRconCommand( "exit" );
  40.     }
  41.     return ( 1 );
  42. }
  43.  
  44. #if defined FILTERSCRIPT
  45.     #if defined _ALS_OnFilterScriptInit
  46.         #undef OnFilterScriptInit
  47.     #else
  48.         #define _ALS_OnFilterScriptInit
  49.     #endif
  50.     #define OnFilterScriptInit zcmd_OnFilterScriptInit
  51.     forward rsip_OnFilterScriptInit();
  52. #else
  53.     #if defined _ALS_OnGameModeInit
  54.         #undef OnGameModeInit
  55.     #else
  56.         #define _ALS_OnGameModeInit
  57.     #endif
  58.     #define OnGameModeInit zcmd_OnGameModeInit
  59.     forward rsip_OnGameModeInit();
  60. #endif
  61.  
  62. static GetServerIP( )
  63. {
  64.     static sIp[ 15 ];
  65.    
  66.     GetServerVarAsString( "bind", sIp, 15 );
  67.     return ( sIp );
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement