Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Configuration

CuriousMike56 edited this page Mar 18, 2020 · 12 revisions

Table of Contents

The bot's configuration file, configuration.xml, uses the XML format. This page will guide you through each section.

Opening the file

Windows

First, rename configuration-example.xml to configuration.xml:

Rename

To open configuration.xml, right click the file then click Edit:

ConfigEdit

This will open the configuration file in Notepad.

Linux

With your bot folder open in a terminal, type the following to rename configuration-example.xml to configuration.xml:

mv configuration-example.xml configuration.xml

To open configuration.xml, use nano:

nano configuration.xml

You can also use a graphical editor, such as Ubuntu's default Text Editor.

UbuntuTextEditor

Default configuration

<?xml version="1.0"?>
<!--
	This is XML, if you don't know XML, look it up.
	It's really easy, if you can host a RoR-server, host an IRC-server,
	host this bot, then I assume that you can read/write XML as well.
	
	There're 3 sections in this file:
	  - The general configuration with some general stuff in it
	  - The IRC configuration
	  - The RoR-server(s) configuration
	Quite self-explanatory.
	
	Minimal configuration:
		<configuration>
			<IRCclient>
				<server host="yourHost" />
			</IRCclient>
			<RoRclients>
				<RoRclient>
					<server host="yourHost" port=somePort />
					<irc channel="#someChannel" />
				</RoRclient>
			</RoRclients>
		</configuration>
	
	note: IRCclient has 3 capitals and RoRclient(s) has 2 capitals. All the rest has no capitals
 -->
<configuration>

	<general>
		<version>2020.03</version>
		<fullversion>2020.03</fullversion>
		<logfile append="yes" level="debug">RoRservices.log</logfile> <!-- that doesn't work -->
		<admins> <!-- global - root - admins here -->
			<!-- these admins have access to advanced functionality of the bot itself
			e.g.: restart/shutdown/add a server/...
			login via IRC using the identify command:
			/msg myRoRbot identify uUsername aPassword-->
			<admin username="aUsername" password="aPassword" />
		</admins>
	</general>

	<IRCclient>
	<!-- By default, the bot is controlled though an IRC server. 
	If you wish to only use the in-game features, remove the comment tags from the <skip_irc/> line below.  -->
	<!--	<skip_irc/> -->
		<server host="example.com" port="6667" />
		<user nickname="RoR_Services" realname="RoR server monitor" username="RoR_Services" password="" />
		<oper username="" password="" />
		<nickserv servicename="" username="" password="" />
		<local address="" port="0" />
		<ssl>no</ssl>
		<ipv6>no</ipv6>
	</IRCclient>
	
	<RoRclients>
		<RoRclient id="myServer1" enabled="yes">
			<server host="example.com" port="12000" password="" />
			<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
			<irc channel="#ror-server" />
			<admins>
				<admin username="" password="" />
			</admins>
			<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
				<announcement>Hi, I'm an announcement</announcement>
				<announcement>And I'm the second announcement.</announcement>
				<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
			</announcements>
		</RoRclient>
	</RoRclients>

</configuration>

This is the default configuration file. It contains 3 sections:

  • General bot info
  • IRC server configuration
  • RoR server(s) configuration

General

	<general>
		<version>2020.03</version>
		<fullversion>2020.03</fullversion>
		<logfile append="yes" level="debug">RoRservices.log</logfile> <!-- that doesn't work -->
		<admins> <!-- global - root - admins here -->
			<!-- these admins have access to advanced functionality of the bot itself
			e.g.: restart/shutdown/add a server/...
			login via IRC using the identify command:
			/msg myRoRbot identify uUsername aPassword-->
			<admin username="aUsername" password="aPassword" />
		</admins>
	</general>

This section begins the configuration. It defines basic bot info.

		<version>2020.03</version>
		<fullversion>2020.03</fullversion>

Version info. Leave it at the default.

<logfile append="yes" level="debug">RoRservices.log</logfile> <!-- that doesn't work -->

Logging settings. Not currently used.

		<admins> <!-- global - root - admins here -->
			<!-- these admins have access to advanced functionality of the bot itself
			e.g.: restart/shutdown/add a server/...
			login via IRC using the identify command:
			/msg myRoRbot identify uUsername aPassword-->
			<admin username="aUsername" password="aPassword" />
		</admins>

This defines 'global' admins, or people who have access to all servers and advanced bot functionality (disconnect, shutdown, etc).

Set the admin username and password in the <admin username="aUsername" password="aPassword" /> line. Make it unique, as anyone with access can shutdown the bot!

