PurpleIRC
About PurpleIRC
PurpleIRC is an IRC to Minecraft bridge plugin. This plugin supports running multiple bots on multiple channels. This plugin utilizes the PircBotX Java IRC framework (included in the plugin jar).
Wiki
- For additional information see the PurpleIRC Wiki.
Features
- Relay chat from game to IRC and vice versa.
- Relay game events to IRC.
- Relay IRC events to game.
- Translate colors from game to IRC and vice versa.
- Fully configurable message templates.
- Enable or disable any chat feature to and from the game.
- Most of the configuration options are per bot and per channel.
- Each bot can join multiple channels.
- Automatically op IRC users based on user masks.
- Control and protect the IRC topic.
- Manage IRC channel modes.
- Automatically reconnect to the IRC server on disconnect.
- Respond to commands in IRC chat.
- Send any command to the game via the console.
- Supports prefixes and suffixes. (see sample config for details)
- Displays IRC users in the tab list. (requires ProtocolLib)
- Monitor player command usage.
- Great for cross server chatting.
- Update checker will make external HTTP connections to check for new versions.
- SSL/TLS support.
CraftBukkit Versions
- If you are running CraftBukkit version 1.7.2 or older then stick to PurpleIRC version v2.1.14-174 and older.
- If you need a version that supports Spigot visit the Spigot Resource Page.
How to install
- Drop the PurpleIRC.jar file into your plugins directory.
- Restart the server. (Please don't use /reload)
- Copy plugins/PurpleIRC/sample bot to plugins/PurpleIRC/bots/NewBotName.yml
- Edit the bot yml file as needed. Each option is documented.
- Use /irc load bot.yml command to load and start the new bot.
- Configure permissions.
Configuration
- Configuration - Use /irc reloadconfig to load your changes while the bot is running.
- Sample Bot - Use /irc reloadbotconfigs to load your changes while the bot is running.
Frequently Asked Questions
Links
Chat Hooks
- Supports mcMMO admin and party chats.
- Supports FactionChat chat modes. (public, ally and enemy)
- Supports HeroChat Global, all channels or specific channels.
- Supports TitanChat chat manager.
- Supports TownyChat chat manager. See FAQ.
- Supports Dynmap web chat.
- Supports AdminPrivateChat
Other Hooks
- Supports CleverNotch bot messages.
- Supports ReportRTS ticket notifications.
- Supports VanishNoPacket. Prevents IRC from announcing vanished players.
- Supports Shortify URL shortener. 1.8 and newer only
- Supports RedditStream notifications.
- Supports SuperVanish
Dependencies
- PircBotX: The PircBotX classes are included in the plugin jar file.
- Vault. If you need to use the %GROUP% token then install Vault.
- ProtocolLib. If you need to use the custom tab list then install ProtocolLib.
Permissions (see plugin.yml)
node | default | description |
---|---|---|
irc.<COMMAND> | op | Every command requires a permission node. |
irc.message.chat | true | Receive IRC chat messages |
irc.message.gamechat | true | Send game chat to IRC |
irc.message.action | true | Receive IRC chat actions (/me) |
irc.message.quit | false | Receive IRC quit messages |
irc.message.join | false | Receive IRC join messages |
irc.message.disconnect | op | Receive IRC disconnect messages |
irc.message.connect | op | Receive IRC connect messages |
irc.message.kick | false | Receive IRC kick messages |
irc.message.nickchange | false | Receive IRC nick change messages |
irc.message.topic | false | Receive IRC topic messages |
irc.message.part | false | Receive IRC part messages |
irc.tablist | op | Display IRC users in tab list |
Commands
command | args | description |
---|---|---|
/irc load [bot.yml] | Load bot file | |
/irc unload [bot.yml] (disable) | Unload bot and optionally disable it | |
/irc reload | Reload entire plugin (Don't use this to load changes to your configs and bots. Use reloadconfig and reloadbotconfigs instead) | |
/irc reloadconfig | Reload config.yml | |
/irc save | ([bot]) | Save bot configuration(s) to disk |
/irc reloadbot | [bot] | Reload the bot config and reconnect |
/irc reloadbots | Reload all bot configs and reconnect | |
/irc reloadbotconfig | [bot] | Reload bot config without reconnecting |
/irc reloadbotconfigs | Reload all bot configs without reconnecting | |
/irc connect | ([bot]) | Connect to configured IRC serve |
/irc disconnect | ([bot]) | Disconnect from configured IRC server |
/irc listbots | List loaded bots | |
/irc list | ([bot]) ([channel]) | List users in a channel |
/irc kick | [bot] [channel] [user(s)] | Kick user(s) from a channel |
/irc op | [bot] [channel] [user(s)] | Op user(s) in a channel |
/irc listops | [bot] [channel] | List auto ops for a channel |
/irc motd | [bot] | Display IRC motd. |
/irc deop | [bot] [channel] [user(s)] | DeOp user(s) in a channel |
/irc addop | [bot] [channel] [user mask] | Add user mask to op list |
/irc removeop | [bot] [channel] [user mask] | Remove user mask from op list |
/irc server | [bot] [server] ([true|false]) | Set IRC server for bot. Optionally set autoconnect |
/irc mute | ([bot]) ([channel]) [user(s)] | Mute user(s) in a channel |
/irc unmute | [bot] [channel] [user(s)] | Unmute user(s) in a channel |
/irc nick | [bot] [nick] | Change the bot's IRC nickname |
/irc login | [bot] [login] | Change the bot's IRC login |
/irc join | [bot] [channel] | Join a channel |
/irc leave | [bot] [channel] ([reason)] | Leave a channel |
/irc whois | ([bot]) [nick] | Get IRC user's whois info |
/irc say | [bot] [channel] [message] | Make the bot say something |
/irc send | ([bot]) ([channel]) [message] | Send a message to a channel |
/irc debug | ([t|f]) | Enable debug mode |
/irc messagedelay | [bot] ([milliseconds]) | Get or set IRC message delay. (Default: 1000) |
/irc msg | ([bot]) [user] [message] | Send a private message to IRC user |
/irc ctcp | ([bot]) [user|channel] [message] | Send ctcp command to user or channel. |
/irc notice | ([bot]) [user|channel] [message] | Send notice command to user or channel. |
/irc sendraw | ([bot]) [command] | Send raw command to IRC server. |
/irc updatecheck | ([stable|dev]) | Check for new versions of PurpleIRC. |
IRC User Modes
mode | description |
---|---|
i | IrcOp |
o | Operator |
v | Voice |
h | Half Op |
q | Channel Owner |
s | Super Op |
Change Log
Known Issues
- AuthMe: If you are running the AuthMe plugin you will need to set enableAntiBot to false.
Additional Help
- Tickets: Please reports bugs using the ticket tracker.
- IRC: I'm usually hanging out in #PurpleIRC on irc.esper.net. If I'm awake you can chat with me there.
- PM: Feel free to send me private messages here.
Other
Bitcoin: 1P44sYgXLejo35vANvNfPTY56ANSC5w4dg
@ThisUsernameIsMine
That command should work from the console. Can I see a screenshot of the failure? What version of CraftBukkit is this occurring on?
Please make it possible to use the commands from console, when doing /irc reloadconfig it shows a list of commands.
Great plugin btw! ;-) +1
Well, strange. Can't connect with one server but works perfectly with the other and they both have the same setup to connect to the server (witch different nicks and all).
It worked before with both but not now. I've registered both the channel and the bots and one login and all but not the other.
All I get in the console is:
PurpleIRC: [MCBot] NOT CONNECTED
PurpleIRC: Setting IdentPassword ...
PurpleIRC: Using default character set: UTF-8
PurpleIRC: Connecting to "arcor.de.eu.dal.net:6667" as "MCBot" [SSL: false] [TrustAllCerts: false]
PurpleIRC: -arcor.de.eu.dal.net-* Looking up your hostname...
PurpleIRC: -arcor.de.eu.dal.net-* Checking Ident
PurpleIRC: -arcor.de.eu.dal.net-* Found your hostname
PurpleIRC: -arcor.de.eu.dal.net-* No Ident response
MCBot: Disconnected from IRC server.
@cnaude
Well. I have a small problem. The bot get blocked on the irc sever. It works fine for a month, then it can't connect.
I've done a lazy job with it and just made a channel without register the channel and just let the bots join that channel. The bots do not have their names registered or anything.
Since there is two servers joining the same channel and only one get blocked my guess is that since the server that get blocked restarts more often (twice a day instead of the others every third day) the server that isn't blocked is the one that most times are the op of the channel.
So uhm. I really just wonder if this is something else you know of or if I just should go ahead and register both bots as ops on the irc channel and that should solve it?
@ursak
Glad to hear you got it working. :)
@TheCoolGuy123_5_Minecraft_
Do this:
1. Stop the server.
2. Delete the example bot from bots folder.
3. Start the serve.
Okay, because it keeps making a third bot, I keep getting spammed with 05.04 21:44:08 [Server] ERROR Problem connecting to irc.excample.com => as AwesomeBot [Error: Unable to connect to the IRC network irc.excample.com (last connection attempt exception attached)] 05.04 21:44:08 [Server] ERROR Problem connecting to irc.excample.com => as AwesomeBot [Error: Unable to connect to the IRC network irc.excample.com (last connection attempt exception attached)]
@ursak
The color replacements are very customizable. If you can provide a sample of your config and maybe screen shots of the colors I might be able to help.
I must admit I don't really understand the coloring. I've added so %NAME% have one colore, %WORLD% another and %MESSAGE% a third color.There is no way to make this work on servers? I mean, if I have two servers connected to the same IRC and I write a message in one then it show up in the other but [World][Name][Message] is in one color. No way to change this?</s>Nevermind. Got it. It just feels wrong that changing "irc colors" actually change the colors ingame. :P
@cnaude
Thanks, I got fixed.
@TheCoolGuy123_5_Minecraft_
Stop the server. Make the change. Then start the server.
@cnaude
Still need McMMO to stop, it keeps coming back.
@TheCoolGuy123_5_Minecraft_
Any time you make changes to the bots use "/irc reloadboconfigs". Don't use reload or reloadbots after changing the configs.
@cnaude
I found that out but, I made Bot.yml and then I removed it and now he keeps coming back Also, /irc reloadbots isn't working for me. I have to restart the server. I also changed it the mcmmo thing but they just come back. It shows [mcmmo] and [admin:<world>] I want normal minecraft chat, and party chat from mcmmo but NOT admin chat.
Also I did /irc reloadbots and now the 2nd bot I made (JzCAdmin instead of JzC) won't connect, I have to restart my server now.
@TheCoolGuy123_5_Minecraft_
The default command prefix is "."
See line 31 of https://github.com/cnaude/PurpleIRC/blob/master/src/main/resources/SampleBot.yml
The SampleBot.yml will always be recreated automatically.
To disable mcmmo admin chat from appearing in IRC remove mcmmo-admin-chat and game-chat from the enabled-messages section and then do "/irc reloadbotconfigs"
How do you use defined commands in the bot.yml file?
I tried !<cmd> @<cmd>
Also, I tried making a bot named Bot.yml, didn't work so I'm using SampleBot.yml (customised) - Bot name is "Awesomebot"
Also, I did /irc listbots, My bot is JzC from Samplebot.yml but I see:
-[ IRC Bots ]-I did not delete the samplebot.yml from where the config.yml is
Also everytime someone chat's in McMMO's admin chat we get this: <JzC> [mcMMO] TheCoolGuy123_5: Testing <JzC> [admin:Misc] TheCoolGuy123_5: Testing I really don't want people to see the admin chat, or could it be possible to have only admins on minecraft could see mcmmo admin chat? Also why does it say it twice?
@little_m3
It only allows commands defined in the bot yml file. The next version will match up irc usernames to in game usernames and check game permissions for added security.
I have a question about one of the plugin features.
"The bot can send any command to the game via the console."
does that mean only predefined bot commands in <botname>.yml in bots? since doing them preemptively would mean taking all possible commands into account.
So far i've not found a way to send raw command from irc to game as example: .cmd pex group member add essentials.warp.<warpname>
of course that could be done by adding separate pex command to the list and then doing .pex group member add essentials.warp.<warpname>
yes, it is a security issue to allow anyone to use raw commands since it'd be direct access to console but the usermode setting is for that, isn't it?
How do I know what to put as the server? Here is my config:
# Sample PurpleIRC bot configuration.
# Most of these options should be self explanatory.
# Place your bot file in the PurpleIRC/bots/ folder.
# NOTE: If you make changes to this file while the server is running use "/irc reloadbotconfigs" to load the changes into memory.
nick: MCPE
login: Bot
realname: MinecraftPlanetEarth
server: irc.mine
port: 6667
ssl: false
trust-all-certs: false
charset: ''
show-motd: false
autoconnect: 'true'
password: ''
ident-password: ''
command-prefix: .
quit-message: '&r[&5PurpleIRC&r] &rGood bye!'
message-delay: 1000
raw-message-on-connect: false
raw-message: auth name pass
relay-private-chat: false
command-notify:
enabled: false
mode: msg
recipients:
- '#minecraft-test'
- example
part-invalid-channels: false
part-invalid-channels-message: I should not be here! Bye!
channels:
'#minecraftplanetearth':
worlds:
- '*'
- world
- world_nether
- world_the_end
autojoin: true
modes: ''
password: ''
topic: MinecraftPlanetEarth
topic-protect: true
topic-chanserv: false
shortify: true
enable-filtering: false
filter-list:
- AwesomeBot
- Bot
- MCPE
- MinecraftPlanetEarth
enabled-messages:
- console-chat
- game-action
- game-chat
- game-death
- game-kick
- game-join
- game-quit
- game-ban
- irc-action
- irc-chat
- irc-pchat
- irc-join
- irc-kick
- irc-part
- irc-topic
- irc-quit
- irc-nickchange
- irc-mode
- irc-notice
- irc-ban
- dynmap-web-chat
- mcmmo-admin-chat
- mcmmo-party-chat
- mcmmo-chat
- faction-public-chat
- faction-ally-chat
- faction-enemy-chat
- hero-Global-chat
- hero-Global-action
- hero-chat
- hero-action
- clever-chat
- titan-chat
- towny-chat
- rts-notify
hero-channel: admin
towny-channel: irc
log-irc-to-hero-chat: false
ops:
- '*!*sarah@example.com'
muted:
- KuShy
ignore-irc-chat: false
custom-tab-ignore-list:
- AwesomeBot
- MCPE
- Bot
- MinecraftPlanetEarth
hide-join-when-vanished: true
hide-quit-when-vanished: true
invalid-command:
private: false
ctcp: false
raw-message: ''
raw-message-on-join: false
commands:
chat:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@chat'
private_listen: 'true'
channel_listen: 'true'
ochat:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@ochat'
private_listen: 'true'
channel_listen: 'true'
h:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@hchat'
private_listen: 'true'
channel_listen: 'true'
msg:
modes: '*'
private: 'true'
ctcp: 'false'
game_command: '@msg'
private_listen: 'true'
channel_listen: 'true'
list:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@list'
private_listen: 'true'
channel_listen: 'true'
help:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@help'
private_listen: 'true'
channel_listen: 'true'
uptime:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: '@uptime'
private_listen: 'true'
channel_listen: 'true'
version:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: version
private_listen: 'true'
channel_listen: 'true'
lag:
modes: '*'
private: 'false'
ctcp: 'false'
game_command: lag
private_listen: 'true'
channel_listen: 'true'
lagmem:
modes: '*'
private: 'true'
ctcp: 'false'
game_command: lagmem
private_listen: 'true'
channel_listen: 'true'
gamemode:
modes: o
private: 'false'
ctcp: 'false'
game_command: gamemode %ARGS%
private_listen: 'true'
channel_listen: 'true'
@cnaude
Thank you for the quick reply! I did not full read all of the config, thanks for putting me straight! :)