seroff

Bot Nicks By Seroff

Feb 3rd, 2020
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Bot Nicks"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Seroff"
  7.  
  8. new Trie:szNiks,dNum;
  9.  
  10. new szDefact[][]={
  11. "skype", "icq", "connect", "guns", ":27", ":25",":26",":24",":23",":22",":21",":20",
  12. "http:", "https:", "www.", ".net", ".com", ".ua", ".ru", ".info", ".org", ".tv", ".su", ".biz", ".eu", ".uc", ".ee", ".name", ".ucoz",
  13. ".net", ".de", ".uk", ".lv", ".at", ".3dn", ".my", ".su", ".do", ".am", ".es", ".hu", ".ae", ".po", ".pl", ".lt", ".ro",
  14. ".rf",".myl",":28","gamelive","megafrag","amx","sv_","mp_","cl_","gl_",";",":","@",".","#","$","%","&","+","'","/","\","hostname","rcon","password","admin","vip","15","15","15","16","17","18","19","20","21","22","23",
  15. "24","25","26","27","28","29","30","31","32","33","34","35"
  16. }
  17.  
  18.  
  19. public plugin_init() {
  20. register_plugin(PLUGIN, VERSION, AUTHOR);
  21. }
  22.  
  23. public plugin_cfg(){
  24. new config[64];
  25. get_configsdir(config, 64);
  26. format(config, 63, "%s/botnames.txt", config);
  27. szNiks=TrieCreate();
  28. if(file_exists(config)){
  29. new iFilePointer = fopen( config, "r"),sLine[10];
  30. if(iFilePointer != 0){
  31. new szData[128];
  32. while(fgets(iFilePointer, szData, 127)){
  33. replace(szData, 127, "^n", "");
  34. replace(szData, 127, "^t", "");
  35. remove_quotes(szData);
  36. trim(szData);
  37. strtolower(szData);
  38. if(strlen(szData)>2){
  39. dNum++;
  40. for(new i=0; i < sizeof(szDefact); i++){
  41. if(containi(szData, szDefact[i]) != -1){
  42. replace_all(szData,strlen(szData),szDefact[i],"");
  43. }
  44. }
  45. replace_all(szData,strlen(szData),".","");
  46. num_to_str(dNum-1,sLine,charsmax(sLine));
  47. TrieSetString(szNiks,sLine,szData);
  48. }
  49. }
  50. fclose(iFilePointer);
  51. }
  52. }
  53. }
  54.  
  55. new is_name[32];
  56.  
  57. public client_disconnected(id){
  58. is_name[id]=0;
  59. }
  60.  
  61. public client_infochanged(id){
  62. new sName[32];
  63. get_user_name(id,sName,31);
  64. if (!is_user_connected(id) ||!is_user_bot(id) || (containi(sName, "SuperPub") != -1) || (containi(sName, "superpub2019") != -1)) return 0;
  65. new sLine[10],sBuffer[512];
  66. num_to_str ( random(dNum), sLine, charsmax(sLine) );
  67. TrieGetString(szNiks,sLine,sBuffer,charsmax(sBuffer));
  68. if(!is_name[id]){
  69. set_user_info(id,"name",sBuffer);
  70. is_name[id]=1;
  71. }
  72. return 0;
  73. }
  74.  
  75. public plugin_end() {
  76. TrieDestroy(szNiks);
  77. }
Advertisement
Add Comment
Please, Sign In to add comment