Erlang Mailing Lists

Author Message

<  Ejabberd mailing list  ~  roomnick lockdown

Guest
Posted: Fri Aug 24, 2007 10:00 pm Reply with quote
Guest
How does one disable the MUC roomnick lockdown feature or remove the
lock on an existing roomnick? Does this require Mnesia hacking? I think
someone told me once but I lost the email or IM they sent me... Smile

Thanks!

Peter

--
Peter Saint-Andre
https://stpeter.im/



Post recived from mailinglist
Guest
Posted: Fri Aug 24, 2007 10:38 pm Reply with quote
Guest
2007/8/25, Peter Saint-Andre <stpeter@stpeter.im>:
> How does one disable the MUC roomnick lockdown feature

I don't see any option to disable it.


> or remove the lock on an existing roomnick?
> Does this require Mnesia hacking? I think
> someone told me once but I lost the email or IM they sent me... Smile

The MUC service keeps a list of the registered nicks, and the
corresponding JID in the Mnesia table 'muc_registered'. It is easy to
delete an item in that table if you have access to an Erlang shell
attached to the running ejabberd node.

Another solution is to impersonate the JID and unregister the nick
with a Jabber client. This is quite difficult if the Jabber server
does not exist anymore.

Yet another solution is to wait until somebody implements in the MUC
service some pages for the Web Admin, including a page to delete MUC
registrations. I doubt you can wait so much Smile
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Fri Aug 24, 2007 10:40 pm Reply with quote
Guest
Badlop wrote:
> 2007/8/25, Peter Saint-Andre <stpeter@stpeter.im>:
>> Does this require Mnesia hacking? I think
>> someone told me once but I lost the email or IM they sent me... Smile
>
> The MUC service keeps a list of the registered nicks, and the
> corresponding JID in the Mnesia table 'muc_registered'. It is easy to
> delete an item in that table if you have access to an Erlang shell
> attached to the running ejabberd node.

Thanks! I'm sure I have access to the Erlang shell at jabber.org, but
I've never used it. Time to experiment. Smile

Peter

--
Peter Saint-Andre
https://stpeter.im/



Post recived from mailinglist
Guest
Posted: Sat Aug 25, 2007 10:07 am Reply with quote
Guest
2007/8/25, Peter Saint-Andre <stpeter@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. Smile

Note that I said: an Erlang shell attached to the running ejabberd node.

If the JID is user@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

Remember the dot at the end of the sentence. Note that the answer will
be 'ok' even if there was no record to delete.

If the Erlang shell is not attached to an ejabbed node, you will get this error:
** exited: {node_not_running,nonode@nohost} **

Once finished, to exit that Erlang shell that is attached to a running
node without stopping the ejabberd node, the best way I think is:
control+c, control+c.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post recived from mailinglist
Guest
Posted: Tue Aug 28, 2007 9:11 pm Reply with quote
Guest
Badlop wrote:
> 2007/8/25, Peter Saint-Andre <stpeter@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. Smile
>
> Note that I said: an Erlang shell attached to the running ejabberd node.

Yes, I got that going:

erl -sname node1 -remsh athena@athena

> If the JID is user@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@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. Smile

/psa


Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum