Multiplayer Interactive-Fiction Game-Design Blog



Download 8.87 Mb.
Page141/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   137   138   139   140   141   142   143   144   ...   151

BinaryDataSave


Saves binary data into the binary database.

Saves binary data into the binary database.

Any user images, user sounds, etc. should be saved in this database so they can be accessed by all users.

NOTE: Even though data is written to the binary database, it will not automatically be refreshed on the players' machines. To enfore a refresh, you'll need to send out the BinaryDataRefresh() message to all the clients, as well as having them draw their current room's contents.



Parameter Name

Description

FileName

File name to save this as.

Data

This is a string with the data in it. The actual binary data is Data[N] - 1.

Return value description

TRUE if the data was saved, FALSE if there was an error.


BUGBUG


Not really a function. Used to find bug comments.

If you put BUGBUG comments in your properties and function descriptions to indicate that work needs to be done, then whenever help is built, you can look at this BUGBUG "function" to see where those references are.



Parameter Name

Description

Return value description

TRUE if the data was saved, FALSE if there was an error.


ConnectionBan


This bans an IP address.

If a user from a specific IP address it constantly logging in and staying logged, you can use ConnectionBan() to ban the IP address outright so that MIFL isn't even notified of the connection. Basically, as soon as the connection occurs it's disconnected.

The banned IP address will stay banned until the server is restarted (once a day, or however often then server reboots).

Note: This banning is different than some of the other IP address banning/blacklisting functions because the connection never gets to MIFL.

Calling ConnectionBan() DOESN'T disconnect the IP address if it's already connected.

Parameter Name

Description

IPAddress

A string of the IP address to ban, such as "12345.67.89".

BanAmount

Each IP address keeps a "ban value" with it, starting at 0. Whenever ConnectionBan() is called, the ban value is increased by BanAmount. When BanAmount >= 1.0 the IP address is banned.

BanDays

Number of days to ban. This information will be forgotten as soon as the server shuts down.

Return value description

TRUE if the address was succefully banned.


ConnectionDisconnect


Has the server disconnect with one of the connections.

Calling ConnectionDisconnect() will cause the server to disconnect from the given connection number.

This is no usually called directly, but is automatically handled when the Connection object is deleted.

Parameter Name

Description

ConnectionIdent

Connection number to disconnect.

Return value description

Returns true if the connection was disconnected, false if the connection number wasn't valid.


ConnectionEnum


Enumerates all the connections to the server.

This enumerates all the connections made to the server.



Parameter Name

Description

Return value description

List of connection identifiers.


ConnectionInfoGet


Gets a piece of information about the connection.

This will get a piece of information about the connection.

The types of information are:

"ip" - The user's IP address.

"status" - The current status of the connection, such as "logging on".

"user" - Name of the user.

"uniqueid" - Uniquely identifies user's machine. Empty string if no ID.

"character" - Name of the user's character.

"object" - The object that will be used to send the ConnectionMessage() and ConnectionError() messages to.

"sendbytes" - Number of bytes that have been sent by the server to the user's machine. (This total is BEFORE the data compression.)

"sendbytescomp" - Like "sendbytes", except compressed data.

"sendbytesexpect" - Number of bytes expected to be send.

"receivebytes" - Number of bytes received by the server from the user's machine.

"receivebytescomp" - Like "receivebytes", except compressed data.

"receivebytesexpect" - Number of bytes that expect to receive.

"connecttime" - Number seconds that the user has been connected to the server.

"sendlast" - Number of seconds since data was last sent to the user.

"receivelast" - Number of seconds since data was last received from the user.

"bytespersec" - Average bytes per second received from the user.

Parameter Name

Description

ConnectionIdent

Connection number to get info about.

InfoString

String indicating the type of information to send, such as "ip".

Return value description

Returns the value requested, or Undefined if the InfoString was wrong.



Download 8.87 Mb.

Share with your friends:
1   ...   137   138   139   140   141   142   143   144   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page