Anonymous avatar Anonymous committed 3306d3b

Provide an error message when a user does /quote ban.

Comments (0)

Files changed (1)

modules/core/m_ban.c

 #include "reject.h"
 #include "hostmask.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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.