[Half-Life AMXX] / admin.sma Repository:
ViewVC logotype

Diff of /admin.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 43, Mon Mar 3 06:00:27 2008 UTC revision 44, Mon Oct 11 23:53:51 2010 UTC
# Line 54  Line 54 
54  #define ADMIN_NAME              (1<<4)  #define ADMIN_NAME              (1<<4)
55    
56  new g_cmdLoopback[16]  new g_cmdLoopback[16]
57    new bool:g_CaseSensitiveName[33];
58    
59  // pcvars  // pcvars
60  new amx_mode;  new amx_mode;
# Line 122  Line 122 
122          loadSettings(configsDir)                                        // Load admins accounts          loadSettings(configsDir)                                        // Load admins accounts
123  #endif  #endif
124  }  }
125    public client_connect(id)
126    {
127            g_CaseSensitiveName[id] = false;
128    }
129  public addadminfn(id, level, cid)  public addadminfn(id, level, cid)
130  {  {
131          if (!cmd_access(id, level, cid, 3))          if (!cmd_access(id, level, cid, 3))
# Line 628  Line 631 
631          static AuthData[44];          static AuthData[44];
632          static Password[32];          static Password[32];
633    
634            g_CaseSensitiveName[id] = false;
635    
636          Count=admins_num();          Count=admins_num();
637          for (new i = 0; i < Count; ++i)          for (new i = 0; i < Count; ++i)
638          {          {
# Line 662  Line 667 
667                  }                  }
668                  else                  else
669                  {                  {
670                            if (Flags & FLAG_CASE_SENSITIVE)
671                            {
672                                    if (Flags & FLAG_TAG)
673                                    {
674                                            if (contain(name, AuthData) != -1)
675                                            {
676                                                    index = i
677                                                    g_CaseSensitiveName[id] = true
678                                                    break
679                                            }
680                                    }
681                                    else if (equal(name, AuthData))
682                                    {
683                                            index = i
684                                            g_CaseSensitiveName[id] = true
685                                            break
686                                    }
687                            }
688                            else
689                            {
690                          if (Flags & FLAG_TAG)                          if (Flags & FLAG_TAG)
691                          {                          {
692                                  if (containi(name, AuthData) != -1)                                  if (containi(name, AuthData) != -1)
# Line 677  Line 702 
702                          }                          }
703                  }                  }
704          }          }
705            }
706    
707          if (index != -1)          if (index != -1)
708          {          {
# Line 805  Line 831 
831          get_user_name(id, oldname, 31)          get_user_name(id, oldname, 31)
832          get_user_info(id, "name", newname, 31)          get_user_info(id, "name", newname, 31)
833    
834            if (g_CaseSensitiveName[id])
835            {
836                    if (!equal(newname, oldname))
837                    {
838                            accessUser(id, newname)
839                    }
840            }
841            else
842            {
843          if (!equali(newname, oldname))          if (!equali(newname, oldname))
844          {          {
845                  accessUser(id, newname)                  accessUser(id, newname)
846          }          }
847            }
848          return PLUGIN_CONTINUE          return PLUGIN_CONTINUE
849  }  }
850    

Legend:
Removed from v.43  
changed lines
  Added in v.44

Contact
ViewVC Help
Powered by ViewVC 1.0.4