[ejabberd] roomnick lockdown

Peter Saint-Andre stpeter at stpeter.im
Wed Aug 29 01:13:21 MSD 2007


Badlop wrote:
> 2007/8/25, Peter Saint-Andre <stpeter at stpeter.im>:
>> Thanks! I'm sure I have access to the Erlang shell at jabber.org, but
>> I've never used it. Time to experiment. :)
> 
> Note that I said: an Erlang shell attached to the running ejabberd node.

Yes, I got that going:

erl -sname node1 -remsh athena at athena

> If the JID is user at server and the MUC service is
> conference.example.org, then try something like this:
> 
> mnesia:dirty_delete({muc_registered, {{"user", "server"},
> "conference.example.org"}}).
> ok

In fact I was trying to unlock an existing roomnick (we'll call it
"thelockednick") that was associated with the wrong person, so I did this:

mnesia:dirty_index_read(muc_registered, "thelockednick", 3).

That enabled me to discover who owned the nick (we will say it was
"foobar at example.com").

Then I could do this:

mnesia:dirty_delete({muc_registered, {{"foobar", "example.com"},
"conference.jabber.org"}}).

Voila!

Thanks to badlop for the help. :)

/psa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.jabber.ru/pipermail/ejabberd/attachments/20070828/eb171b12/attachment.bin 


More information about the ejabberd mailing list