[NeoStats-Devel] [Commits] r13 - trunk

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Sun May 22 06:41:51 2005
New Revision: 13

Modified:
   trunk/ChangeLog
   trunk/blsb.c
   trunk/blsb.h
   trunk/blsb_help.c
Log:
simplify command path and remove redundant help text

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Sun May 22 06:41:51 2005
@@ -1,4 +1,5 @@
 Black List Scanning Bot Module for NeoStats Changelog.
 ==============================================================================
-1.0 - Fish (M) 
- - Initial Version
+3.0.a3-dev - Fish (F) & Mark (M)
+ - Simplify command paths (M)
+ - Initial Version (F)

Modified: trunk/blsb.c
==============================================================================
--- trunk/blsb.c	(original)
+++ trunk/blsb.c	Sun May 22 06:41:51 2005
@@ -31,7 +31,10 @@
 #include "blsb.h"
 
 Bot *blsb_bot;
-static int ss_event_signon (CmdParams* cmdparams);
+static int ss_event_signon( CmdParams* cmdparams );
+int blsb_cmd_domains_list( CmdParams* cmdparams );
+int blsb_cmd_domains_add( CmdParams* cmdparams );
+int blsb_cmd_domains_del( CmdParams* cmdparams );
 int blsb_cmd_domains (CmdParams* cmdparams);
 int blsb_cmd_check (CmdParams* cmdparams);
 void dnsbl_callback(void *data, adns_answer *a);
@@ -56,7 +59,7 @@
  */
 ModuleInfo module_info = {
 	"BLSB",
-	"An Black List Scanning Bot",
+	"Black List Scanning Bot",
 	blsb_copyright,
 	blsb_about,
 	NEOSTATS_VERSION,
@@ -78,7 +81,9 @@
 
 static bot_cmd blsb_commands[]=
 {
-	{"DOMAINS",	blsb_cmd_domains,		1,	NS_ULEVEL_ADMIN,	blsb_help_domains, blsb_help_domains_oneline},
+	{"ADD",		blsb_cmd_domains_add,	3,	NS_ULEVEL_ADMIN,	blsb_help_domains_add, blsb_help_domains_add_oneline},
+	{"DEL",		blsb_cmd_domains_del,	1,	NS_ULEVEL_ADMIN,	blsb_help_domains_del, blsb_help_domains_del_oneline},
+	{"LIST",	blsb_cmd_domains_list,	0,	NS_ULEVEL_ADMIN,	blsb_help_domains_list, blsb_help_domains_list_oneline},
 	{"CHECK",	blsb_cmd_check,		1,	NS_ULEVEL_OPER,	blsb_help_check,	 blsb_help_check_oneline},
 	{NULL,		NULL,			0, 	0,		NULL, 		NULL}
 };
@@ -209,18 +214,6 @@
 	return NS_SUCCESS;
 }
 
