May 27, 2008
filed just before lunchtime by DrScofield in: from the grid,void
technorati tags:
QR code for this entry · average time to read 1:47 minutes

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.

until recently1 chat traffic and IRC bridging was done by one single region module, ChatModule. as we are thinking about adding an XMPP bridge that was sub-optimal and we needed to split ChatModule

…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 TriggerOnChatFromWorld and TriggerOnChatBroadcast methods as well.

the old ChatModule now exists as ChatModule and 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.

also, /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:

likewise, typing /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.


  1. roughly before subversion release 4850 or thereabouts. 

  2. i’m using pidgin for all my IRC, google talk, and sametime chats. 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.

2 comments »

  1. this is awesome! i love the direction that this is taking!

    comment by Nathan Eckenrode — May 27, 2008 @ 15:48

  2. as we are thinking about adding an XMPP bridge

    Have you made progress with adding an XMPP/Jabber bridge in Opensim? It would be a very useful facility to link with other XML chat systems, and with modifications even for carrying XML payloads between systems.

    comment by Ai Austin — September 13, 2008 @ 12:09

RSS feed for comments on this post. TrackBack URI

Leave a comment