similar to other virtual worlds opensim supports in-world chat (and instant messaging) so that two avatars can “talk” to one another. the code that implements that functionality is mostly contained in
ChatModule, a region module.
OpenSim also supports an IRC bridge: you can tie your OpenSim grid to an IRC channel hosted by an IRC network and everything that’s being said (chatted) in any of the OpenSim regions is reported by an OpenSim IRC bot on the IRC channel — and vice versa.
…to do that i’ve basically removed the
ISimChat interface through which
ChatModule was being called and turned the interface into a set of events in
EventManager: OpenSim basically has something that we could virtual information bus that allows region modules to register handlers for certain event types. for each event type we usually have a trigger method in
EventManager which a system component can invoke and pass data into to have it distributed via the “virtual info bus” to all subscribed region modules. for the chat functionality we now have two new events:
ChatFromWorldEvent— which is used to distribute chat from in-world objects
ChatBroadcastEvent— which is used to send a broadcast chat to all logged in users
plus, of course, the corresponding
TriggerOnChatBroadcast methods as well.
ChatModule now exists as
IRCBridgeModule. the new
ChatModule now only takes care of chat traffic, nothing else.
IRCBridgeModule is subscribed to
ChatFromWorldEvent to receive all chat traffic from in-world and is also subscribed to each user’s client object to receive all chat traffic from clients (
ChatModule does this also).
using the new
ChatBroadcastEvent it was now possible to implement the LSL function
llOwnerSay() as normal chat instead of having instant messages pop up.
/me is now properly translated in both directions. typing
/me sneezes in the IRC window2 causes IRC to say:
…which is then correctly rendered in OpenSim:
/me laughs as Dr Scofield in the secondlife™ client shows up as follows in the secondlife client:
and is correctly reported in the IRC channel:
another new thing: as you can see
IRCBridgeModule now reports more (and correct) presence information as well.