@@ -2,6 +2,7 @@ maint
* Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
* Remove 'chanset +meankicks'. You can customize your kicks in doc/responses.txt and recompile.
* Don't allow running as root
+ * Don't allow more than 5 bots per binary.
1.4.0 - http://wraith.botpack.net/milestone/1.4.0
* Updated server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
@@ -595,6 +595,7 @@ readconf(const char *fname, int bits)
{
int enc = (bits & CONF_ENC) ? 1 : 0;
bd::Stream* stream;
+ size_t bots = 0;
if (enc) {
const char salt1[] = SALT1;
@@ -692,9 +693,13 @@ readconf(const char *fname, int bits)
ipsix = newsplit(line);
conf_addbot(nick.c_str(), ip.c_str(), host.c_str(), ipsix.c_str());
+ ++bots;
}
} /* while(fgets()) */
+ if (bots >= 5)
+ werr(ERR_TOOMANYBOTS);
+
delete stream;
return 0;
@@ -651,6 +651,8 @@ const char *werr_tostr(int errnum)
return STR("I have no bot record but received -B???");
case ERR_NOTINIT:
return STR("Binary data is not initialized; try ./binary -C");
+ case ERR_TOOMANYBOTS:
+ return STR("Too many bots defined. 5 max. Too many will lead to klines.\nSpread out into multiple accounts/shells/ip ranges.");
default:
return STR("Unforseen error");
@@ -22,7 +22,8 @@
#define ERR_NOUSERNAME 20
#define ERR_NOHOMEDIR 21
#define ERR_NOTINIT 22
-#define ERR_MAX 23
+#define ERR_TOOMANYBOTS 23
+#define ERR_MAX 24
#define DETECT_LOGIN 1
#define DETECT_TRACE 2