NWNX:EE  8193.36.12
Administration

Readme

Provide functions to administer a server (get/set passwords, boot players, etc.)

Files

file  nwnx_admin.nss
 

Functions

string NWNX_Administration_GetPlayerPassword ()
 Gets the current player password. More...
 
void NWNX_Administration_SetPlayerPassword (string password)
 Sets the password for players to login. More...
 
void NWNX_Administration_ClearPlayerPassword ()
 Clears the player password required to login. More...
 
string NWNX_Administration_GetDMPassword ()
 Gets the current DM password. More...
 
void NWNX_Administration_SetDMPassword (string password)
 Sets the password for DMs to login. More...
 
void NWNX_Administration_ShutdownServer ()
 Signals the server to immediately shut down. More...
 
void NWNX_Administration_DeletePlayerCharacter (object oPC, int bPreserveBackup=TRUE, string sKickMessage="")
 Deletes the player character from the servervault. More...
 
void NWNX_Administration_AddBannedIP (string ip)
 Bans the provided IP. More...
 
void NWNX_Administration_RemoveBannedIP (string ip)
 Removes the ban on the provided IP. More...
 
void NWNX_Administration_AddBannedCDKey (string key)
 Bans the provided Public CD Key. More...
 
void NWNX_Administration_RemoveBannedCDKey (string key)
 Removes the ban on the provided Public CD Key. More...
 
void NWNX_Administration_AddBannedPlayerName (string playerName)
 Bans the provided playername. More...
 
void NWNX_Administration_RemoveBannedPlayerName (string playerName)
 Removes the ban on the provided playername. More...
 
string NWNX_Administration_GetBannedList ()
 Get a list of all banned IPs/Keys/names as a string. More...
 
void NWNX_Administration_SetModuleName (string name)
 Set the module's name as shown to the serverlist. More...
 
void NWNX_Administration_SetServerName (string name)
 Set the server's name as shown to the serverlist. More...
 
string NWNX_Administration_GetServerName ()
 Returns the server's name as shown to the serverlist. More...
 
int NWNX_Administration_GetPlayOption (int option)
 Get an Administration Option value. More...
 
void NWNX_Administration_SetPlayOption (int option, int value)
 Set an Administration Options to a value. More...
 
int NWNX_Administration_DeleteTURD (string playerName, string characterName)
 Delete the TURD of playerName + characterName. More...
 
int NWNX_Administration_GetDebugValue (int type)
 Get an Administration Debug Type value. More...
 
void NWNX_Administration_SetDebugValue (int type, int state)
 Set an Administration Debug Type to a value. More...
 
void NWNX_Administration_ReloadRules ()
 Reload all rules (2da stuff etc). More...
 
int NWNX_Administration_GetMinLevel ()
 Get the servers minimum level. More...
 
void NWNX_Administration_SetMinLevel (int nLevel)
 Set the servers minimum level. More...
 
int NWNX_Administration_GetMaxLevel ()
 Get the servers maximum level. More...
 
void NWNX_Administration_SetMaxLevel (int nLevel)
 Set the servers maximum level. More...
 

Function Documentation

◆ NWNX_Administration_GetPlayerPassword()

string NWNX_Administration_GetPlayerPassword ( )

Gets the current player password.

Returns
The current player password.

Definition at line 180 of file nwnx_admin.nss.

◆ NWNX_Administration_SetPlayerPassword()

void NWNX_Administration_SetPlayerPassword ( string  password)

Sets the password for players to login.

Parameters
passwordThe password to use.

Definition at line 188 of file nwnx_admin.nss.

◆ NWNX_Administration_ClearPlayerPassword()

void NWNX_Administration_ClearPlayerPassword ( )

Clears the player password required to login.

Definition at line 196 of file nwnx_admin.nss.

◆ NWNX_Administration_GetDMPassword()

string NWNX_Administration_GetDMPassword ( )

Gets the current DM password.

