# console_cmds.cpp File Reference

Implementation of the console hooks. More...

`#include "stdafx.h"`
`#include "console_internal.h"`
`#include "debug.h"`
`#include "engine_func.h"`
`#include "landscape.h"`
`#include "saveload/saveload.h"`
`#include "network/network.h"`
`#include "network/network_func.h"`
`#include "network/network_base.h"`
`#include "command_func.h"`
`#include "settings_func.h"`
`#include "fios.h"`
`#include "fileio_func.h"`
`#include "screenshot.h"`
`#include "genworld.h"`
`#include "strings_func.h"`
`#include "viewport_func.h"`
`#include "window_func.h"`
`#include "date_func.h"`
`#include "vehicle_func.h"`
`#include "company_func.h"`
`#include "company_base.h"`
`#include "gamelog.h"`
`#include "ai/ai.hpp"`
`#include "ai/ai_config.hpp"`
`#include "console_func.h"`
`#include "table/strings.h"`
`#include "network/network_content.h"`

Go to the source code of this file.

## Data Structures
struct | ConsoleContentCallback
| Asynchronous callback. More...
## Defines
#define | DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
#define | DEF_CONSOLE_HOOK(function) static bool function()
## Functions
static bool | NetworkAvailable ()
| DEF_CONSOLE_HOOK (ConHookServerOnly)
| DEF_CONSOLE_HOOK (ConHookClientOnly)
| DEF_CONSOLE_HOOK (ConHookNeedNetwork)
| DEF_CONSOLE_HOOK (ConHookNoNetwork)
static void | IConsoleHelp (const char *str)
| DEF_CONSOLE_CMD (ConResetEngines)
| DEF_CONSOLE_CMD (ConScrollToTile)
void | BuildFileList ()
void | SetFiosType (const byte fiostype)
| DEF_CONSOLE_CMD (ConSave)
| DEF_CONSOLE_CMD (ConSaveConfig)
static const FiosItem * | GetFiosItem (const char *file)
| DEF_CONSOLE_CMD (ConLoad)
| DEF_CONSOLE_CMD (ConRemove)
| DEF_CONSOLE_CMD (ConListFiles)
| DEF_CONSOLE_CMD (ConChangeDirectory)
| DEF_CONSOLE_CMD (ConPrintWorkingDirectory)
| DEF_CONSOLE_CMD (ConClearBuffer)
| DEF_CONSOLE_CMD (ConBan)
| DEF_CONSOLE_CMD (ConUnBan)
| DEF_CONSOLE_CMD (ConBanList)
| DEF_CONSOLE_CMD (ConPauseGame)
| DEF_CONSOLE_CMD (ConUnPauseGame)
| DEF_CONSOLE_CMD (ConRcon)
| DEF_CONSOLE_CMD (ConStatus)
| DEF_CONSOLE_CMD (ConServerInfo)
| DEF_CONSOLE_CMD (ConClientNickChange)
| DEF_CONSOLE_CMD (ConKick)
| DEF_CONSOLE_CMD (ConJoinCompany)
| DEF_CONSOLE_CMD (ConMoveClient)
| DEF_CONSOLE_CMD (ConResetCompany)
| DEF_CONSOLE_CMD (ConNetworkClients)
| DEF_CONSOLE_CMD (ConNetworkReconnect)
| DEF_CONSOLE_CMD (ConNetworkConnect)
| DEF_CONSOLE_CMD (ConExec)
| DEF_CONSOLE_CMD (ConReturn)
bool | CloseConsoleLogIfActive ()
| DEF_CONSOLE_CMD (ConScript)
| DEF_CONSOLE_CMD (ConEcho)
| DEF_CONSOLE_CMD (ConEchoC)
| DEF_CONSOLE_CMD (ConNewGame)
void | SwitchToMode (SwitchMode new_mode)
| DEF_CONSOLE_CMD (ConRestart)
| DEF_CONSOLE_CMD (ConListAI)
| DEF_CONSOLE_CMD (ConStartAI)
| DEF_CONSOLE_CMD (ConReloadAI)
| DEF_CONSOLE_CMD (ConStopAI)
| DEF_CONSOLE_CMD (ConRescanAI)
| DEF_CONSOLE_CMD (ConGetSeed)
| DEF_CONSOLE_CMD (ConGetDate)
| DEF_CONSOLE_CMD (ConAlias)
| DEF_CONSOLE_CMD (ConScreenShot)
| DEF_CONSOLE_CMD (ConInfoCmd)
| DEF_CONSOLE_CMD (ConDebugLevel)
| DEF_CONSOLE_CMD (ConExit)
| DEF_CONSOLE_CMD (ConPart)
| DEF_CONSOLE_CMD (ConHelp)
| DEF_CONSOLE_CMD (ConListCommands)
| DEF_CONSOLE_CMD (ConListAliases)
| DEF_CONSOLE_CMD (ConSay)
| DEF_CONSOLE_CMD (ConCompanies)
| DEF_CONSOLE_CMD (ConSayCompany)
| DEF_CONSOLE_CMD (ConSayClient)
void | HashCurrentCompanyPassword (const char *password)
| Hash the current company password; used when the server 'company' sets his/her password.
| DEF_CONSOLE_CMD (ConCompanyPassword)
static ContentType | StringToContentType (const char *str)
| Resolve a string to a content type.
| DEF_CONSOLE_CMD (ConContent)
| DEF_CONSOLE_CMD (ConSetting)
| DEF_CONSOLE_CMD (ConSettingNewgame)
| DEF_CONSOLE_CMD (ConListSettings)
| DEF_CONSOLE_CMD (ConGamelogPrint)
void | IConsoleStdLibRegister ()
## Variables
static FILE * | _script_file
static bool | _script_running

## Detailed Description

Implementation of the console hooks.

Definition in file console_cmds.cpp.

## Function Documentation

static ContentType StringToContentType | ( | const char * | str | ) | `[static]`

Resolve a string to a content type.

Definition at line 1523 of file console_cmds.cpp.

References CONTENT_TYPE_END, and lengthof.