]> jfr.im git - solanum.git/blobdiff - modules/core/m_ban.c
Remove trailing whitespace from all .c and .h files.
[solanum.git] / modules / core / m_ban.c
index 4ae6e066302a7bf021151e06a8c3df607808ba36..08167757c0e3926063e139ec0f850b7132c6315e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * charybdis: An advanced ircd.
  * m_ban.c: Propagates network bans across servers.
- * 
+ *
  *  Copyright (C) 2010 Jilles Tjoelker
  *
  * Redistribution and use in source and binary forms, with or without
 #include "operhash.h"
 #include "reject.h"
 #include "hostmask.h"
+#include "logger.h"
 
+static int m_ban(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 static int ms_ban(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 struct Message ban_msgtab = {
        "BAN", 0, 0, 0, MFLG_SLOW,
-       {mg_unreg, mg_ignore, {ms_ban, 9}, {ms_ban, 9}, mg_ignore, mg_ignore}
+       {mg_unreg, {m_ban, 0}, {ms_ban, 9}, {ms_ban, 9}, mg_ignore, {m_ban, 0}}
 };
 
 mapi_clist_av1 ban_clist[] =  { &ban_msgtab, NULL };
 DECLARE_MODULE_AV1(ban, NULL, NULL, ban_clist, NULL, NULL, "$Revision: 1349 $");
 
+static int
+m_ban(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+{
+       sendto_one_notice(source_p, ":The BAN command is not user-accessible.");
+       sendto_one_notice(source_p, ":To ban a user from a channel, see /QUOTE HELP CMODE");
+       if (IsOper(source_p))
+               sendto_one_notice(source_p, ":To ban a user from a server or from the network, see /QUOTE HELP KLINE");
+       return 0;
+}
+
 /* ms_ban()
  *
  * parv[1] - type