- Fixed a bug in badwords not loading words correctly, and upped word limit

to 50
This commit is contained in:
stskeeps 2000-06-20 08:15:13 +00:00
parent 614587cb7c
commit 4dcaaec5a3
4 changed files with 24 additions and 1 deletions

View file

@ -378,3 +378,5 @@
- Made so auditorium mode shows users to @'s
- Fixed a bug where /chgident would overflow into the *real* host if it where greater than USERLEN
because _someone_ aka sts told it to check against HOSTLEN rather than USERLEN... reported by wshs
- Fixed a bug in badwords not loading words correctly, and upped word limit
to 50

View file

@ -8,7 +8,7 @@
#define MAX_MATCH 1
#define MAX_WORDLEN 64
#define MAX_WORDS 30
#define MAX_WORDS 50
#define PATTERN "\\w*%s\\w*"
#define REPLACEWORD "<censored>"

View file

@ -17,6 +17,9 @@
#include <unistd.h>
#include "config.h"
#include "struct.h"
#include "common.h"
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
@ -31,6 +34,10 @@ static int message_wordlist;
* in both private and public messages
*/
void badwords_stats(aClient *sptr)
{
}
char *stripbadwords_channel(char *str)
{
regmatch_t pmatch[MAX_MATCH];
@ -157,9 +164,15 @@ int loadbadwords_channel(char *wordfile)
|| (ptr = strchr(buf, '\n')) != NULL)
*ptr = '\0';
if (buf[0] == '\0')
{
i--;
continue;
}
if (buf[0] == '#')
{
i--;
continue;
}
for (j = 0, isregex = 0; j < strlen(buf); j++)
{
if ((int)buf[j] < 65 || (int)buf[j] > 123)
@ -214,9 +227,15 @@ int loadbadwords_message(char *wordfile)
|| (ptr = strchr(buf, '\n')) != NULL)
*ptr = '\0';
if (buf[0] == '\0')
{
i--;
continue;
}
if (buf[0] == '#')
{
i--;
continue;
}
for (j = 0, isregex = 0; j < strlen(buf); j++)
{

View file

@ -2079,6 +2079,8 @@ int m_stats(cptr, sptr, parc, parv)
switch (stat)
{
case 'b': badwords_stats();
break;
case 'L':
case 'l':
/*