Nebulae MutiUser Server NEBULAE MUTIUSER SERVER HELP: NEBULAE COMMAND LIST  
 

Nebulae also implements extended commands not available in Macromedia's Shockwave MultiUser server. Most are used for server administration purposes, but there are a few extensions to the DBObject commands that were planned to make the life of the multiuser developer easier. These commands will not produce an error when used with the Shockwave MultiUser server but you should probably check the response to "system.server.getVersion" to make sure you are connected to a Nebulae server before using them.

 

NEBULAE SQL COMMANDS

 

system.SQL.executeQuery

Description: Executes an SQL query through Nebulae's SQL gateway. Nebulae constructs a prepared SQL statement using the query and Lingo values supplied, which are automatically mapped to the corresponding SQL data types. This avoids the problem of quoting strings, a common issue in all SQL queries. For simple queries (containing no ? elements) the #values parameter is an empty list.

Message recipient: system.SQL.executeQuery

Content parameters: [#sql:"sql query ",#values:[]]

Lingo example: sendNetMessage(“system.SQL.executeQuery”,”anysubject”, [#sql:"SELECT NAME,PHONE FROM ADDRESSES WHERE STREET=? AND NUMBER>?",#values:["California",1000]])

Server reply content: [["John Taylor","5551234"], ["Anthony Fields","5551432"]]

Remarks: Nebulae will return each matching row as a separate list inside a master list, with the values converted from SQL types to the appropriate Lingo types.

 

system.SQL.executeUpdate

Description: Executes an SQL update through Nebulae's SQL gateway. An SQL update is an instruction that does not return a selection (INSERT INTO, UPDATE, CREATE, etc.) Nebulae constructs a prepared SQL statement using the query and Lingo values supplied, which are automatically mapped to the corresponding SQL data types. This avoids the problem of quoting strings, a common issue in all SQL queries. For simple queries (containing no ? elements) the #values parameter is an empty list.

Message recipient: system.SQL.executeUpdate

Content parameters: [#sql:"sql query ",#values:[]]

Lingo example: sendNetMessage(“system.SQL.executeUpdate”,”anysubject”, [#sql:"UPDATE ADDRESSES SET PHONE=? WHERE NAME=?",["5551234","John Taylor"]])

Server reply content: "UpdateOK", or a MUS error message

Remarks: None

 

system.SQL.connect

Description: Connects Nebulae to an SQL database. This command is usually not necessary, since Nebulae connects automatically to the default SQL database when the server starts, using the SQL directive in the Nebulae.cfg file.

Each Nebulae server can only be connected to one SQL database at any given time, so this command will fail if a connection is already established. The parameters correspond to JDBC parameters for a database connection.

Message recipient: system.SQL.connect

Content parameters: [#userid:"name",#password:"",#driver:"org.hsqldb.jdbcDriver", #url:"jdbc:hsqldb:NebulaeSQL"]

Lingo example: sendNetMessage(“system.SQL.connect”,”anysubject”, [#userid:"sa",#password:"",#driver:"org.hsqldb.jdbcDriver", #url:"jdbc:hsqldb:NebulaeSQL"])

Server reply content: "Connected", or a MUS error message.

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.SQL.disconnect

Description: Disconnects Nebulae to an SQL database. This command is usually not necessary, since Nebulae manages the default SQL connection automatically.

Message recipient: system.SQL.disconnect

Content parameters: none

Lingo example: sendNetMessage(“system.SQL.disconnect”,”anysubject”, void)

Server reply content: void

Remarks: By default this command can only be issued by users connected with administrative access level.

 

 

NEBULAE EXTENSIONS TO THE SYSTEM.SERVER COMMAND SET

 

system.server.restart

Description: This command will restart the Nebulae MultiUser Server instance remotely. The actual java process running on the host machine will not be destroyed, however. When this command is received all users will be disconnected and a new server instance will be spawned. All configuration files will be re-scanned when the server restarts. The server restart process takes an average of 15 seconds to complete, and all database files are also packed and reopened.

Message recipient: system.server.restart

Content parameters: None

Lingo example: sendNetMessage(“system.server.restart”,”anysubject”,void)

Server reply content: "ServerRestarted"

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.server.disable

Description: Prevents any new connections to the server. Current user connections will be unaffected. It is important to understand that even administrative users will NOT be able to connect to a disabled server, so if the administrative connection that issued the command is lost you will need to kill and restart the server process from the shell. This command can be reversed with the system.server.enable command, or with a server restart or reboot.

Message recipient: system.server.disable

Content parameters: None

Lingo example: sendNetMessage(“system.server.disable”,”anysubject”,void)

Server reply content: "ServerDisabled"

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.server.enable

Description: Reverts the effects of system.server.disable, and allows new connections to the server.

Message recipient: system.server.enable

Content parameters: None

Lingo example: sendNetMessage(“system.server.enable”,”anysubject”,void)

Server reply content: "ServerEnabled"

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.server.disconnectAll

Description: Disconnects all users from the server, including the administrative user that issued the command. This will cause all server movies and groups to be destroyed.

Message recipient: system.server.disconnectAll

Content parameters: None

Lingo example: sendNetMessage(“system.server.disconnectAll”,”anysubject”,void)

Server reply content: "DisconnectAll"

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.server.sendEmail

Description: Sends an email using the Nebulae server and the specified SMTP host.

Message recipient: system.server.sendEmail

Content parameters: [#sender:"sender@domain.com", #recpt:"email@domain.com", #subject:"Message subject", #smtphost:"smtphostname.com", #data:["Line 1 of the message","Line 2 of the message","Line 3, etc"]]

Lingo example: sendNetMessage(“system.server.sendEmail”,”anysubject”,[#sender:"admin@yourdomain.com", #recpt:"email@youruser.com", #subject:"Testing email", #smtphost:"yourdomain.com", #data:["This is a test message.","There is no need to reply"])

Server reply content: "EmailAccepted"

Remarks: None

 

 

NEBULAE EXTENSIONS TO THE SYSTEM.DBADMIN COMMAND SET

 

system.DBAdmin.ban

Description: Bans an ip address or userid from connecting to the server for a specific time period. This command does not disconnect the user if it is currently connected (see system.user.delete.) The banned entry is stored in the server database and is preserved even if the server is restarted or rebooted. This commands expects a property list in the content portion of the message with the attributes #user and #timeToBan. #user is a string representing an ip address or an username, and #timeToBan is the duration of the banned entry in the server, in seconds.

Message recipient: system.DBAdmin.ban

Content parameters: [#user:"ip address or username", #timeToBan: howManySeconds]

Lingo example: sendNetMessage(“system.DBAdmin.ban”,”anysubject”,[#user:"200.215.123.12", #timeToBan: 3600); sendNetMessage(“system.DBAdmin.ban”,”anysubject”,[#user:"MrX", #timeToBan: 604800)

Server reply content: [#user:"200.215.123.12"]

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.revokeBan

Description: Erases a banned entry from the server database. This commands expects a property list in the content portion of the message with the attribute #user, representing an ip address or an username.

Message recipient: system.DBAdmin.revokeBan

Content parameters: [#user:"ip address or username"]

Lingo example: sendNetMessage(“system.DBAdmin.revokeBan”,”anysubject”,[#user:"200.215.123.12"); sendNetMessage(“system.DBAdmin.revokeBan”,”anysubject”,[#user:"MrX")

Server reply content: [#user:"200.215.123.12"]

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.getBanned

Description: Retrieves a list of banned user entries in the server database, including the expiration date for the ban. The list is returned as a list of property lists, each item corresponding to one banned user entry.

Message recipient: system.DBAdmin.getBanned

Content parameters: None

Lingo example: sendNetMessage(“system.DBAdmin.getBanned”,”anysubject”,void)

Server reply content: [[#user:"200.215.123.12",#expires:"2001/11/21 14:34:33"],[#user:"MrX",#expires:"2001/11/28 14:54:45"]]

Remarks: By default this command can only be issued by users connected with administrative access level. The banned table is only checked for expired entries when the server is started or restarted, for performance reasons. The list returned by this command may contain expired entries, but these will be expurged automatically if a banned user or ip address tries to connect to the server after the expiration period has passed.

 

system.DBAdmin.getApplicationNames

Description: Retrieves a list of application names for all DBApplication objects in the server database.

Message recipient: system.DBAdmin.getApplicationNames

Content parameters: None

Lingo example: sendNetMessage(“system.DBAdmin.getApplicationNames”,”anysubject”,void)

Server reply content: ["lobby","seabattle"]

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.getApplicationCount

Description: Retrieves the number of DBApplication objects in the server database.

Message recipient: system.DBAdmin.getApplicationCount

Content parameters: None

Lingo example: sendNetMessage(“system.DBAdmin.getApplicationCount”,”anysubject”,void)

Server reply content: 3

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.getAttributeNames

Description: Retrieves a list with the names of all attributes declared in the server database, including the default ones.

Message recipient: system.DBAdmin.getAttributeNames

Content parameters: None

Lingo example: sendNetMessage(“system.DBAdmin.getAttributeNames”,”anysubject”,void)

Server reply content: ["CREATIONTIME","STATUS","USERLEVEL", "DESCRIPTION","PASSWORD","LASTUPDATETIME","LASTLOGINTIME"]

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.getAttributeCount

Description: Retrieves the number of attributes declared in the server database, including the default ones.

Message recipient: system.DBAdmin.getAttributeCount

Content parameters: None

Lingo example: sendNetMessage(“system.DBAdmin.getAttributeCount”,”anysubject”,void)

Server reply content: 7

Remarks: By default this command can only be issued by users connected with administrative access level.

 

system.DBAdmin.deleteApplicationData (#all format)

Description: This command is an addition to the standard system.DBAdmin.deleteApplicationData command, and it is included to make it easier for a developer to delete all ApplicationData objects created for a given application. The standard command supplied by Shockwave MultiUser Server requires a #text, #number or #range parameter that is used to match application data that is going to be deleted. Using the #all parameter a Nebulae server will be able to match and delete all ApplicationData objects created for the specified application.

Message recipient: system.DBAdmin.deleteApplicationData

Content parameters: [#application:"applicationname",#attribute:#creationtime, #all:void]

Lingo example: sendNetMessage(“system.DBAdmin.deleteApplicationData”,”anysubject”, [#application:"seabattle",#attribute:#creationtime, #all:void])

Server reply content: Matches the command message content

Remarks: By default this command can only be issued by users connected with administrative access level.

 

 

NEBULAE EXTENSIONS TO THE SYSTEM.DBAPPLICATION COMMAND SET

 

system.DBApplication.getApplicationData (#all format)

Description: This command is an addition to the standard system.DBApplication.getApplicationData command, and it is included to make it easier for a developer to retrieve all ApplicationData objects created for a given application. The standard command supplied by Shockwave MultiUser Server requires a #text, #number or #range parameter that is used to match application data that is going to be returned. Using the #all parameter a Nebulae server will be able to match and retrieve all ApplicationData objects created for the specified application.

Message recipient: system.DBApplication.getApplicationData

Content parameters: [#application:"applicationname",#attribute:#creationtime, #all:void]

Lingo example: sendNetMessage(“system.DBApplication.getApplicationData”,”anysubject”, [#application:"seabattle",#attribute:#creationtime, #all:void])

Server reply content: [[#shipname:"Cruise",#shipcolor:"Blue"], [#shipname:"Sub",#shipcolor:"Green"]]

Remarks: By default this command can only be issued by users connected with administrative access level.