Hi, this is my first attempt at modding, so I apologize in advance any errors in my part.
I've seen chat-to-IRC plugins for Bukkit, however I asked myself, what if I bridge my IC2 server's chat to my friend's IRC server? After a long search, I noticed noone else did a IRC bridge mod for the vanilla server, and as you may or may not know, mods for Bukkit are usually outdated, hacky and buggy. I coded this entirely by myself in one day, using my knowledge of the IRC protocol and beginner Java skills.
In short, what this plugin does is bridge your vanilla (that one you install mods on, not Bukkit) server's chat over to an IRC channel, and optionally (but enabled by default), IRC to chat too.
After you start the server with the mod for the first time, a file named "ircbridge.properties" will be created on your server's folder. Edit it to configure the bridge. Here's a list of configuration settings, default values in parenthesis:
nick: Bridge bot's nick
debug: You shouldn't use that
port: IRC server's port (6667)
server: IRC server address
serverpassword: Server password, use only if you know what it means
commandprefix: Prefix commands added by the API should use (.)
identifycmd: Text to send to identifynick so the bot can log in to NickServ/Q/etc. (IDENTIFY password)
identify: If true, enables logging in to identifynick using identifycmd (false)
channel: Channel the bridge bot should bridge to
key: Channel key, use only if you know what it means
identifynick: Where to send identifycmd to so the bot can log in to NickServ/Q/etc. (NickServ)
irctochat: If true, bridges IRC messages to the chat too (true)
Start the server again and it should connect to the server you specified and join the channel you specified, and start bridging the chat.
Please note that this is a work in progress and may contain unexpected crashes or mishaps in my side.
Note to modders: the baseclasses provide the server events (join/quit/message/action/death) to the mod - NetLoginHandler handles joins, NetServerHandler handles quits/messages/actions and EntityPlayerMP handles deaths.
API documentation coming soon, decompile mod_IRCBridgeTestCommand while I don't post it.
Changelog:
0.2:
- Add: Automatically part any channels where the bot doesn't belong, if you're putting it on one of those sad networks with forced autojoins
- Add: Updated mod_IRCBridgeTestCommand to demonstrate SendMessage usage
- Add: Attempt to add a /irc reload command to reload settings and reconnect the bot. HandleCommand is not being called, can anyone help?
- Fix: Attempt to properly respond to CTCPs
- Fix: Channel keys are actually used now, my bad
- Fix: ERROR messages are no longer cropped off
- Fix: Attempt to make the bot properly quit when shutting down the server. Anyone (#mcp and #risucraft won't tell me) knows how to get an event to trigger on server shutdown?
0.1:
- Initial release
I just let it die because it was tailored to mod servers, however it was too late, everyone was using Bukkit for their mod servers, which has a whole lot of IRC bridge plugins.
I've seen chat-to-IRC plugins for Bukkit, however I asked myself, what if I bridge my IC2 server's chat to my friend's IRC server? After a long search, I noticed noone else did a IRC bridge mod for the vanilla server, and as you may or may not know, mods for Bukkit are usually outdated, hacky and buggy. I coded this entirely by myself in one day, using my knowledge of the IRC protocol and beginner Java skills.
In short, what this plugin does is bridge your vanilla (that one you install mods on, not Bukkit) server's chat over to an IRC channel, and optionally (but enabled by default), IRC to chat too.
After you start the server with the mod for the first time, a file named "ircbridge.properties" will be created on your server's folder. Edit it to configure the bridge. Here's a list of configuration settings, default values in parenthesis:
nick: Bridge bot's nick
debug: You shouldn't use that
port: IRC server's port (6667)
server: IRC server address
serverpassword: Server password, use only if you know what it means
commandprefix: Prefix commands added by the API should use (.)
identifycmd: Text to send to identifynick so the bot can log in to NickServ/Q/etc. (IDENTIFY password)
identify: If true, enables logging in to identifynick using identifycmd (false)
channel: Channel the bridge bot should bridge to
key: Channel key, use only if you know what it means
identifynick: Where to send identifycmd to so the bot can log in to NickServ/Q/etc. (NickServ)
irctochat: If true, bridges IRC messages to the chat too (true)
Start the server again and it should connect to the server you specified and join the channel you specified, and start bridging the chat.
Download (requires Flan's ModLoaderMP Server)
Please note that this is a work in progress and may contain unexpected crashes or mishaps in my side.
Note to modders: the baseclasses provide the server events (join/quit/message/action/death) to the mod - NetLoginHandler handles joins, NetServerHandler handles quits/messages/actions and EntityPlayerMP handles deaths.
API documentation coming soon, decompile mod_IRCBridgeTestCommand while I don't post it.
Changelog:
I just let it die because it was tailored to mod servers, however it was too late, everyone was using Bukkit for their mod servers, which has a whole lot of IRC bridge plugins.