imcserver/config/
imcserver/src/
IMC2 Liberty Server Installation
--------------------------------

You are free to alter and redistribute this code as you see fit, provided existing
copyright information in the source code is kept.

UPGRADE INSTALL
---------------

If you are upgrading from an AntiFreeze router, take note.
You will need to alter your config on the router before applying this upgrade.
The file format no longer uses colons to separate the data and as such the Liberty
server code will not be able to read them. Instead, each element of a connection will
need to be separated by spaces.

Example:

Old: Router-Type1 LocalName:domain.com:1234:clientpw:serverpw:0
New: Server-Type1 LocalName domain.com 1234 clientpw serverpw 0

This is true for all Type1 and Type2 connections.

NEW INSTALL
-----------

- Follow these preliminary steps before you begin.

1. Obtain permission from sysadmin to operate a network server.
2. Secure a port for the server to listen on.
3. Unpack into an appropriate directory.
4. Adjust your "config" file accordingly.
   Specifically, make sure the ServerAdmins line does not retain any bogus entries.
   Do the same with the ChannelCreators line.
5. Type 'make clean' in the src directory.
6. Type "nohup ./serverstart &" to start the server.

Get some muds connected now :)

You may also wish to seek out other IMC2 server operators to link them together.
Afterall, this is a networking deal, and what good is a network of one? Just
be sure that any localnames and channels you have on your network will be compatible with
those on other networks. Obviously you should work this out with the administrators of
any servers you wish to link up with.

- Remote administration.

   Because of recent security improvements, it is now safe to support accepting remote
administration commands from muds. A list of approved administrators is kept on the servers,
similar to the list of channel creators. This feature is disabled by default.
Details are available in the RemoteAdmin.txt file.

- Rebooting the server.

If you wish to reboot, either because you upgraded code or because of some other
circumstance, there are 2 ways to go about it:

1. In the main directory for the server, type: touch bootme
   The server will do a hard reboot.

   Alternately, you can use: touch hotbootme
   This will perform a reboot without dropping the current connections.

2. If you have the remoteadmin feature enabled, you can simply send a remote reboot or hotboot command
   to the server from your mud - provided of course you are an approved administrator for the server.

- Using the webstats script.

1. Make sure the config file has the 'Webstats' line uncommented.
2. Make sure there is a 'WebstatsFile' line in the config file with the
   location for where the server should write the stats file. This can be
   a relative path, such as ../html/stats
3. Read the instructions Xorith has provided in the imcserverstats.class file.
   Specifically make sure the file it's looking for matches where you're
   having the server write your stats. The location there must be an *EXACT* path.

- Making your server private.

1. Make sure the config file has the 'Private' line uncommented.

   The private setting prevents clients which have the autosetup function from being
able to connect without a pre-existing connection profile. In order to add clients
to a private server, the config file will either need to be edited manually, or the autoupdate
feature will need to be used to add them.

- Self pruning outdated links.

   This behaviour is enabled by default, but should you wish to keep the server from removing
links which have not connected in 14 days, comment out the 'PruneLinks' line in the config.

- Using the auto-updating feature.

1. Make sure your config file has the 'Autoupdate' line uncommented.
2. Create a file called "update" in the main directory ( above src ).
3. Place connection information inside the file.
4. Save the file in the main directory above src.

   The server will update its connections once it sees the update file. It checks for
the file every 15 seconds. You can only change connection and ban information, other types of
information must be edited manually or changed by remote admin.

For standard authentication servers:

   To add a Server-Type1 which will distinguish another server and connect at every boot:
        = mudname domainname port pass1 pass2

   To add a Server-Type2 which will be responsible for connecting itself:
        & mudname pass1 pass2

For MD5 authentication servers - You can also use this to update standard servers to MD5:

   To add a Server-Type1 which will distinguish another server and connect at every boot:
        % mudname domainname port pass1 pass2

   To add a Server-Type2 which will be responsible for connecting itself:
        @ mudname pass1 pass2

For SHA-256 authentication servers - This can also be used to update an existing server to use SHA-256:

   To add a Server-Type1 which will distinguish another server and connect at every boot:
        ^ mudname domainname port pass1 pass2

   To add a Server-Type2 which will be responsible for connecting itself:
        ! mudname pass1 pass2

For muds - authentication type defaults to standard:

   To add a Mud-Type1 which will try to connect at every reboot:
        + mudname domainname port pass1 pass2

   To add a Mud-Type2 which will be responsible for connecting itself:
        * mudname pass1 pass2

To remove any type of connection:
        - mudname

To add an IP address ban:
        # xxx.xxx.xxx.xxx

To remove an IP address ban:
	$ xxx.xxx.xxx.xxx

To change the server's remote admin password:
        ~ newpassword

- The "config" file.

   When manually editing the config file, do not remove the trailing numerical value
   if it has been set. The server uses this for expiration data. For adding a new connection
   just add a 0 and the router will adjust.

#IMC2 Liberty SV-2 Server config file
FileVersion     4
ServerName      Somename
ServerPort      Some number here
Network         NetworkName
MaxConnect      40
ChannelCreators Somepeople@Somemuds
ServerAdmins    User@Mud User2@Mud2
ServerAdminPwd  ASecurePasswordHere
InfoHost        URL for the server's network webpage.
InfoURL         URL for where the webstats script can be viewed.

#Optional flags for the server. Usage details in the install.txt file.
#These can also be toggled via remote admin if it is enabled.
#RemoteAdmin
#Private
#Autoupdate
PruneLinks
#Webstats
WebstatsFile path/to/file/here

#Network connection listings.
#Server-Type1 connections will attempt to connect at every server reboot and at set intervals while running.
Server-Type1 LocalName domain.com 1234 clientpw serverpw 0

#Server-Type2 connections will be left to their own means to connect.
Server-Type2 LocalName1 clientpw serverpw 0

#Mud-Type1 connections will attempt to connect at every server reboot and at set intervals while running.
Mud-Type1 LocalName domain.com 1234 clientpw serverpw 0

#Mud-Type2 connections will be left to their own means to connect.
Mud-Type2 LocalName1 clientpw serverpw 0

- The "ban" file

The server supports the ability to preemptively ban a connection before it's listed,
or to ban one that's already configured in the config file. This was made necessary
with the addition of the autosetup code. You can manually add bans to the file by simply
inserting an IP address on a line by itself, somewhere after the #BANLIST line.

#BANLIST
xxx.xxx.xxx.xxx
yyy.yyy.yyy.yyy
zzz.zzz.zzz.zzz