Reset bot Name

Source: Internet
Author: User

1 /**2 * Re-set bot name (resetbotname)3 * There must be at least 32 alternate names in the Botname.lst, or the frying suits4 * Bing Lian Mutual creation | exhibition Hung wrote 2015-1-105  */6 7#include <amxmodx>8 9 ConstMax_name = -;Ten Newg_szbotnames[max_name][ -]; One NewG_icount =1; A  -  PublicPlugin_precache () - { theRegister_plugin ("Resetbotname","1.0","Suic"); - load_name (); - } -  + stock Load_name () - { +     Newhfile = fopen ("Addons/amxmodx/configs/botname.lst","RB"); A      at     if(!hfile) -         return; -      -     Newszdata[ -]; -      -      while(!feof (hfile)) in     { - fgets (hfile, Szdata, Charsmax (szdata)); to trim (szdata); +          -         if(!szdata[0] || szdata[0] ==';'|| szdata[0] =='/') the             Continue; *          $Copy (g_szbotnames[g_icount++],sizeofG_szbotnames[]-1, szdata);Panax Notoginseng     } -      the fclose (hfile); + } A  the  Publicclient_putinserver (ID) + { -     if(!Is_user_bot (ID)) $         return; $      -     Newszname[ -]; -      the      Do{ - getrandomname (SzName, Charsmax (SzName));Wuyi     } the      while(!CheckName (szName)) -      WuSet_user_info (ID,"name", szName); - } About  $ stock Getrandomname (szname[], IMax) - { -     NewIRandom = Random_num (1, G_icount-1); -Format (SzName, IMax,"%s", G_szbotnames[irandom]); A } +  theStock CheckName (Constszname[]) - { $     Newszbuff[ -]; the      the      for(NewID =1; ID <= +; ++ID) the     { the         if(!is_user_connected (ID)) -             Continue; in          the get_user_name (ID, Szbuff, Charsmax (Szbuff)); the         if(Equali (SzName, szbuff)) About             return false; the     } the      the     return true; +}

Reset bot Name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.