Archive > 0.3.x Custom/Unofficial Modules

Relay.php (Replaces GuildRelay_GUILD.php and Relay_GUILD.php)

<< < (2/6) > >>

Ebag333:
Well, back from the long weekend.  Glad to see some people are at least interested in this a bit.  :)


--- Quote from: Khalem on May 28, 2007, 03:08:02 am ---If you add this, please clearly state that it is a discouraged way of doing relays, and should only be used between two bots, not more.

--- End quote ---

Since I just use a !setting, it's really only designed for 1 bot.

The way I figure it, if you're using a relay bot you can have as many bots as you want, but you still only need 1 relay bot.  If you just have a simple 2 org setup, then you still only need 1 bot to relay to, just it's not a central bot.

If you need multiple relay bots, then you're looking to do something out of the norm anyway.


--- Quote from: Blueeagle on May 28, 2007, 12:20:26 pm ---Does this relay prevent persons banned or blacklisted from the one org to take part in chat via relay? Would such a filter be fesable to impliment?

--- End quote ---


--- Quote from: Khalem on May 28, 2007, 06:05:09 pm ---We actually need a central ignore feature that covers all relays, including IRC.

--- End quote ---

Agreed, this should be a central rather than relay specific feature.

Though you may want to ban someone from using the bots commands, but not from having their text relayed.  Hmm, and the tricky part will be that even if you ban someone from your bot, if the person is getting relayed you'll still see their chat no matter what.

Maybe I'll throw in an option "Relay banned users text" or something.


--- Quote from: Blueeagle on May 28, 2007, 12:20:26 pm ---How does the relay bot work? Is it possible for anyone to join a relay channel? Are one notified as new bots attach to the relay?

--- End quote ---

All I did for the relay channel was take a normal Bebot, rip out all the plugins I could, lock down all the remaining commands to Owner only, then setup the bots I wanted to join as members with autoinvite for them on.

This way no one can join the bot, even if they're a member of it (that shouldn't ever happen, but...).

Since the relay module autoaccepts invites, the bots will join the relay chan when they get the invite (on log), and the relay connection is made.

So all in all *VERY* simple, really.

As I mentioned before I do need to fix it to confirm that the invite is from the bot set as the relay....

Anyway, there's currently no notification on joining the relay.  I've always found those to be quite annoying myself.  :D

One of my future goals is to bring in everything relay related into one unified plugin.  Still need to bring member join/parts into that, which would be easier if the formatting done was a core plugin rather than the customized one in the logon plugin.

* Ebag333 edits
Updated to make it more coherent.  Writing at 2:30 in the morning after driving for 13 hours over the weekend FTL.

Ebag333:
Updated the original post, and new Relay.php is zipped and attached.


Changes:


* Added an option for backwards compatibility (send !gcr in tells instead of only allowing for the relay bot).  This uses the same bot referenced in the Relay setting, so we only allow for one bot.  A warning is put in about using tells, and this defaults to a private group. (Note: this makes no use of $guild_relay_target in Bot.conf.  In fact, $guild_relay_target is not used at all as I find it much easier to handle it ingame than in the .conf file. :) )


* We now confirm that the exterior private group is the one we've set in the Relay option for the purposes of commands used as well as invites to the group.  Now we can only use !gcr from the private group that we've configured in the settings.  !gcr is usable from any source in /tell, this is left this way to allow for multiple bots to be sending into a single source (sort of a one-way messaging or notification system).


At this point the plugin is just about as locked down as I can make it.  Not only does the bot that's trying to send a relay message (whether via /tell or pgroup) have to have access to it, but we validate that the exterior private group is the one we want (for accepting the invite and handling !gcr commands).

I can't think of any ways to abuse this, at least (assuming you configured your setup properly!).  :)

Unless anyone else has any suggestions or ideas, I'll consider this finished.  :)

Alreadythere:

--- Quote from: Ebag333 on May 29, 2007, 09:07:37 pm ---Unless anyone else has any suggestions or ideas, I'll consider this finished.  :)
--- End quote ---
Looks like nice work, I do have two suggestions though:
* add color schemes for the channel name, user and chat string, so people that want to change them can do so during runtime.
* add settings for guest channel name (priv group) and org name on sending side, so if people want to use shortcuts they can do that
Both are mostly for convenienve :)

Ebag333:

--- Quote from: Alreadythere on May 29, 2007, 09:52:17 pm ---Looks like nice work, I do have two suggestions though:
* add color schemes for the channel name, user and chat string, so people that want to change them can do so during runtime.
--- End quote ---

Well, I'm currently using the default colors for it, which uses ##highlight## and ##normal## for it (which I assume are configurable somewhere?).


--- Quote from: Alreadythere on May 29, 2007, 09:52:17 pm ---
* add settings for guest channel name (priv group) and org name on sending side, so if people want to use shortcuts they can do that
--- End quote ---

Excellent suggestion!

* Ebag333 runs off to implement this

Alreadythere:

--- Quote from: Ebag333 on May 29, 2007, 10:32:39 pm ---
--- Quote from: Alreadythere on May 29, 2007, 09:52:17 pm ---Looks like nice work, I do have two suggestions though:
* add color schemes for the channel name, user and chat string, so people that want to change them can do so during runtime.
--- End quote ---
Well, I'm currently using the default colors for it, which uses ##highlight## and ##normal## for it (which I assume are configurable somewhere?).
--- End quote ---
Yes, they can be configured as they are part of the theme in use. But any changes there are global changes for all modules using the theme colors.

If you use schemes that default to the theme colors you are using it will work the same as now if people like the colors or are happy with the global theme colors. But if people want to use specific colors for their relay they can change them easy, without influencing other modules.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version