Navigation: Advanced Features > Server Lua API > Get/Set Options |

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

Return Values

nil

Remarks

Set the integer value of a domain option.

Example: c_SetOptionInt("domain", DOPTION_DATA_ACCESS_INTERFACE_INT, 1)

DOPTION_DATA_ACCESS_INTERFACE_INT is a macro definition of domain options.

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

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

Remarks

Get the integer value of a domain option.

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

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

Return Values

nil

Remarks

Set the integer value of a global option.

Example: c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_ENABLE_INT, 1)

GOPTION_SYSTEM_LOGFILE_ENABLE_INT is a macro definition of global options.

c_SetGlobalOptionStr(int nKey,string strValue)

Parameters

[1]int the key of global option

[2]string the string value

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

Remarks

Get the integer value of a global option.

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

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

Return Values

nil

Remarks

Set the integer value of admin option.

Example: c_SetAdminOptionInt(ADMIN_OPTION_LOGFILE_ENABLE_INT, 1)

ADMIN_OPTION_LOGFILE_ENABLE_INT is a macro definition of admin options.

c_SetAdminOptionStr(int nKey,string strValue)

Parameters

[1]int the key of admin option

[2]string the string value

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

Remarks

Get the integer value of an admin option.

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

Remarks

Get the string value of an admin option.