Skip to content

openttdcoop/soap

Repository files navigation

Soap, a Supybot Pluging for communicating with OpenTTD servers via its AdminPort
This plugin is released under the GPL, a copy of which can be found in
COPYING.txt

web: http://dev.openttdcoop.org/projects/soap/
IRC: I can usually be found in #openttd on OFTC



Prerequisites:
 * working OpenTTD server, with OFS installed and configured
 * Supybot set up in a channel
 * libottdadmin2 by Xaroth installed

 If you don't have OpenTTD installed, you probably won't need this plugin. I
 recommend you download it and play some at www.openttd.org. Come back when you
 are running a dedicated server which you want to administer from irc.

 Supybot comes with its own installation instructions. Those and its user manual
 can be found here: http://sourceforge.net/projects/supybot/

 OFS (Openttd File Scripts) can be obtained here: http://dev.openttdcoop.org/projects/ofs
 It simply needs to be copied to a directory on the same user@host as that
 OpenTTD server, and configured. See the included readme.txt for details. If the
 server is located on a different user@host from the bot, you will need to give
 the user running the bot password-less ssh access to the user@host. This allows
 the bot to eg download a savegame to the server.



Installing libottdadmin2:
 First go to https://github.com/Xaroth/libottdadmin2 and either download the zip
 or git clone. Now there are 2 ways you can install this lib:

 The first one is the easiest one, run 'python2 setup.py install' from the
 libottdadmin2 dir. This will install the lib systemwide and make it available
 to any other python programs that may need it. You may need sudo access
 depending on the system setup though.

 The other way is to copy the libottdadmin2 dir into the Soap plugin directory.
 Copied right client.py should be found at this path:
 <PathToPlugins>/Soap/libottdadmin2/client.py
 This will give the same functionality, but only for the Soap plugin. On the
 upside, no sudo access required.



Installation

 To install Soap, simply copy the Soap directory into the bots plugin directory,
 and load the plugin once the bot is running.



Configuration

 Configuration is handled via supybot's config command. First thing you want to
 configure is the default settings. Soap can handle multiple game-servers, but
 is bound to 1 server per irc-channel.

 Correct format for config would be:
    config plugins.Soap.<setting> <value>

 For instance:
    config plugins.Soap.host 127.0.0.1

 This will set the default for any new server to 127.0.0.1

 To change a setting for one server only, you want to specify the channel:
    config channel [#yourchan] plugins.Soap.<setting> <value>

 #yourchannel is optional when used in the channel (it will use the current
 channel), but required when used in queries. You'll want to use the latter method
 for setting the password.

 Example:
    config channel #mychannel supybot.plugins.Soap.host 127.0.0.1

 can be used anywhere the bot is, whilst:
    config channel plugins.Soap.host 127.0.0.1

 will change the host for channel the command was issued in.

 Finally, you want to activate the channels by configuring the list of
 channels. This is a global value, so theres only one variation:
    config plugins.Soap.channels #mychannel #myotherchannel ...

 That will enable below commands for servers tied to those channels. Changing this
 setting will require reloading the plugin so that it can set up all the connections

 If you didn't specify any settings for a channel, it will pick the default setting instead.
 This also means, that if you want one setting to apply to all the servers (eg you run
 all on a non-standard adminport), simply change the option as if it were a global
 setting.

 For a description of the individual variables, open config.py with a text editor.



Op/Trusted-only commands:
 apconnect      - connects to the openttd server
 apdisconnect   - disconnects from same
 pause          - manually pauses the game
 unpause        - manually unpauses the game (sets min_active_clients to 0)
 auto           - turns on autopause, and re-sets min_active_clients to the
                    configured amount
 rcon           - sends an rcon command to the server
 players        - lists the clients connected to the server
 content        - updates the downloaded content from bananas
 contentupdate  - performs 'content update'. use this before using the 'content' command
 rescan         - rescans the content_download directory for new files. (May cause users to get disconnected)
 save           - saves the game to game.sav
 transfer       - transfers savegame to a web-accessible directory (usage: !transfer number savegame)

Commands requiring op/trusted and OFS installed
 getsave        - download savegame from url
 start          - starts OpenTTD dedicated server
 update         - updates the OpenTTD server and (re)starts it

Publicly available commands
 playercount    - shows how many people are playing
 companies      - lists companies
 date           - returns the ingame date
 ding           - should be ping, but that command was taken. Dings the server
 help           - links to http://wiki.openttdcoop.org/Soap
 info           - shows some basic info about the server
 ip             - replies with the address needed to join the server as a player
 password       - shows the current password needed to join the server
 revision       - shows current revision of the OpenTTD server
 vehicles       - totals each vehicle type in the game

 These commands can also be called with channel or serverID as parameter. This can
 be handy when you want to command a server from a different channel or from
 private message.

 There are also 3 ingame commands:
 !admin             - sends a message to irc requesting admins look at the server
 !nick <newnick>    - will change the ingame nick of the caller
 !rules             - replies with an url pointing to the rules for playing



Credits:
 Taede Werkhoven: For writing the plugin
 Planetmaker: Gave me the idea to write this plugin
 Xaroth: For writing libottdadmin2, which also served as an example for Soap
 Dihedral: generated passwords.txt from OpenTTD source

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages