-
Notifications
You must be signed in to change notification settings - Fork 25
CraftIRC Quickstart Guide
There are many exciting new changes found in CraftIRC 2.x, so let's get started.
- Download CraftIRC 2.x
- Copy config.yml to your /plugins/CraftIRC directory
- Port your CraftIRC.settings (from previous CraftIRC versions) contents to the appropriate fields in config.yml
- Customize your events!
- Start CraftIRC
- Console commands from any channel with
admin: true
designated.
Usage: .c {command}
Note: Only commands which you have defined in the
console-commands
field can be used this way.
- Connect CraftIRC to multiple IRC servers and channels
See this page: Multi-server-Support
- Server and channel 'performs'
Do IRC commands upon connecting to a server and/or joining a channel
Define commands to perform upon IRC server connection in one of your bot configurations'
on-connect
Define commands to perform upon joining a channel in one of your bot's channel configurations'
on-join
Example of server command perform to claim the bot's registered nickname and message user 'MyOwner':
on-connect:
- 'PRIVMSG Nickserv :ghost MyHandle myNickServPassword'
- 'NICK MyHandle'
- 'PRIVMSG MyOwner :I live again!'
The config.yml is the new CraftIRC.settings and must be located in your server's plugins/CraftIRC/
directory. The config.yml stores:
- Multiple IRC server settings (bot nickname, nickserv information, server on-connect commands etc)
- Multiple IRC channel settings (channel on-join commands, channel 'Tag', event relay options, etc)
- Custom formatting rules (change how chat/emote/join/quit/kick/ban/etc events appear on IRC, and in the game)
- Everything that is important!
You should be able to easily port your CraftIRC.settings options to this new style of configuration just by looking at the layout of it.
This style of configuration file is how most Bukkit plugins store their settings, and is in the syntactical format of YAML. YAML is whitespace dependent which means you may get a few parsing errors on server-startup the first time you configure this plugin. But, you can use a parser available @ http://yaml-online-parser.appspot.com to help validate your configuration before trying to load it.
Once you've moved your settings to config.yml, you can delete CraftIRC.settings!
Main structure of config.yml:
settings:
#Settings block#
bots:
- #Bot block#
- #Bot block#
- #...#
colormap:
- #Color block#
- #Color block#
- #...#
Settings block (global scope - applies to all bots and channels):
bind-address: 'lo.ca.l.IP if needed'
command-prefix: 'character'
debug: true|false
console-commands: ['list', 'of', 'commands']
ignored-prefixes:
irc: ['list', 'of', 'characters']
game: ['list', 'of', 'characters']
hold-after-enable:
#Hold block#
formatting:
#Formatting block#
events:
#Events block#
tag: 'tag'
Bot block (bot or server scope - applies to just one IRC server connection):
nickname: 'nickname'
server: 'ip or hostname'
port: number
userident: 'word'
serverpass: 'if needed'
ssl: true|false
message-delay: milliseconds
admin-prefixes: ['list', 'of', 'prefixes']
ignored-users: ['dont', 'relay', 'these', 'nicknames']
auth:
#Authentication block#
formatting:
#Formatting block#
events:
#Events block#
tag: 'tag'
on-connect:
- 'List of'
- 'IRC commands'
channels:
- #Channel block#
- #Channel block#
- #...#
Color block (maps Minecraft colors, IRC colors and color names to each other):
irc: number
game: '§code'
name: 'label'
Channel block (channel scope - settings for one single IRC channel):
name: '#channel'
password: 'key if needed'
admin: true|false
chat-colors: true|false
name-colors: true|false
tag: 'tag'
on-join:
- 'List of'
- 'IRC commands'
Hold block (millisecond delays before starting to relay events to prevent flood burst):
chat: number
joins: number
quits: number
kicks: number
bans: number
Authentication block (Identify to IRC network services):
method: 'none'|'nickserv'|'gamesurge'|'quakenet'
username: 'if needed'
password: 'here'
Formatting block (Templates of the messages output when events are relayed):
game-to-irc:
#Game message formatting block#
irc-to-game:
#IRC message formatting block#
irc-to-irc:
#IRC message formatting block#
custom:
#Custom fields block#
Events block (Fine-grained control of what is relayed):
game-to-irc:
#Game events block#
irc-to-game:
#IRC events block#
irc-to-irc:
#IRC events block#
Game message formatting block:
chat: 'Variables: %sender% %message%'
action: 'Variables: %sender% %message%'
joins: 'Variables: %sender%'
quits: 'Variables: %sender%'
kicks: 'Variables: %sender% %moderator% %message%'
bans: 'Variables: %sender% %moderator% %message%'
IRC message formatting block:
chat: 'Variables: %srcBot% %srcChannel% %sender% %message%'
action: 'Variables: %srcBot% %srcChannel% %sender% %message%'
joins: 'Variables: %srcBot% %srcChannel% %sender%'
parts: 'Variables: %srcBot% %srcChannel% %sender% %message%'
quits: 'Variables: %srcBot% %srcChannel% %sender% %message%'
kicks: 'Variables: %srcBot% %srcChannel% %sender% %moderator% %message%'
nicks: 'Variables: %srcBot% %srcChannel% %sender% %message%'
Custom fields block (Variables will be accessible as %name%
from formatting strings):
name: 'value'
name2: 'value'
name3: 'value'
...
Game events block:
cancelled-chat: true|false #SPECIAL EVENT: Must be defined in the global scope
all-chat: true|false
joins: true|false
quits: true|false
kicks: true|false
bans: true|false
IRC events block:
all-chat: true|false
joins: true|false
parts: true|false
quits: true|false
kicks: true|false
nicks: true|false