mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
added flag z to default access
This commit is contained in:
parent
fe966fa63e
commit
95972cb250
@ -43,8 +43,7 @@ public plugin_init()
|
|||||||
get_basedir( filename , 31 )
|
get_basedir( filename , 31 )
|
||||||
server_cmd("exec %s/amx.cfg" , filename ) // Execute main configuration file
|
server_cmd("exec %s/amx.cfg" , filename ) // Execute main configuration file
|
||||||
format( filename, 63 , "%s/users.ini" , filename )
|
format( filename, 63 , "%s/users.ini" , filename )
|
||||||
loadSettings( filename ) // Load admins accounts
|
loadSettings( filename ) // Load admins accounts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSettings(szFilename[])
|
loadSettings(szFilename[])
|
||||||
@ -138,6 +137,8 @@ getAccess(id,name[],authid[],ip[], password[])
|
|||||||
else {
|
else {
|
||||||
new defaccess[32]
|
new defaccess[32]
|
||||||
get_cvar_string("amx_default_access",defaccess,31)
|
get_cvar_string("amx_default_access",defaccess,31)
|
||||||
|
if (containi(defaccess,"z")==-1)
|
||||||
|
format(defaccess,31,"%sz",defaccess)
|
||||||
new idefaccess = read_flags(defaccess)
|
new idefaccess = read_flags(defaccess)
|
||||||
if (idefaccess){
|
if (idefaccess){
|
||||||
result |= 8
|
result |= 8
|
||||||
@ -201,4 +202,4 @@ public client_authorized(id)
|
|||||||
public client_connect(id)
|
public client_connect(id)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return get_cvar_num( "amx_mode" ) ? accessUser( id ) : PLUGIN_CONTINUE
|
return get_cvar_num( "amx_mode" ) ? accessUser( id ) : PLUGIN_CONTINUE
|
@ -166,6 +166,8 @@ getAccess(id,name[],authid[],ip[], password[]){
|
|||||||
else {
|
else {
|
||||||
new defaccess[32]
|
new defaccess[32]
|
||||||
get_cvar_string("amx_default_access",defaccess,31)
|
get_cvar_string("amx_default_access",defaccess,31)
|
||||||
|
if (containi(defaccess,"z")==-1)
|
||||||
|
format(defaccess,31,"%sz",defaccess)
|
||||||
new idefaccess = read_flags(defaccess)
|
new idefaccess = read_flags(defaccess)
|
||||||
if (idefaccess){
|
if (idefaccess){
|
||||||
result |= 8
|
result |= 8
|
||||||
|
Loading…
Reference in New Issue
Block a user