World of Hello
server.h
1 
11 class server
12 {
13  public:
20  static bool isConnected();
37  static server sendToClients(string command, string commandStr, bool removable=true, string key="", string keyStr="");
52  static server setKey(conditional<string, int> user, string key, string keyVal);
66  static server addKey(conditional<string, int> user, string key, string keyVal);
83  static server removeKey(conditional<string, int> user, string key, string keyVal="");
94  static conditional<multiReturn<element*, string>, multiReturn<mesh*,string>, multiReturn<ServerObject*,string>, nil> getObjectFromCommand(string command);
105  static server getObjects(string location);
121  static server sendScript(string scriptName, string scriptCont=game:getScript(scriptName), function func=null, ...);
137  static server sendFile(string filePath, function func=null, ...);
154  static server sendFile(string filePath, string serverFilePath, function func=null, ...);
172  static server sendFile(string serverFilePath, string fileContent, bool anyVal, function func=null, ...);
185  static server appendFile(string serverFilePath, string content, function func=null, ...);
199  static server getFile(string serverFilePath, function func=null, ...);
213  static server downloadFile(string serverFilePath, function func=null, ...);
229  static server renameFile(string serverFilePath, sring newServerFilePath, function func=null, ...);
245  static server deleteFile(string serverFilePath, function func=null, ...);
265  static server getFilePaths(string serverFolderPath, string find="", bool recursive=false, int maxResults=100, int page=0, function func, ...);
280  static server getScriptPaths(string serverFilePath, function func, ...);
293  static server getAccountPermissions(string accountName, function func, ...);
310  static server getAccountsWithPermissions(string permission, string permissionStr, function func, ...);
326  static server getAccountsWithPermissions(string permission, function func, ...);
340  static server findAccounts(string name, int max, int page, function func, ...);
356  static server addPermission(string account, string permission, string permissionStr, bool enabled=true, function func=null, ...);
373  static server removePermission(string account, string permission, string permissionStr="", bool enabled=true, function func=null, ...);
388  static server getAccountIsStaff(string account, function func, ...);
401  static server setAccountIsStaff(string account, bool isStaff=true, function func=null, ...);
415  static server getWorldProperties(function func, ...);
430  static server addWorldProperty(string property, string propertyStr, bool enabled=true, function func=null, ...);
446  static server removeWorldProperty(string property, string propertyStr="", bool enabled=true, function func=null, ...);
458  static server getOnlineList(function func, ...);
474  static server getAccountsByName(string name, int maxResults=100, int page=0, function func, ...);
486  static server getServerList(function func, ...);
502  static int getSendMessageCount(string command);
517  static server getVar(string textFilePath, string variable, function func, ...);
534  static server setVar(string textFilePath, string variable, string value, function func=null, ...);
552  static server ping(string message, function func, ...);
566  static server getSQL(string dbFile, string SQL, function func, ...);
580  static server sendGit(string command, string location="", function func=null, ...);
596  static server getClientsWithKeys(string key, string valVal, function func, ...);
611  static server getClientsWithKeys(string key, function func, ...);
626  static server getNPCServers(function func, ...);
636  static server createNPCServer(string name, function func=null, ...);
646  static server removeNPCServer(string name, function func=null, ...);
659  static server startNPCServer(string name, bool onServer=true, function func=null, ...);
669  static server stopNPCServer(string name, function func=null, ...);
681  static server setNPCServerBootOnInit(string name, bool bootOnInit=true, function func=null, ...);
693  static server setNPCServerFaultTolerant(string name, bool faultTolerant=true, function func=null, ...);
694  protected:
695  private:
696 };
server::getOnlineList
static server getOnlineList(function func,...)
gets a list of all connected user accounts.
server::setNPCServerFaultTolerant
static server setNPCServerFaultTolerant(string name, bool faultTolerant=true, function func=null,...)
sets whether or not the NPCServer is fault-tolerant.
server::getWorldProperties
static server getWorldProperties(function func,...)
get the world's properties.
server::removeKey
static server removeKey(conditional< string, int > user, string key, string keyVal="")
removes a key or keyVal from the client.
server::getObjects
static server getObjects(string location)
get objects saved on the server.
game
the game program/application.
Definition: game.h:5
server::sendScript
static server sendScript(string scriptName, string scriptCont=game:getScript(scriptName), function func=null,...)
sends the script to the server.
server::appendFile
static server appendFile(string serverFilePath, string content, function func=null,...)
appends content to the end of a server file.
server::setVar
static server setVar(string textFilePath, string variable, string value, function func=null,...)
sets a stored value to the server.
server::getNPCServers
static server getNPCServers(function func,...)
gets a list of NPC servers and their status
server::sendFile
static server sendFile(string filePath, function func=null,...)
sends a file to the server.
server::removePermission
static server removePermission(string account, string permission, string permissionStr="", bool enabled=true, function func=null,...)
Removes a permission from the client.
server::getFile
static server getFile(string serverFilePath, function func=null,...)
get a file from the server.
server::downloadFile
static server downloadFile(string serverFilePath, function func=null,...)
downloads a file from the server and lets the user pick a save location.
server::getScriptPaths
static server getScriptPaths(string serverFilePath, function func,...)
gets a list of scripts from the server that the user is also running.
server::getAccountPermissions
static server getAccountPermissions(string accountName, function func,...)
get and account's permissions.
server::getAccountIsStaff
static server getAccountIsStaff(string account, function func,...)
gets whether the client is a staff member or not.
server::startNPCServer
static server startNPCServer(string name, bool onServer=true, function func=null,...)
starts an NPCServer.
server::removeNPCServer
static server removeNPCServer(string name, function func=null,...)
removes an NPCServer.
server::isConnected
static bool isConnected()
checks if the user is online or offline.
server
used for anything related to the server.
Definition: server.h:11
server::getClientsWithKeys
static server getClientsWithKeys(string key, string valVal, function func,...)
gets a list of clients who have the given keys.
server::getServerList
static server getServerList(function func,...)
gets a list of all worlds.
server::getVar
static server getVar(string textFilePath, string variable, function func,...)
gets a stored value from the server.
server::findAccounts
static server findAccounts(string name, int max, int page, function func,...)
gets a list of accounts that may match a given name.
server::getSQL
static server getSQL(string dbFile, string SQL, function func,...)
sends an SQL command to the server to receive the results.
server::sendGit
static server sendGit(string command, string location="", function func=null,...)
sends a git command to be ran on the server.
server::addPermission
static server addPermission(string account, string permission, string permissionStr, bool enabled=true, function func=null,...)
Adds a permission to the client.
server::getObjectFromCommand
static conditional< multiReturn< element *, string >, multiReturn< mesh *, string >, multiReturn< ServerObject *, string >, nil > getObjectFromCommand(string command)
gets an object based on the server command.
server::addKey
static server addKey(conditional< string, int > user, string key, string keyVal)
adds a user variable key for sending data to clients.
server::getAccountsByName
static server getAccountsByName(string name, int maxResults=100, int page=0, function func,...)
gets a list of accounts by name.
server::createNPCServer
static server createNPCServer(string name, function func=null,...)
creates a new NPCServer.
server::sendToClients
static server sendToClients(string command, string commandStr, bool removable=true, string key="", string keyStr="")
send a command to clients.
server::getSendMessageCount
static int getSendMessageCount(string command)
get the amount of messages being sent for a command.
server::renameFile
static server renameFile(string serverFilePath, sring newServerFilePath, function func=null,...)
renames a server file to a new name.
server::addWorldProperty
static server addWorldProperty(string property, string propertyStr, bool enabled=true, function func=null,...)
adds a world property to the world.
server::ping
static server ping(string message, function func,...)
pings the server to grab a response.
server::setAccountIsStaff
static server setAccountIsStaff(string account, bool isStaff=true, function func=null,...)
sets whether the client is a staff member or not,
server::getAccountsWithPermissions
static server getAccountsWithPermissions(string permission, string permissionStr, function func,...)
gets a list of accounts who have the provided permissions.
server::deleteFile
static server deleteFile(string serverFilePath, function func=null,...)
deletes a file from the server.
server::setKey
static server setKey(conditional< string, int > user, string key, string keyVal)
set a user variable key for receiving certain data.
server::setNPCServerBootOnInit
static server setNPCServerBootOnInit(string name, bool bootOnInit=true, function func=null,...)
sets whether or not the NPCServer boots when the world is initialized.
server::stopNPCServer
static server stopNPCServer(string name, function func=null,...)
stops an NPCServer.
account
the user (client) account.
Definition: account.h:7
server::getFilePaths
static server getFilePaths(string serverFolderPath, string find="", bool recursive=false, int maxResults=100, int page=0, function func,...)
gets a list of files in a server's world directory.
server::removeWorldProperty
static server removeWorldProperty(string property, string propertyStr="", bool enabled=true, function func=null,...)
removes a world property from the world.