Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "Bot Nicks"
- #define VERSION "1.0"
- #define AUTHOR "Seroff"
- new Trie:szNiks,dNum;
- new szDefact[][]={
- "skype", "icq", "connect", "guns", ":27", ":25",":26",":24",":23",":22",":21",":20",
- "http:", "https:", "www.", ".net", ".com", ".ua", ".ru", ".info", ".org", ".tv", ".su", ".biz", ".eu", ".uc", ".ee", ".name", ".ucoz",
- ".net", ".de", ".uk", ".lv", ".at", ".3dn", ".my", ".su", ".do", ".am", ".es", ".hu", ".ae", ".po", ".pl", ".lt", ".ro",
- ".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",
- "24","25","26","27","28","29","30","31","32","33","34","35"
- }
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- }
- public plugin_cfg(){
- new config[64];
- get_configsdir(config, 64);
- format(config, 63, "%s/botnames.txt", config);
- szNiks=TrieCreate();
- if(file_exists(config)){
- new iFilePointer = fopen( config, "r"),sLine[10];
- if(iFilePointer != 0){
- new szData[128];
- while(fgets(iFilePointer, szData, 127)){
- replace(szData, 127, "^n", "");
- replace(szData, 127, "^t", "");
- remove_quotes(szData);
- trim(szData);
- strtolower(szData);
- if(strlen(szData)>2){
- dNum++;
- for(new i=0; i < sizeof(szDefact); i++){
- if(containi(szData, szDefact[i]) != -1){
- replace_all(szData,strlen(szData),szDefact[i],"");
- }
- }
- replace_all(szData,strlen(szData),".","");
- num_to_str(dNum-1,sLine,charsmax(sLine));
- TrieSetString(szNiks,sLine,szData);
- }
- }
- fclose(iFilePointer);
- }
- }
- }
- new is_name[32];
- public client_disconnected(id){
- is_name[id]=0;
- }
- public client_infochanged(id){
- new sName[32];
- get_user_name(id,sName,31);
- if (!is_user_connected(id) ||!is_user_bot(id) || (containi(sName, "SuperPub") != -1) || (containi(sName, "superpub2019") != -1)) return 0;
- new sLine[10],sBuffer[512];
- num_to_str ( random(dNum), sLine, charsmax(sLine) );
- TrieGetString(szNiks,sLine,sBuffer,charsmax(sBuffer));
- if(!is_name[id]){
- set_user_info(id,"name",sBuffer);
- is_name[id]=1;
- }
- return 0;
- }
- public plugin_end() {
- TrieDestroy(szNiks);
- }
Advertisement
Add Comment
Please, Sign In to add comment