ejabberdctl rooms commands inconsistencies

Created on 5 Aug 2019  路  1Comment  路  Source: processone/ejabberd

$ sudo ejabberdctl destroy_room testchannel domain.tld
$ echo $?
1

Ok...so if not 0 then error...I guess...nothing in the log

$ sudo ejabberdctl  rooms_empty_list domain.tld
rooms empty: 4 out of 11
[email protected]
[email protected]
[email protected]

...but the room exists, wtf?

$ sudo ejabberdctl get_room_occupants testchannel domain.tld
{error,room_not_found}

...or does not exist?

$ sudo ejabberdctl get_room_occupants testchannel conference.domain.tld
$ echo $?
0

...oh, 0 means success, or maybe 0 users, but that's a good thing, right?

$ sudo ejabberdctl destroy_room testchannel conference.domain.tld
$ echo $?
0

...yay...finally destroyed.

$ sudo ejabberdctl rooms_empty_list domain.tld
rooms empty: 3 out of 10
[email protected]
[email protected]

...just checking, ok

$ sudo ejabberdctl  rooms_empty_list conference.domain.tld
rooms empty: 0 out of 0

...right.

How wrong am I to expect rooms_empty_list domain.tld yielding 0 and rooms_empty_list conference.domain.tld yielding 3 instead?

My confusion stems from having some commands outputting for xmpp_domain while others for muc_service (ref: https://docs.ejabberd.im/admin/ejabberdctl/muc-admin/)

Admin Tools

Most helpful comment

Right, most commands that deal with MUC expect the MUC service as argument. Most... but not all! There was an small group of commands that still resisted against the empire of consistency, and expected the XMPP host domain as argument. Those were:

  • muc_online_rooms
  • muc_online_rooms_by_regex
  • muc_register_nick
  • muc_unregister_nick
  • rooms_empty_list
  • rooms_empty_destroy
  • rooms_unused_list
  • rooms_unused_destroy

They have been convinced in the last commit to adhere to the common convention. Let's hope none remains hidden in the forest...

>All comments

Right, most commands that deal with MUC expect the MUC service as argument. Most... but not all! There was an small group of commands that still resisted against the empire of consistency, and expected the XMPP host domain as argument. Those were:

  • muc_online_rooms
  • muc_online_rooms_by_regex
  • muc_register_nick
  • muc_unregister_nick
  • rooms_empty_list
  • rooms_empty_destroy
  • rooms_unused_list
  • rooms_unused_destroy

They have been convinced in the last commit to adhere to the common convention. Let's hope none remains hidden in the forest...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kabirhaxor picture kabirhaxor  路  3Comments

sujankumar4593 picture sujankumar4593  路  4Comments

ThomasLeister picture ThomasLeister  路  4Comments

lgg picture lgg  路  4Comments

shazvan275 picture shazvan275  路  3Comments