3

I'm working on a project that has group chat capability using XMPP and moc_muc, in which only registered users can send messages (while anonymous users can only read but not write). I'm using ejabberd, with SASL anonymous support (registered users are authenticated using a custom external script).

The only method that I can come up right now is to use 2 different hosts for the 2 types of users, and write a component to set the roles of a user based on his/her host anytime he/she joins a room. This might work, but seems to be a quite complicated method for a seemingly trivial problem. I don't know too much about XMPP and all the specifications/modules/components in the wild, so I might have missed something obvious. I would appreciate any pointer!

Thanks a bunch

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
dangmai
  • 337
  • 6
  • 12
  • 1
    You're along the right lines, though this is less of an XMPP question and more of an ejabberd one. An XMPP component can't generally access server internals, which would be required to do as you describe. Thus you need to write an ejabberd-specific plugin or modify its mod_muc code (on the assumption it doesn't support this feature already). – MattJ Jul 04 '12 at 17:36
  • @MattJ Thanks a lot, I was kinda hoping that an external component written with SleekXmpp could do the job; but maybe it's time to learn Erlang :) – dangmai Jul 04 '12 at 21:52

0 Answers0