]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_list.c
mkpasswd: Default to SHA512 instead of inherently insecure DES.
[irc/rqf/shadowircd.git] / modules / m_list.c
index e6aaff4ebbd31c167206cfaf153eaf076e45df38..91a16787c6c2a4a16aaaccd9faffb945c16e8b15 100644 (file)
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: m_list.c 3372 2007-04-03 10:18:07Z nenolod $
  */
 
 #include "stdinc.h"
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_conf.h"
@@ -103,7 +102,6 @@ static void safelist_check_cliexit(hook_data_client_exit * hdata)
 }
 
 /* m_list()
- *      parv[0] = sender prefix
  *      parv[1] = channel
  *
  * XXX - With SAFELIST, do we really need to continue pacing?
@@ -138,7 +136,6 @@ static int m_list(struct Client *client_p, struct Client *source_p, int parc, co
 }
 
 /* mo_list()
- *      parv[0] = sender prefix
  *      parv[1] = channel
  */
 static int mo_list(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
@@ -155,8 +152,8 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c
                return 0;
        }
 
-       /* XXX rather arbitrary -- jilles */
-       params.users_min = 3;
+       /* Let the user set it */
+       params.users_min = ConfigFileEntry.hide_channel_below_users;
        params.users_max = INT_MAX;
 
        if (parc > 1 && parv[1] != NULL && !IsChannelName(parv[1]))
@@ -324,7 +321,7 @@ static void safelist_channel_named(struct Client *source_p, const char *name)
                return;
        }
 
-       if (ShowChannel(source_p, chptr))
+       if (!SecretChannel(chptr) || IsMember(source_p, chptr))
                sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name, chptr->chname,
                           rb_dlink_list_length(&chptr->members),
                           chptr->topic == NULL ? "" : chptr->topic);