Returns
The current DM password.

Definition at line 203 of file nwnx_admin.nss.

◆ NWNX_Administration_SetDMPassword()

void NWNX_Administration_SetDMPassword ( string  password)

Sets the password for DMs to login.

Parameters
passwordThe password to use.

Definition at line 211 of file nwnx_admin.nss.

◆ NWNX_Administration_ShutdownServer()

void NWNX_Administration_ShutdownServer ( )

Signals the server to immediately shut down.

Definition at line 219 of file nwnx_admin.nss.

◆ NWNX_Administration_DeletePlayerCharacter()

void NWNX_Administration_DeletePlayerCharacter ( object  oPC,
int  bPreserveBackup = TRUE,
string  sKickMessage = "" 
)

Deletes the player character from the servervault.

The PC will be immediately booted from the game with a "Delete Character" message

Parameters
oPCThe player to delete.
bPreserveBackupIf true, it will leave the file on server, only appending ".deleted0" to the bic filename.
sKickMessageAn optional kick message, if left blank it will default to "Delete Character" as reason.

Definition at line 226 of file nwnx_admin.nss.

◆ NWNX_Administration_AddBannedIP()

void NWNX_Administration_AddBannedIP ( string  ip)

Bans the provided IP.

Parameters
ipThe IP Address to ban.

Definition at line 236 of file nwnx_admin.nss.

◆ NWNX_Administration_RemoveBannedIP()

void NWNX_Administration_RemoveBannedIP ( string  ip)

Removes the ban on the provided IP.

Parameters
ipThe IP Address to unban.

Definition at line 243 of file nwnx_admin.nss.

◆ NWNX_Administration_AddBannedCDKey()

void NWNX_Administration_AddBannedCDKey ( string  key)

Bans the provided Public CD Key.

Parameters
keyThe Public CD Key to ban.

Definition at line 250 of file nwnx_admin.nss.

◆ NWNX_Administration_RemoveBannedCDKey()

void NWNX_Administration_RemoveBannedCDKey ( string  key)

Removes the ban on the provided Public CD Key.

Parameters
keyThe Public CD Key to unban.

Definition at line 257 of file nwnx_admin.nss.

◆ NWNX_Administration_AddBannedPlayerName()

void NWNX_Administration_AddBannedPlayerName ( string  playerName)

Bans the provided playername.

Parameters
playerNameThe player name (community name) to ban.
Warning
A user can change their playername at will.

Definition at line 264 of file nwnx_admin.nss.

◆ NWNX_Administration_RemoveBannedPlayerName()

void NWNX_Administration_RemoveBannedPlayerName ( string  playerName)

Removes the ban on the provided playername.

Parameters
playerNameThe player name (community name) to unban.

Definition at line 271 of file nwnx_admin.nss.

◆ NWNX_Administration_GetBannedList()

string NWNX_Administration_GetBannedList ( )

Get a list of all banned IPs/Keys/names as a string.

Returns
A string with a listing of the banned IPs/Keys/names.

Definition at line 278 of file nwnx_admin.nss.

◆ NWNX_Administration_SetModuleName()

void NWNX_Administration_SetModuleName ( string  name)

Set the module's name as shown to the serverlist.

Parameters
nameThe name to give the module.

Definition at line 286 of file nwnx_admin.nss.

◆ NWNX_Administration_SetServerName()

void NWNX_Administration_SetServerName ( string  name)

Set the server's name as shown to the serverlist.

Parameters
nameThe name to give the server.

Definition at line 294 of file nwnx_admin.nss.

◆ NWNX_Administration_GetServerName()

string NWNX_Administration_GetServerName ( )

Returns the server's name as shown to the serverlist.

Definition at line 302 of file nwnx_admin.nss.

◆ NWNX_Administration_GetPlayOption()

int NWNX_Administration_GetPlayOption ( int  option)

Get an Administration Option value.

Parameters
optionAn Administration Option.
Returns
The current setting for the supplied option from Administration Options.

