Thread: [srvx-commits] CVS: services/src saxdb.help,NONE,1.1 sockcheck.help,NONE,1.1 chanserv.c,1.278,1.279
Brought to you by:
entrope
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv7039/src
Modified Files:
chanserv.c helpfile.h helpserv.c nickserv.c opserv.c
opserv.help saxdb.c
Added Files:
saxdb.help sockcheck.help
Log Message:
make argument to expand_func_t const char*
add saxdb.help and sockcheck.help
--- NEW FILE ---
"write" ("/msg $S WRITE <dbname>",
"Writes out one of the databases. Supported databases are:",
" ${dblist}",
"$uSee also:$u writeall");
"writeall" ("/msg $S WRITEALL",
"Writes out all databases at once.",
"$uSee also:$u write");
--- NEW FILE ---
"PROXY" ("$bPROXY COMMANDS$b",
"Proxy checking control commands include CLEARHOST, DEFPROXY and HOSTSCAN.");
"CLEARHOST" ("$bCLEARHOST$b",
"/msg $O CLEARHOST <host|nick>",
"Removes any data for the given host in the proxy checker's results cache.",
"$uSee Also:$u hostscan");
"DEFPROXY" ("$bDEFPROXY$b",
"/msg $O DEFPROXY <definition>",
"Inserts a proxy check definition into the proxy-check database. Extreme care should be used with this command.");
"HOSTSCAN" ("$bHOSTSCAN$b",
"/msg $O HOSTSCAN <host|nick>",
"Adds the speicified host to the proxy-check queue. If the host is found to have a running proxy, then that host is G-lined for an hour.",
"$uSee Also:$u trace");
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -C2 -r1.278 -r1.279
*** chanserv.c 4 Sep 2002 19:55:22 -0000 1.278
--- chanserv.c 5 Sep 2002 17:55:05 -0000 1.279
***************
*** 1045,1049 ****
static struct helpfile_expansion
! chanserv_expand_variable(char *variable)
{
struct helpfile_expansion exp;
--- 1045,1049 ----
static struct helpfile_expansion
! chanserv_expand_variable(const char *variable)
{
struct helpfile_expansion exp;
Index: helpfile.h
===================================================================
RCS file: /cvsroot/srvx/services/src/helpfile.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** helpfile.h 5 Aug 2002 01:26:56 -0000 1.23
--- helpfile.h 5 Sep 2002 17:55:06 -0000 1.24
***************
*** 52,56 ****
};
! typedef struct helpfile_expansion (*expand_func_t)(char *variable);
typedef void (*irc_send_func)(struct userNode *from, const char *to, const char *msg);
--- 52,56 ----
};
! typedef struct helpfile_expansion (*expand_func_t)(const char *variable);
typedef void (*irc_send_func)(struct userNode *from, const char *to, const char *msg);
Index: helpserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/helpserv.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** helpserv.c 5 Sep 2002 14:57:22 -0000 1.31
--- helpserv.c 5 Sep 2002 17:55:06 -0000 1.32
***************
*** 898,902 ****
}
! static struct helpfile_expansion helpserv_expand_variable(char *variable) {
struct helpfile_expansion exp;
--- 898,902 ----
}
! static struct helpfile_expansion helpserv_expand_variable(const char *variable) {
struct helpfile_expansion exp;
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -C2 -r1.201 -r1.202
*** nickserv.c 5 Sep 2002 14:51:46 -0000 1.201
--- nickserv.c 5 Sep 2002 17:55:06 -0000 1.202
***************
*** 2338,2342 ****
static struct helpfile_expansion
! nickserv_help_expand(char *variable)
{
struct helpfile_expansion exp;
--- 2338,2342 ----
static struct helpfile_expansion
! nickserv_help_expand(const char *variable)
{
struct helpfile_expansion exp;
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.268
retrieving revision 1.269
diff -C2 -r1.268 -r1.269
*** opserv.c 5 Sep 2002 14:57:22 -0000 1.268
--- opserv.c 5 Sep 2002 17:55:06 -0000 1.269
***************
*** 2265,2269 ****
static struct helpfile_expansion
! opserv_help_expand(char *variable)
{
struct helpfile_expansion exp;
--- 2265,2269 ----
static struct helpfile_expansion
! opserv_help_expand(const char *variable)
{
struct helpfile_expansion exp;
Index: opserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.help,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** opserv.help 5 Sep 2002 14:51:06 -0000 1.47
--- opserv.help 5 Sep 2002 17:55:07 -0000 1.48
***************
*** 391,411 ****
"$uSee Also:$u log, loginfo, modlog");
- "PROXY" ("$bPROXY COMMANDS$b",
- "Proxy checking controls.",
- " CLEARHOST [${level/clearhost}]",
- " DEFPROXY [${level/defproxy}]",
- " HOSTSCAN [${level/hostscan}]");
- "CLEARHOST" ("$bCLEARHOST$b",
- "/msg $O CLEARHOST <host|nick>",
- "Removes any data for the given host in the proxy checker's results cache.",
- "$uSee Also:$u hostscan");
- "DEFPROXY" ("$bDEFPROXY$b",
- "/msg $O DEFPROXY <definition>",
- "Inserts a proxy check definition into the proxy-check database. Extreme care should be used with this command.");
- "HOSTSCAN" ("$bHOSTSCAN$b",
- "/msg $O HOSTSCAN <host|nick>",
- "Adds the speicified host to the proxy-check queue. If the host is found to have a running proxy, then that host is G-lined for an hour.",
- "$uSee Also:$u trace");
-
"LEVELS" ("$bCOMMAND COMMANDS$b",
"These commands control access to $O commands.",
--- 391,394 ----
Index: saxdb.c
===================================================================
RCS file: /cvsroot/srvx/services/src/saxdb.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** saxdb.c 5 Sep 2002 14:50:35 -0000 1.11
--- saxdb.c 5 Sep 2002 17:55:07 -0000 1.12
***************
*** 407,410 ****
--- 407,434 ----
}
+ static struct helpfile_expansion
+ saxdb_expand_help(const char *variable) {
+ struct helpfile_expansion exp;
+ if (!strcasecmp(variable, "dblist")) {
+ dict_iterator_t it;
+ struct string_buffer sbuf;
+ struct saxdb *db;
+
+ exp.type = HF_STRING;
+ string_buffer_init(&sbuf);
+ for (it = dict_first(saxdbs); it; it = iter_next(it)) {
+ db = iter_data(it);
+ if (db->mondo_section) continue;
+ if (sbuf.used) string_buffer_append_string(&sbuf, ", ");
+ string_buffer_append_string(&sbuf, iter_key(it));
+ }
+ exp.value.str = sbuf.list;
+ } else {
+ exp.type = HF_STRING;
+ exp.value.str = NULL;
+ }
+ return exp;
+ }
+
void
saxdb_init(void) {
***************
*** 415,419 ****
mondo_db = saxdb_register("mondo", NULL, saxdb_mondo_writer);
mondo_db->reader = saxdb_mondo_reader;
! saxdb_module = module_register("saxdb", MAIN_LOG, "saxdb.help", NULL);
modcmd_register(saxdb_module, "write", cmd_write, 2, MODCMD_REQUIRE_AUTHED, "flags", "+oper", NULL);
modcmd_register(saxdb_module, "writeall", cmd_writeall, 0, MODCMD_REQUIRE_AUTHED, "access", "800", NULL);
--- 439,443 ----
mondo_db = saxdb_register("mondo", NULL, saxdb_mondo_writer);
mondo_db->reader = saxdb_mondo_reader;
! saxdb_module = module_register("saxdb", MAIN_LOG, "saxdb.help", saxdb_expand_help);
modcmd_register(saxdb_module, "write", cmd_write, 2, MODCMD_REQUIRE_AUTHED, "flags", "+oper", NULL);
modcmd_register(saxdb_module, "writeall", cmd_writeall, 0, MODCMD_REQUIRE_AUTHED, "access", "800", NULL);
|