MinecraftBot
MinecraftBot is 1.5 Compatible
The latest version of MinecraftBot should work with 1.5 with no changes. If however you find a bug, please file a ticket.
MinecraftBot is a plugin that joins an IRC channel as a bot. The bot displays messages coming from Minecraft and sends messages to Minecraft that come from IRC.
The goal of this plugin is to be simple to set up and use. It doesn't have any extra features other than passing messages back and forth. If you are looking for something that does more than just relay messages, you may want to look at MonsterIRC or CraftIRC.
- Bukkit forums: http://forums.bukkit.org/threads/65448/
- Source code: https://github.com/TerrorBite/MinecraftBot
Features
The following events can be relayed by this plugin:
- MC/IRC chat and actions (/me)
- MC/IRC joins and leaves (including IRC part and quit, with quit reasons)
- MC/IRC kick, including kick reasons
- MC deaths
- MC server broadcast messages
- IRC nick changes
- IRC mode changes
- IRC topic changes
Individual events can be disabled in the configuration by simply deleting the appropriate formatting line.
Installation
Simply drop the JAR file into the plugins folder. The plugin will generate a blank configuration file with instructions and then disable itself.
Click here to view the default configuration file.
Permissions
- 'minecraftbot.op' - Equivalent to being a channel op. Allows use of the /irc command.
- 'minecraftbot.manage' - Allows use of the /minecraftbot command to manage the bot. Also allows use of /irc.
- 'minecraftbot.*' - Same as 'minecraftbot.manage'.
Permissions are not required to use this plugin. A Minecraft server op has access to all of these commands.
Metrics
This plugin contains PluginMetrics, which collects and anonymously sends data about how this plugin is being used. It creates a folder named PluginMetrics with a file inside named config.yml. That file gives you the option to opt-out of metrics tracking. This will also opt you out of metrics tracking for other plugins that use PluginMetrics.
More detailed data can be seen at: http://mcstats.org/plugin/MinecraftBot
Commands
In IRC:
- !players - Lists the people connected to the server.
- !time - Shows the time of each regular world (if your server has multiple worlds)
In Minecraft:
- /names and /n - Lists the people that are in the same channel as the bot.
Admin commands:
- /irc - Causes the bot to do something. Some of these commands require the bot to be a channel op.
- /irc say (message) - Causes the bot to say something on IRC
- /irc do (action) - Causes the bot to do something (using /me) on IRC
- /irc op/deop (nick) - Gives or takes the given nick's op status on the channel
- /irc voice/devoice (nick) - Gives or takes the given nick's voice status on the channel
- /irc kick (nick) [reason] - Kicks a nick from IRC. A kick reason may also be entered.
- /irc ban (nick) - Bans a nick on the IRC channel. Does not kick the nick.
- /irc unban (hostmask) - Removes the hostmask from the channel's ban list.
- /irc ignore (nick) - Ignores a nick on IRC
- /irc unignore (nick) - Stops ignoring a nick on IRC
- /minecraftbot - Manages the bot itself
- /minecraftbot connect - Connects to the IRC server
- /minecraftbot disconnect [message] - Disconnects from the IRC server. A quit message may be used.
- /minecraftbot join - Joins the channel defined in the configuration file.
- /minecraftbot part - Parts the channel defined in the configuration file.
- /minecraftbot reload - Reloads all settings except connection settings from the configuration file
Screenshots/Examples
Please send me any screenshots that demonstrate this plugin in a PM.
In-game can see irc but irc cannot see in game chat?
Would it be possible to hook into FoundBoxx somehow so that ores found display in IRC?
I'm having a similar problem to what I had before where color codes would show up via IRC. I'm using mChatSuite to format the chat, so I assume this plugin pulls the prefixes/suffixes from there. Is there any way to shut that off and just show the username? The odd part about this is it doesn't show prefixes for chat/join/quit. It only shows them on death.
v2.1.0 is no longer able to connect to my ZNC bouncer. I get this message whenever it attempts to connect. I used a freshly generated configuration file for this version.
v2.0.6 works perfectly fine with the same configuration settings for the server, password and so forth.
I have to use a bouncer because my dedicated server is not allowed to make direct IRC connections, to or from it.
just tested and 2.0.6 wont stay connected either. moving back to 2.0.4 for now.
@jamartinezm
Huh, somehow I missed that. I guess that when I was doing that, I forgot that names could have colors. Thanks for pointing it out! I'll push a fix to it soon.
Hello.
I've been getting issues when players use the !players command. The colors don't show up on IRC but we get symbols like § or ¤. For example:
* There is 1 player connected: ¤cjamartinezm¤f
* There are 2 players connected: §2jamartinezm§f §2oscarmelgar§f
I checked the source and found that if I changed:
sendMessage(o);
to
sendMessage(Formatting.toIRC(o));
on line 350 of IRCListener.java the command would output correct colors on IRC.
If there's another solution do let me know, otherwise, this one seems to be working.
Cheers
@SochaBoy
Yep. Soon enough.
I mentioned in my last comment that I wanted to look for a new IRC library. I found one that's a lot nicer to use. It can connect through SSL and I may also be able to implement '/irc ban' nicely.
I started working on making the rest of the plugin work with it, but since I'm also busy with some other things, it will take a few days until it can be considered usable. I also want to take my time testing it so I don't have to put out five updates in less than a week again.
Do you plan to add ssl support in the future? If you did that would be great.
@KingPin6
That's very strange. Is there any more info in the server logs or does it just say it was disconnected? It's very possible that the fix for nick prefixes I added in 2.0.5 are causing the bot to disconnect. You're fine sticking with 2.0.4 since the only difference between them is the nick prefix fix.
@ItsKohle
I thought of adding it but because of the way the bot is set up, it would only be possible to ban based on the nick and not the hostmask. If you entered '/irc ban spammer' then the bot would only be able to ban spammer!*@*.
Lately I've been thinking about how the IRC library (the code handling the connection to IRC) used in this plugin has so many limitations and problems. I may replace it with something else if I end up finding anything that seems better than the current one.
@KingPin6 Having this same issue, and I discovered that the bot disconnects and reconnects every time a mode is set in the channel, so it will get stuck in a disconnecting loop when on the channel's access list.
upgraded to 2.0.5 and it keeps connecting and disconnecting over and over. no errors given in the log.
2012-04-15 22:17:50 [INFO] [MinecraftBot] Connecting to SERVER... (Attempt 1) 2012-04-15 22:18:01 [INFO] [MinecraftBot] Connected to SERVER 2012-04-15 22:18:01 [INFO] #> ^[[36m* MCBot has joined #CHAN^[[0m
repeated a few dozen times before I disabled the plugin. worked perfectly fine in 2.0.4
Linux, Build 2149 of CraftBukkit (the latest RB as of this date). thanx for any ideas.
EDIT* switched back to 2.0.4 and everything is fine again.
How about the ability to ban with the /irc command?
@Wolfdogmp
The one thing I didn't test... Looks like it was sending server messages as chat messages. I'll have 2.0.4 uploaded in a few minutes.
@Rafa652
When a config line is blank that option should be disabled but is not, as i do not want console message to show in irc and yet they still are....
awesome! nice to hear that... Btw: could you implement an possibility to execute commands out of the IRC?
I just put up another update (2.0.2) that will hopefully fix all the issues that have been showing up so far.
Sorry about having to put up all these bug fixes in a short time. I'm being serious when I say that the server I originally made this plugin for is dead at the moment. I have to test it all myself and I don't end up catching everything.
I have edited the config and left the lines blank for what I dont want to be displayed, but I still get the alerts. For example I get alerts when someone joins or leaves the IRC.
Here is a copy of how my config is set up in that section: http://pastebin.com/7TqEs7SL
@Rafa652
I'm using linux, I already tried the encoding solution with no change to the error.
@Rafa652
Sorry, I noticed that I had the wrong version, my mistake, I found it now.