daily pastebin goal
91%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public SpamFound(playerid, text[])
  2. {
  3.  
  4.     new sql[256];
  5.     new escapedtext[256];
  6.     new row[16];
  7.     new spamres;
  8.     if (PlayerInfo[playerid][pAdmin] > 0) return 0;
  9.     samp_mysql_real_escape_string(text, escapedtext);
  10.     format(sql, sizeof(sql), "SELECT '%s' REGEXP '([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})'", escapedtext);
  11.     samp_mysql_query(sql);
  12.     samp_mysql_store_result();
  13.     if (samp_mysql_num_rows() > 0)
  14.     {
  15.         samp_mysql_fetch_row(row);
  16.         spamres = strval(row);
  17.         return spamres;
  18.     }
  19.     return 0;
  20.  
  21.     for (new i = 0; i < totalspamwords; i++)
  22.     {
  23.         if (strlen(SpamWords[i]) && strfind(text, SpamWords[i], true, 0) > -1) return 1;
  24.     }
  25.     return 0;
  26. }
  27.  
  28. if (SpamFound(playerid, text))
  29.     {
  30.     GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
  31.     SendClientMessage(playerid, LIGHTRED, "Has sido baneado por SPAM.");
  32.     format(string, sizeof(string), "[CTA-BOT]: %s ha sido baneado por gilipoyas, raz√≥n: SPAM (%s)", giveplayer, text);
  33.     SendAdminMessage(COLOR_YELLOW, string);
  34.     BanLog(string);
  35.     Ban(playerid);
  36.     return 0;
  37.     }
  38.  
  39. #define MAX_SPAMWORDS 100
  40.  
  41. forward SpamFound(playerid, text[]);
  42.  
  43. new totalspamwords=0, totalfacciones=0;
  44. new SpamWords[MAX_SPAMWORDS][32];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top