1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

BUILD : 1.7.2 (88) BUGS : 13 and 14 NOTES : Hopefully fixed empty nickserv-accesslist entries and corrupt mysql code

git-svn-id: svn://svn.anope.org/anope/trunk@88 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@64 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-05-08 10:07:53 +00:00
parent f37f02692d
commit 5effa3fee2
3 changed files with 45 additions and 6 deletions
+29 -1
View File
@@ -326,6 +326,7 @@ static void dep_ListOpersOnly(void)
/*************************************************************************/
#define MAXPARAMS 8
#define MAXEQUALS 8
/* Configuration directives */
@@ -338,6 +339,16 @@ typedef struct {
} params[MAXPARAMS];
} Directive;
typedef struct {
char *name;
struct {
int type; /* PARAM_* below */
int flags; /* Same */
void *ptr[MAXEQUALS]; /* Pointer to where to store the value */
} params[MAXPARAMS];
void *ptrcount;
} DynDirective;
#define PARAM_NONE 0
#define PARAM_INT 1
#define PARAM_POSINT 2 /* Positive integer only */
@@ -355,6 +366,13 @@ typedef struct {
#define PARAM_FULLONLY 0x02 /* Directive only allowed if !STREAMLINED */
#define PARAM_RELOAD 0x04 /* Directive is reloadable */
char *oper_test[MAXEQUALS];
int oper_test_count = 0;
DynDirective dyndirectives[] = {
{"Oper", {{PARAM_STRING, PARAM_RELOAD, &oper_test}},&oper_test_count},
};
Directive directives[] = {
{"AkillOnAdd", {{PARAM_SET, PARAM_RELOAD, &AkillOnAdd}}},
{"AutokillDB", {{PARAM_STRING, PARAM_RELOAD, &AutokillDBName}}},
@@ -675,7 +693,7 @@ void error(int linenum, char *message, ...)
int parse(char *buf, int linenum, int reload)
{
char *s, *t, *dir;
int i, n, optind, val;
int i, n, optind, val, tmp;
int retval = 1;
int ac = 0;
char *av[MAXPARAMS];
@@ -719,6 +737,16 @@ int parse(char *buf, int linenum, int reload)
if (!dir)
return 1;
for (n = 0; n < lenof(dyndirectives); n++) {
DynDirective *d = &dyndirectives[n];
tmp = *(int *) d->ptrcount;
*(char **) d->params[0].ptr[tmp] = strdup(av[0]);
*(int *) d->ptrcount = tmp + 1;
}
if (!stricmp(dir,"Oper")) {
alog("Found OperBlock %s",av[0]);
return 1;
}
for (n = 0; n < lenof(directives); n++) {
Directive *d = &directives[n];
if (stricmp(dir, d->name) != 0)
+11 -4
View File
@@ -104,10 +104,14 @@ int db_mysql_open()
int db_mysql_query(char *sql)
{
int result, lcv;
char *s = db_mysql_quote(sql);
if (!do_mysql) {
free(s);
return -1;
}
if (debug)
alog(s);
free(s);
@@ -151,8 +155,9 @@ char *db_mysql_quote(char *sql)
{
int slen;
char *quoted;
if (!sql) {
if (!sql || !do_mysql) {
return sstrdup("");
}
@@ -1521,8 +1526,10 @@ void db_mysql_load_ns_dbase(void)
}
res = mysql_store_result(mysql);
while ((row = mysql_fetch_row(res))) {
*access = sstrdup(row[0]);
access++;
if (strlen(row[0]) > 0) {
*access = sstrdup(row[0]);
access++;
}
}
mysql_free_result(res);
}
+5 -1
View File
@@ -8,11 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="2"
VERSION_BUILD="87"
VERSION_BUILD="88"
VERSION_EXTRA=""
# $Log$
#
# BUILD : 1.7.2 (88)
# BUGS : 13 and 14
# NOTES : Hopefully fixed empty nickserv-accesslist entries and corrupt mysql code
#
# BUILD : 1.7.2 (87)
# BUGS : 28
# NOTES : Fixed bug with RDB and empty nickserv greet message.