Jump to content

[eluna] IRC Bridge


xardion

Recommended Posts

 

Eluna IRC Bridge

Have you ever wanted to bridge your in-game guild chat with an IRC channel?  If so, you're in luck, because that's exactly what this script does.  It allows your Eluna-enabled server to connect to a single IRC server, and bridge chat between specific channels and guild chats.

 

PREREQUISITES:  Your Eluna-enabled server must have LuaSocket support either compiled-in or available for dynamic loading. Instructions for that can be found here. You will also need to have LuaIRC installed in your Lua library path (NOT the script path) for Eluna. If your IRC server requires SSL, you will also need LuaSec compiled into your Lua engine. However, this is beyond the scope of this release, as LuaSec isn't compatible with the newest version of LuaSocket that I detail in the other post, and has its own version bundled with it. Attempt this at your own risk.

INSTRUCTIONS

The code can be found here. The SQL needs to be run against your characters db, in order to create the necessary tables for the bot to operate, and the Lua script should be dropped into your Eluna script path. The patch file needs to be applied to LuaIRC after you've put it in your library path. It adds a couple new hooks required by the bot.

The package.path at the top of the script assumes that you have created a lua_lib directory in your server bin path to contain your LuaSocket and LuaIRC files. Change this as necessary.

After doing this, you will need to create the necessary entries in the tables for your bridge. The tables are fairly self-explanatory, but some fields require elaboration:

irc_config table:

The nick, username, and realname fields are used by the bot when connecting (username and realname are just for whois purposes), as are the host, port, secure, and password fields. The password is not required, and do NOT set secure unless you have LuaSec. The connect_modes field contains the modes that the IRC server sets on users after connecting. This is used by the bot to detect when the user has fully connected UNLESS NickServ is being used. Then this field is ignored. The add_modes and rem_modes are the list of user modes that the bot will add and remove from itself after connecting. The nickserv field contains the name of the NickServ service (defaults to NickServ), and the nickserv_password contains the password for the nick used by the bot. This should be left NULL if NickServ isn't being used.

There should only be one row in this table, as the bot currently only supports connecting to a single IRC server.

irc_prefixes table:

This table is used to define specific prefixes to use when sending IRC messages from specific nicknames, instead of just using the nickname. This is typically for other bots in the channels, and is also used to override the default prefix.

The nick field contains the nickname the prefix applies to. Leaving this defaulted to an empty string is how you override the default prefix (IRC) and color (11 - light cyan). The prefix contains the prefix text itself, and the color field contains the mIRC color code (0 to 15) to use for the prefix.

irc_channels table:

This table contains the mappings of which IRC channel is used for a given in-game Guild chat (if any).

The guildid contains the internal Guild ID of the guild being mapped, and the channel is the name of the IRC channel.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use