mirror of
https://github.com/anope/anope.git
synced 2026-06-25 02:26:38 +02:00
BUILD : 1.7.5 (343) BUGS : #00 NOTES : Fixed previous commit.
git-svn-id: svn://svn.anope.org/anope/trunk@343 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@219 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
e41e4cd69e
commit
ec3d8bda5e
+5
-40
@@ -336,22 +336,15 @@ static void dep_ListOpersOnly(void)
|
||||
|
||||
/* Configuration directives */
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
int flags;
|
||||
void *ptr;
|
||||
} ConfParam;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
ConfParam params[MAXPARAMS];
|
||||
struct {
|
||||
int type; /* PARAM_* below */
|
||||
int flags; /* Same */
|
||||
void *ptr; /* Pointer to where to store the value */
|
||||
} params[MAXPARAMS];
|
||||
} Directive;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int (*func) (int line, int argc, char **argv);
|
||||
} ConfCB;
|
||||
|
||||
#define PARAM_NONE 0
|
||||
#define PARAM_INT 1
|
||||
#define PARAM_POSINT 2 /* Positive integer only */
|
||||
@@ -369,11 +362,6 @@ typedef struct {
|
||||
#define PARAM_FULLONLY 0x02 /* Directive only allowed if !STREAMLINED */
|
||||
#define PARAM_RELOAD 0x04 /* Directive is reloadable */
|
||||
|
||||
int doAddOper(int line, int argc, char **argv);
|
||||
|
||||
ConfCB confroutines[] = {
|
||||
{"Oper", &doAddOper}
|
||||
};
|
||||
Directive directives[] = {
|
||||
{"AkillOnAdd", {{PARAM_SET, PARAM_RELOAD, &AkillOnAdd}}},
|
||||
{"AutokillDB", {{PARAM_STRING, PARAM_RELOAD, &AutokillDBName}}},
|
||||
@@ -694,22 +682,6 @@ void error(int linenum, char *message, ...)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
int doAddOper(int line, int argc, char **argv)
|
||||
{
|
||||
char *name;
|
||||
int i, operflags;
|
||||
if (argc < 2) {
|
||||
error(line, "Oper: Missing Arguments");
|
||||
return 0;
|
||||
}
|
||||
|
||||
name = argv[0];
|
||||
operflags = atoi(argv[1]);
|
||||
error(line, "Added Oper %s with flags %d", name, operflags);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Parse a configuration line. Return 1 on success; otherwise, print an
|
||||
* appropriate error message and return 0. Destroys the buffer by side
|
||||
* effect.
|
||||
@@ -762,13 +734,6 @@ int parse(char *buf, int linenum, int reload)
|
||||
if (!dir)
|
||||
return 1;
|
||||
|
||||
for (n = 0; n < lenof(confroutines); n++) {
|
||||
ConfCB *cb = &confroutines[n];
|
||||
if (stricmp(dir, cb->name) != 0)
|
||||
continue;
|
||||
return cb->func(linenum, ac, av);
|
||||
}
|
||||
|
||||
for (n = 0; n < lenof(directives); n++) {
|
||||
Directive *d = &directives[n];
|
||||
if (stricmp(dir, d->name) != 0)
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="5"
|
||||
VERSION_BUILD="342"
|
||||
VERSION_BUILD="343"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.5 (343)
|
||||
# BUGS : #00
|
||||
# NOTES : Fixed previous commit.
|
||||
#
|
||||
# BUILD : 1.7.5 (342)
|
||||
# BUGS : #00
|
||||
# NOTES : Certus: Replaced current rand-implementation with arc4random and replaced C++ comments with C-style comments (gcc 2.95 might
|
||||
|
||||
Reference in New Issue
Block a user