Navigation:  Advanced Features > Server Lua API >

Get/Set Options

Previous pageReturn to chapter overviewNext page

 

c_SetOptionInt(string strDomain,int nKey,int nValue)

 

Parameters

[1]string   the domain name

[2]int  the key of domain option

[3]int  the integer value of domain option

 

Return Values

nil

 

Remarks

Set the integer value of a domain option.

for example:

c_SetOptionInt("domain", DOPTION_DATA_ACCESS_INTERFACE_INT, 1)

DOPTION_DATA_ACCESS_INTERFACE_INT is a macro definition of domain options, you can check them at the bottom.

 


c_SetOptionStr(string strDomain,int nKey,string strValue)

 

Parameters

[1]string   the domain name

[2]int  the key of domain option

[3]string  the string value of domain option

 

Return Values

nil

 

Remarks

This function is similar to c_SetOptionInt(), it is used for setting the string value of a domain option.

 


c_GetOptionInt(string strDomain,int nKey)

 

Parameters

[1]string   the domain name

[2]int  the key of domain option

 

Return Values

[1]int  the integer value of domain option

 

Remarks

Get the integer value of a domain option.

for example:

local interface = c_GetOptionInt("domain", DOPTION_DATA_ACCESS_INTERFACE_INT)

 


c_GetOptionStr(string strDomain,int nKey)

 

Parameters

[1]string   the domain name

[2]int  the key of domain option

 

Return Values

[1]string  the string value of domain option

 

Remarks

Get the string value of a domain option.

 


c_SetGlobalOptionInt(int nKey,int nValue)

 

Parameters

[1]int  the key of global option

[2]int  the integer value of global option

 

Return Values

nil

 

Remarks

Set the integer value of a global option.

for example:

c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_ENABLE_INT, 1)

GOPTION_SYSTEM_LOGFILE_ENABLE_INT is a macro defination of global options, you can check them on the bottom..

 


c_SetGlobalOptionStr(int nKey,string strValue)

 

Parameters

[1]int  the key of global option

[2]string  the string value of global option

 

Return Values

nil

 

Remarks

This function is similar to c_SetGlobalOptionInt(), it is used for setting the string value of a global option.

 


c_GetGlobalOptionInt(int nKey)

 

Parameters

[1]int  the key of global option

 

Return Values

[1]int  the integer value of global option

 

Remarks

Get the integer value of a global option.

for example:

local enable_systemlog = c_GetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_ENABLE_INT)

 


c_GetGlobalOptionStr(int nKey)

 

Parameters

[1]int  the key of global option

 

Return Values

[1]string  the string value of global option

 

Remarks

Get the string value of a global option.

 


c_SetAdminOptionInt(int nKey,int nValue)

 

Parameters

[1]int  the key of admin option

[2]int  the integer value of admin option

 

Return Values

nil

 

Remarks

Set the integer value of admin option.

for example:

c_SetAdminOptionInt(ADMIN_OPTION_LOGFILE_ENABLE_INT, 1)

ADMIN_OPTION_LOGFILE_ENABLE_INT is a macro defination of admin options, you can check them on the bottom..

 


c_SetAdminOptionStr(int nKey,string strValue)

 

Parameters

[1]int  the key of admin option

[2]string  the string value of admin option

 

Return Values

nil

 

Remarks

This function is similar to c_SetAdminOptionInt(), it is used for setting the string value of an admin option.

 


c_GetAdminOptionInt(int nKey)

 

Parameters

[1]int  the key of admin option

 

Return Values

[1]int  the integer value of admin option

 

Remarks

Get the integer value of an admin option.

for example:

local enable_adminlog = c_GetAdminOptionInt(ADMIN_OPTION_LOGFILE_ENABLE_INT)

 


c_GetAdminOptionStr(int nKey)

 

Parameters

[1]int  the key of admin option

 

Return Values

[1]string  the string value of admin option

 

Remarks

Get the string value of an admin option.