IRCclient

	<IRCclient>
	<!-- By default, the bot is controlled though an IRC server. 
	If you wish to only use the in-game features, remove the comment tags from the <skip_irc/> line below.  -->
	<!--	<skip_irc/> -->
		<server host="example.com" port="6667" />
		<user nickname="RoR_Services" realname="RoR server monitor" username="RoR_Services" password="" />
		<oper username="" password="" />
		<nickserv servicename="" username="" password="" />
		<local address="" port="0" />
		<ssl>no</ssl>
		<ipv6>no</ipv6>
	</IRCclient>

Defines IRC server info. This section is optional if you wish to disable IRC support and just use the in-game features.

To disable IRC, remove the <!-- before and --> after <skip_irc/>:

	<!-- By default, the bot is controlled though an IRC server. 
	If you wish to only use the in-game features, remove the comment tags from the <skip_irc/> line below.  -->
	<skip_irc/>

Otherwise, leave the line commented out and continue on.

<server host="example.com" port="6667" />

Server hostname and port. If you're hosting your own IRC server, set your public IP as the hostname. Default non-SSL port is 6667. If using a public server, look up the appropriate connection info. Make sure it works by connecting using your IRC client.

<user nickname="RoR_Services" realname="RoR server monitor" username="RoR_Services" password="" />

User info the bot will use to connect to IRC. Nickname is the display name, Real name and username are shown when someone performs a WHOIS on the bot.

If the IRC server you're connecting to has a password, set it in the password="" line.

<oper username="" password="" />

If you're hosting your own IRC server, you can make the bot an operator to help prevent the bot from being rate limited. Otherwise, ignore this.

<nickserv servicename="" username="" password="" />

Most public servers have a user authentication service, usually called NickServ. If you're using a public server, you can authorize the bot with NickServ here assuming you've created the login info. Otherwise, ignore this.

<local address="" port="0" />

Unused.

<ssl>no</ssl>

If you're using an SSL port to connect to IRC (e.g. 6697) set this to yes. Otherwise, leave it at no.

<ipv6>no</ipv6>

If the IRC server hostname uses IPV6, set this to yes. In most cases, leave it at no.

RoRclient

	<RoRclients>
		<RoRclient id="myServer1" enabled="yes">
			<server host="example.com" port="12000" password="" />
			<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
			<irc channel="#ror-server" />
			<admins>
				<admin username="" password="" />
			</admins>
			<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
				<announcement>Hi, I'm an announcement</announcement>
				<announcement>And I'm the second announcement.</announcement>
				<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
			</announcements>
		</RoRclient>
	</RoRclients>

This section defines the RoR servers the bot will join.

IMPORTANT: Do NOT attempt to connect the bot to servers you do not own. Your bot will be banned.

You can connect to multiple servers by copying the <RoRclient - </RoRclient> syntax. Example:

	<RoRclients>
		<RoRclient id="myServer1" enabled="yes">
			<server host="example.com" port="12000" password="" />
			<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
			<irc channel="#first-server" />
			<admins>
				<admin username="" password="" />
			</admins>
			<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
				<announcement>Hi, I'm an announcement</announcement>
				<announcement>And I'm the second announcement.</announcement>
				<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
			</announcements>
		</RoRclient>
		<RoRclient id="myServer2" enabled="yes">
			<server host="example.com" port="12001" password="" />
			<user name="Services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />
			<irc channel="#second-server" />
			<admins>
				<admin username="" password="" />
			</admins>
			<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
				<announcement>Hi, I'm an announcement</announcement>
				<announcement>And I'm the second announcement.</announcement>
				<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
			</announcements>
		</RoRclient>
	</RoRclients>
<RoRclient id="myServer1" enabled="yes">

The 'internal' name of your server and if the server is enabled. Use underscores or hyphens instead of spaces.

<server host="example.com" port="12000" password="" />

Server connection info. Use the same hostname/port RoR connects with. If your server is private, make sure you set the password here.

<user name="services" token="515cf64ec28c445ca5786ec7122d7154" language="en_US" />

The username, token, and language the bot will use in RoR.

For an explanation on how to use the token, see Making the bot a server admin.

IMPORTANT: Do NOT use the default token to make your bot admin! This is the unhashed token, anyone could copy it into their RoR settings and become admin on your server!

<irc channel="#ror-server" />

IRC channel to join, if enabled.

<admins>
	<admin username="" password="" />
</admins>

This defines 'per-server' admins, or people who only have moderation access to that specific server. If only one person (you) will be a bot (global) admin, you can ignore this.

<announcements delay="600" enabled="yes"> <!-- delay in seconds -->
	<announcement>Hi, I'm an announcement</announcement>
	<announcement>And I'm the second announcement.</announcement>
	<announcement>And I'm the last one. After me, you'll see number 1 again</announcement>
</announcements>

Here you can set messages the bot will repeat after a specified time. Default is 10 minutes per message.

End

You've reached the end of the configuration file. Your bot should now be ready to use. Return to Installation page

Clone this wiki locally