MuhammadZeeshan

unban cmd

Dec 13th, 2016
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. else if ( cmd == "!unban" )
  2. {
  3.  if ( level < 3 ) EchoNotice1( user, ICOL_RED + "Error - Your level is not high enough to use that command." );
  4.  else if ( !text ) EchoNotice1(user, ICOL_RED+"Syntax: " + cmd + " <playername>" );
  5.  else  
  6.    {
  7.    local q = QuerySQL( db, "SELECT * FROM Bans WHERE Name='" + text + "' COLLATE NOCASE" );
  8.    if ( GetSQLColumnData( q, 0 ) )
  9.    {
  10.    Message( "IRC-Admin [ " + user + " ] has unbanned the player: [ "  + text +  " ]." );
  11.    EchoMessage( ICOL_BLUE+"Admin [ " + user + " ] has unbanned the player: [ "  + text +  " ]." );
  12.    EchoMessage1( ICOL_BLUE+"Admin [ " + user + " ] has unbanned the player: [ "  + text +  " ]." );
  13.    QuerySQL( db, "DELETE FROM Bans WHERE Name='" + text + "'" );  
  14.    }
  15.    else EchoNotice1(user, ICOL_RED+"The player is not in our banlist" );
  16.    FreeSQLQuery( q );  
  17.    }
  18. }
Add Comment
Please, Sign In to add comment