title: Limit max users in ejabberd MUC
body: <p>As I can see in <a href="http://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner" rel="nofollow noreferrer">xep-0045</a> there is option to limit max users in room:</p>
  <pre><code>&lt;field
        var='muc#roomconfig_maxusers'
        type='list-single'
        label='Maximum Number of Room Occupants'/&gt;
  </code></pre>
  <p>I'm using Smack lib for Java to create rooms. And I send form during creation process like this:</p>
  <pre><code>[...]
  List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  list.add(&quot;3&quot;);
  submitForm.setAnswer(&quot;muc#roomconfig_maxusers&quot;, list);
  [...]
  muc.sendConfigurationForm(submitForm);
  </code></pre>
  <p>And it doesn't work. In one room I can see 4 ppl, for exmple, but server shouldn't accepted 4th invite, right?</p>
  <p>Other options (<code>muc#roomconfig_persistentroom</code>, <code>muc#roomconfig_membersonly</code>, etc.) work fine. There is the problem only with <code>muc#roomconfig_maxusers</code>.</p>
  <p>I'm using last version of ejabberd.</p>
  <p>How can I limit max users in MUC?</p>