* Remove unused src/expnhelp.c file.
* Do not call mod_chanmode_announce() if we give a user neither voice
nor ops (it causes an assertion failure).
* Make switch() on mod_chanmode argument modes a little clearer.
* Add OSMSG_NICK_UNRESERVED format string.
* Translate weekly statistics report headers for HelpServ.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-23
change.args[0].mode = MODE_CHANOP;
else if(channel->access >= cn->channel_info->lvlOpts[lvlGiveVoice])
change.args[0].mode = MODE_VOICE;
+ else
+ change.args[0].mode = 0;
change.args[0].member = mn;
- mod_chanmode_announce(chanserv, cn, &change);
+ if(change.args[0].mode)
+ mod_chanmode_announce(chanserv, cn, &change);
}
channel->seen = now;
+++ /dev/null
-#include "log.h"
-#include "recdb.h"
-
-/* because recdb likes to log stuff.. */
-struct log_type *MAIN_LOG;
-void log_module(UNUSED_ARG(struct log_type *lt), UNUSED_ARG(enum log_severity ls), const char *format, ...)
-{
- va_list va;
- va_start(va, format);
- vfprintf(stderr, format, va);
- va_end(va);
- fflush(stderr);
-}
-
-struct string_list *new_argv;
-const char *hidden_host_suffix;
-
-struct cfg_scan {
- struct cfg_scan *parent;
- char *path;
-};
-
-int
-scan_db(const char *key, void *data, void *extra)
-{
- struct record_data *rd = data;
- struct cfg_scan child, *self = extra;
-
- child.parent = extra;
-
- switch (rd->type) {
- case RECDB_QSTRING:
- if ((irccasestr(key, "enable")
- || (irccasestr(key, "disable"))
- || (irccasestr(key, "require")))
- && enabled_string(rd->d.qstring)) {
- char *new_arg;
- new_arg = malloc(strlen(self->path)+strlen(key)+4);
- sprintf(new_arg, "-D%s/%s", self->path, key);
- string_list_append(new_argv, new_arg);
- }
- break;
- case RECDB_OBJECT:
- child.path = malloc(strlen(self->path) + strlen(key) + 2);
- sprintf(child.path, "%s/%s", self->path, key);
- dict_foreach(rd->d.object, scan_db, &child);
- free(child.path);
- break;
- default: /* ignore */ break;
- }
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- const char *cfg_file;
- struct cfg_scan scanner;
- dict_t cfg_db;
-
- tools_init();
- new_argv = alloc_string_list(4);
- string_list_append(new_argv, strdup("m4"));
-
- if (argc > 1) {
- cfg_file = argv[1];
- } else {
- cfg_file = "srvx.conf";
- }
-
- if (!(cfg_db = parse_database(cfg_file))) {
- fprintf(stderr, "Unable to parse config file %s; you will get a 'default' expansion.\n", cfg_file);
- } else {
- scanner.parent = NULL;
- scanner.path = "";
- dict_foreach(cfg_db, scan_db, &scanner);
- }
-
- string_list_append(new_argv, NULL);
- execvp("m4", new_argv->list);
- fprintf(stderr, "Error in exec: %s (%d)\n", strerror(errno), errno);
- fprintf(stderr, "Maybe you do not have the 'm4' program installed?\n");
- return 1;
-}
{ "HSMSG_STATS_TIME", "$uTime spent helping in %s:$u" },
{ "HSMSG_STATS_REQS", "$uRequest activity statistics:$u" },
+/* Status report headers */
+ { "HSMSG_STATS_REPORT_0", "Stats report for current week" },
+ { "HSMSG_STATS_REPORT_1", "Stats report for one week ago" },
+ { "HSMSG_STATS_REPORT_2", "Stats report for two weeks ago" },
+ { "HSMSG_STATS_REPORT_3", "Stats report for three weeks ago" },
+
/* Responses to user commands */
{ "HSMSG_YOU_BEING_HELPED", "You are already being helped." },
{ "HSMSG_YOU_BEING_HELPED_BY", "You are already being helped by $b%s$b." },
};
static const char *statsreport_week[] = {
- "Stats report for current week",
- "Stats report for one week ago",
- "Stats report for two weeks ago",
- "Stats report for three weeks ago"
+ "HSMSG_STATS_REPORT_0",
+ "HSMSG_STATS_REPORT_1",
+ "HSMSG_STATS_REPORT_2",
+ "HSMSG_STATS_REPORT_3"
};
static struct {
{ "OSMSG_RAW_PARSE_ERROR", "Error parsing raw line (not dumping to uplink)." },
{ "OSMSG_COLLIDED_NICK", "Now temporarily holding nick $b%s$b." },
{ "OSMSG_RESERVED_NICK", "Now reserving nick $b%s$b." },
+ { "OSMSG_NICK_UNRESERVED", "Nick $b%s$b is no longer reserve." },
{ "OSMSG_NOT_RESERVED", "Nick $b%s$b is not reserved." },
{ "OSMSG_ILLEGAL_REASON", "This channel is illegal." },
{ "OSMSG_ILLEGAL_KILL_REASON", "Joined an illegal modeless channel - do not repeat." },