Definition at line 309 of file nwnx_admin.nss.

◆ NWNX_Administration_SetPlayOption()

void NWNX_Administration_SetPlayOption ( int  option,
int  value 
)

Set an Administration Options to a value.

Parameters
optionThe option to adjust from Administration Options.
valueThe new value for the option.

Definition at line 319 of file nwnx_admin.nss.

◆ NWNX_Administration_DeleteTURD()

int NWNX_Administration_DeleteTURD ( string  playerName,
string  characterName 
)

Delete the TURD of playerName + characterName.

At times a PC may get stuck in a permanent crash loop when attempting to log in. This function allows administrators to delete their Temporary User Resource Data where the PC's current location is stored allowing them to log into the starting area.

Parameters
playerNameThe community (login name).
characterNameThe character name.
Returns
Returns TRUE if successful

Definition at line 328 of file nwnx_admin.nss.

◆ NWNX_Administration_GetDebugValue()

int NWNX_Administration_GetDebugValue ( int  type)

Get an Administration Debug Type value.

Parameters
typeAn Administration Debug Type.
Returns
The current value for the supplied debug type from Administration Debug Types.

Definition at line 339 of file nwnx_admin.nss.

◆ NWNX_Administration_SetDebugValue()

void NWNX_Administration_SetDebugValue ( int  type,
int  state 
)

Set an Administration Debug Type to a value.

Parameters
typeThe debug type to adjust from Administration Debug Types.
stateThe new state for the debug type, TRUE or FALSE

Definition at line 349 of file nwnx_admin.nss.

◆ NWNX_Administration_ReloadRules()

void NWNX_Administration_ReloadRules ( )

Reload all rules (2da stuff etc).

Warning
DANGER, DRAGONS. Bad things may or may not happen.

Definition at line 358 of file nwnx_admin.nss.

◆ NWNX_Administration_GetMinLevel()

int NWNX_Administration_GetMinLevel ( )

Get the servers minimum level.

Returns
The minimum level for the server.

Definition at line 365 of file nwnx_admin.nss.

◆ NWNX_Administration_SetMinLevel()

void NWNX_Administration_SetMinLevel ( int  nLevel)

Set the servers minimum level.

Parameters
nLevelThe minimum level for the server.

Definition at line 372 of file nwnx_admin.nss.

◆ NWNX_Administration_GetMaxLevel()

int NWNX_Administration_GetMaxLevel ( )

Get the servers maximum level.

Returns
The maximum level for the server.

Definition at line 379 of file nwnx_admin.nss.

◆ NWNX_Administration_SetMaxLevel()

void NWNX_Administration_SetMaxLevel ( int  nLevel)

Set the servers maximum level.

Note
Attention when using this and the MaxLevel plugin. They both change the same value.
Parameters
nLevelThe maximum level for the server.

Definition at line 386 of file nwnx_admin.nss.

Variable Documentation

◆ NWNX_ADMINISTRATION_OPTION_ALL_KILLABLE

const int NWNX_ADMINISTRATION_OPTION_ALL_KILLABLE = 0

Definition at line 13 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_NON_PARTY_KILLABLE

const int NWNX_ADMINISTRATION_OPTION_NON_PARTY_KILLABLE = 1

Definition at line 14 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_REQUIRE_RESURRECTION

const int NWNX_ADMINISTRATION_OPTION_REQUIRE_RESURRECTION = 2

Definition at line 15 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_STOLEN_ITEMS

const int NWNX_ADMINISTRATION_OPTION_LOSE_STOLEN_ITEMS = 3

Definition at line 16 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS

const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS = 4

Definition at line 17 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_EXP

const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP = 5

Definition at line 18 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_GOLD

const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD = 6

Definition at line 19 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_GOLD_NUM

const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD_NUM = 7

Definition at line 20 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_EXP_NUM

const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP_NUM = 8

Definition at line 21 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS_NUM