-int blsb_cmd_domains (CmdParams* cmdparams) 
-{
-	if (!ircstrcasecmp (cmdparams->av[0], "LIST")) {
-		return blsb_cmd_domains_list (cmdparams);
-	} else if (!ircstrcasecmp (cmdparams->av[0], "ADD")) {
-		return blsb_cmd_domains_add (cmdparams);
-	} else if (!ircstrcasecmp (cmdparams->av[0], "DEL")) {
-		return blsb_cmd_domains_del (cmdparams);
-	}
-	return NS_ERR_SYNTAX_ERROR;
-}
-
 int blsb_cmd_check (CmdParams* cmdparams) 
 {
 	Client *user;

Modified: trunk/blsb.h
==============================================================================
--- trunk/blsb.h	(original)
+++ trunk/blsb.h	Sun May 22 06:41:51 2005
@@ -72,8 +72,12 @@
 extern const char *blsb_help_set_cachetime[];
 extern const char *blsb_help_set_verbose[];
 extern const char *blsb_help_set_exclusions[];
-extern const char blsb_help_domains_oneline[];
-extern const char *blsb_help_domains[];
+extern const char blsb_help_domains_add_oneline[];
+extern const char blsb_help_domains_del_oneline[];
+extern const char blsb_help_domains_list_oneline[];
+extern const char *blsb_help_domains_add[];
+extern const char *blsb_help_domains_del[];
+extern const char *blsb_help_domains_list[];
 extern const char *blsb_about[];
 extern const char *blsb_help_check[];
 extern const char blsb_help_check_oneline[];

Modified: trunk/blsb_help.c
==============================================================================
--- trunk/blsb_help.c	(original)
+++ trunk/blsb_help.c	Sun May 22 06:41:51 2005
@@ -23,17 +23,12 @@
 
 #include "neostats.h"
 
-const char blsb_help_domains_oneline[] = "Manage the Blacklist Domains";
+const char blsb_help_domains_add_oneline[] = "Add to the blacklist domains";
+const char blsb_help_domains_del_oneline[] = "Delete from the blacklist domains";
+const char blsb_help_domains_list_oneline[] = "List the blacklist domains";
 const char blsb_help_status_oneline[] = "View blsb state information";
 const char blsb_help_remove_oneline[] = "Remove an akill set by blsb";
 const char blsb_help_check_oneline[] = "Scan a selected user";
-const char blsb_help_ports_oneline[] = "Allows you to customize the ports scanned";
-const char blsb_help_set_oneline[] = "Change blsb configuration options";
-
-const char *blsb_help_domains[] = {
-	"help",
-	NULL
-};
 
 const char *blsb_about[] = {
 	"\2Open Proxy Scanning Bot Information\2",
@@ -66,67 +61,9 @@
 	NULL
 };
 
-const char *blsb_help_set_doscan [] = {
-	"\2SCAN <ON|OFF>\2",
-	"Disables the proxy scan and only do a lookup in the DNS",
-	"blacklist to see if this host is listed as an open proxy",
-	NULL
-};
-
 const char *blsb_help_set_akill [] = {
 	"\2AKILL <ON|OFF>\2",
-	" ",
-	NULL
-};
-
-const char *blsb_help_set_targetip [] = {
-	"\2TARGETIP <ip>\2",
-	"IP address of server we try to make the proxies connect to",
-	NULL
-};
-
-const char *blsb_help_set_targetport [] = {
-	"\2TARGETPORT <port>\2",
-	"IRCd port number we try to make proxies connect to.",
-	NULL
-};
-
-const char *blsb_help_set_opmdomain [] = {
-	"\2OPMDOMAIN <domain>\2",
-	"Domain used for blacklists.",
-	"This setting should not be changed unless you know the",
-	"effects in full",
-	NULL
-};
-
-const char *blsb_help_set_maxbytes [] = {
-	"\2MAXBYTES <max>\2",
-	"Maximum number of bytes we receive from a proxy before disconnecting",
-	"This setting should not be changed unless you know the",
-	"effects in full",
-	NULL
-};
-
-const char *blsb_help_set_timeout [] = {
-	"\2TIMEOUT <time>\2",
-	"Time we wait for a proxy to respond to our servers before",
-	"disconnecting and assuming its not an open proxy.",
-	"This setting should not be changed unless you know the",
-	"effects in full",
-	NULL
-};
-
-const char *blsb_help_set_openstring [] = {
-	"\2OPENSTRING <string>\2",
-	"The string we expect to see if there is an open proxy",
-	"This setting should not be changed unless you know the",
-	"effects in full",
-	NULL
-};
-
-const char *blsb_help_set_scanmsg [] = {
-	"\2SCANMSG <msg>\2",
-	"Message sent to a user when we scan their hosts",
+	"Whether to issue an akill for positive lookups",
 	NULL
 };
 
@@ -154,35 +91,24 @@
 	NULL
 };
 
-const char *blsb_help_ports[] = {
-	"Syntax: \2PORTS <LIST>\2",
-	"        \2PORTS <ADD> <type> <port>\2",
-	"        \2PORTS <DEL> <index>\2",
-	"",
-	"This command lets you view or manipulate the ports",
-	"and proxy types scanned when users connect to your",
-	"IRC network. By Default, blsb scans some default Ports",
-	"but you may wish to update this list with some additional",
-	"protocols and ports custom to your network"
-	"",
-	"\2LIST\2 will list the current ports and protocols scanned",
-	"and a ID number for use in removing entries.",
-	"",
-	"\2ADD\2 will add an entry of <type> running on port <port>",
-	"to the port list.",
-	"<type> can be either:", 
-	"       HTTP",
-	"       HTTPPOST",
-	"       SOCKS4",
-	"       SOCKS5",
-	"       WINGATE",
-	"       ROUTER",
-	"and port can be any valid port number. The new port is scanned",
-	"straight away",
-	"",
-	"\2DEL\2 will delete entry <index> from the list of",
-	"ports. Requires a Restart of blsb to become effective. Alternatively",
-	"Reloading the blsb module will make this effective",
+const char *blsb_help_domains_add[] = {
+	"Syntax: \2ADD <NAME> <TYPE> <DOMAIN>\2",
+	"",
+	"\2ADD\2 will add a domain to the blacklist lookup list",
+	NULL
+};
+
+const char *blsb_help_domains_del[] = {
+	"Syntax: \2DEL <index>\2",
+	"",
+	"Delete entry <index> from the list of domains used for lookups",
+	NULL
+};
+
+const char *blsb_help_domains_list[] = {
+	"Syntax: \2LIST\2",
+	"",
+	"List the current domains used for lookups",
 	NULL
 };
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.