const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS_NUM = 9

Definition at line 22 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_PVP_SETTING

const int NWNX_ADMINISTRATION_OPTION_PVP_SETTING = 10

Definition at line 23 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_PAUSE_AND_PLAY

const int NWNX_ADMINISTRATION_OPTION_PAUSE_AND_PLAY = 11

Definition at line 24 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_ONE_PARTY_ONLY

const int NWNX_ADMINISTRATION_OPTION_ONE_PARTY_ONLY = 12

Definition at line 25 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_ENFORCE_LEGAL_CHARACTERS

const int NWNX_ADMINISTRATION_OPTION_ENFORCE_LEGAL_CHARACTERS = 13

Definition at line 26 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_ITEM_LEVEL_RESTRICTIONS

const int NWNX_ADMINISTRATION_OPTION_ITEM_LEVEL_RESTRICTIONS = 14

Definition at line 27 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_CDKEY_BANLIST_ALLOWLIST

const int NWNX_ADMINISTRATION_OPTION_CDKEY_BANLIST_ALLOWLIST = 15

Definition at line 28 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_DISALLOW_SHOUTING

const int NWNX_ADMINISTRATION_OPTION_DISALLOW_SHOUTING = 16

Definition at line 29 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_SHOW_DM_JOIN_MESSAGE

const int NWNX_ADMINISTRATION_OPTION_SHOW_DM_JOIN_MESSAGE = 17

Definition at line 30 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_BACKUP_SAVED_CHARACTERS

const int NWNX_ADMINISTRATION_OPTION_BACKUP_SAVED_CHARACTERS = 18

Definition at line 31 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_AUTO_FAIL_SAVE_ON_1

const int NWNX_ADMINISTRATION_OPTION_AUTO_FAIL_SAVE_ON_1 = 19

Definition at line 32 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_VALIDATE_SPELLS

const int NWNX_ADMINISTRATION_OPTION_VALIDATE_SPELLS = 20

Definition at line 33 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS

const int NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS = 21

Definition at line 34 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_EXAMINE_CHALLENGE_RATING

const int NWNX_ADMINISTRATION_OPTION_EXAMINE_CHALLENGE_RATING = 22

Definition at line 35 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_USE_MAX_HITPOINTS

const int NWNX_ADMINISTRATION_OPTION_USE_MAX_HITPOINTS = 23

Definition at line 36 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_RESTORE_SPELLS_USES

const int NWNX_ADMINISTRATION_OPTION_RESTORE_SPELLS_USES = 24

Definition at line 37 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_RESET_ENCOUNTER_SPAWN_POOL

const int NWNX_ADMINISTRATION_OPTION_RESET_ENCOUNTER_SPAWN_POOL = 25

Definition at line 38 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_HIDE_HITPOINTS_GAINED

const int NWNX_ADMINISTRATION_OPTION_HIDE_HITPOINTS_GAINED = 26

Definition at line 39 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_PLAYER_PARTY_CONTROL

const int NWNX_ADMINISTRATION_OPTION_PLAYER_PARTY_CONTROL = 27

Definition at line 40 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_OPTION_SHOW_PLAYER_JOIN_MESSAGES

const int NWNX_ADMINISTRATION_OPTION_SHOW_PLAYER_JOIN_MESSAGES = 28

Definition at line 41 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_DEBUG_COMBAT

const int NWNX_ADMINISTRATION_DEBUG_COMBAT = 0

Definition at line 48 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_DEBUG_SAVING_THROW

const int NWNX_ADMINISTRATION_DEBUG_SAVING_THROW = 1

Definition at line 49 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED

const int NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED = 2

Definition at line 50 of file nwnx_admin.nss.

◆ NWNX_ADMINISTRATION_DEBUG_HIT_DIE

const int NWNX_ADMINISTRATION_DEBUG_HIT_DIE = 3

Definition at line 51 of file nwnx_admin.nss.