X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/27eaa617f68e8b7e5bcdbf162f503b2dad78c1bf..0f3e9cfc4b5d0f13085c975e10c0e6c4c8e5fbc3:/src/opserv.c diff --git a/src/opserv.c b/src/opserv.c index 6b2ec13..71fa774 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -26,6 +26,7 @@ #include "opserv.h" #include "timeq.h" #include "saxdb.h" +#include "shun.h" #ifdef HAVE_SYS_TIMES_H #include @@ -77,6 +78,7 @@ #define KEY_STAFF_AUTH_CHANNEL_MODES "staff_auth_channel_modes" #define KEY_CLONE_GLINE_DURATION "clone_gline_duration" #define KEY_BLOCK_GLINE_DURATION "block_gline_duration" +#define KEY_BLOCK_SHUN_DURATION "block_shun_duration" #define KEY_ISSUER "issuer" #define KEY_ISSUED "issued" #define KEY_ADMIN_LEVEL "admin_level" @@ -96,6 +98,11 @@ static const struct message_entry msgtab[] = { { "OSMSG_NEED_CHANNEL", "You must specify a channel for $b%s$b." }, { "OSMSG_INVALID_IRCMASK", "$b%s$b is an invalid IRC hostmask." }, { "OSMSG_ADDED_BAN", "I have banned $b%s$b from $b%s$b." }, + { "OSMSG_SHUN_ISSUED", "Shun issued for $b%s$b." }, + { "OSMSG_SHUN_REMOVED", "Shun removed for $b%s$b." }, + { "OSMSG_SHUN_FORCE_REMOVED", "Unknown/expired Shun removed for $b%s$b." }, + { "OSMSG_SHUN_ONE_REFRESHED", "All Shuns resent to $b%s$b." }, + { "OSMSG_SHUN_REFRESHED", "All Shuns refreshed." }, { "OSMSG_GLINE_ISSUED", "G-line issued for $b%s$b." }, { "OSMSG_GLINE_REMOVED", "G-line removed for $b%s$b." }, { "OSMSG_GLINE_FORCE_REMOVED", "Unknown/expired G-line removed for $b%s$b." }, @@ -160,6 +167,7 @@ static const struct message_entry msgtab[] = { { "OSMSG_BADWORD_LIST", "Bad words: %s" }, { "OSMSG_EXEMPTED_LIST", "Exempted channels: %s" }, { "OSMSG_GLINE_COUNT", "There are %d glines active on the network." }, + { "OSMSG_SHUN_COUNT", "There are %d shuns active on the network." }, { "OSMSG_LINKS_SERVER", "%s%s (%u clients; %s)" }, { "OSMSG_MAX_CLIENTS", "Max clients: %d at %s" }, { "OSMSG_NETWORK_INFO", "Total users: %d (%d invisible, %d opers)" }, @@ -211,9 +219,12 @@ static const struct message_entry msgtab[] = { { "OSMSG_USER_SEARCH_COUNT_BAR", "------------ Found %4u matches -----------" }, { "OSMSG_CHANNEL_SEARCH_RESULTS", "The following channels were found:" }, { "OSMSG_GLINE_SEARCH_RESULTS", "The following glines were found:" }, + { "OSMSG_SHUN_SEARCH_RESULTS", "The following shun were found:" }, { "OSMSG_LOG_SEARCH_RESULTS", "The following log entries were found:" }, { "OSMSG_GSYNC_RUNNING", "Synchronizing glines from %s." }, + { "OSMSG_SSYNC_RUNNING", "Synchronizing shuns from %s." }, { "OSMSG_GTRACE_FORMAT", "%s (issued %s by %s, expires %s): %s" }, + { "OSMSG_STRACE_FORMAT", "%s (issued %s by %s, expires %s): %s" }, { "OSMSG_GAG_APPLIED", "Gagged $b%s$b, affecting %d users." }, { "OSMSG_GAG_ADDED", "Gagged $b%s$b." }, { "OSMSG_REDUNDANT_GAG", "Gag $b%s$b is redundant." }, @@ -259,6 +270,7 @@ static const struct message_entry msgtab[] = { { "OSMSG_UPLINK_START", "Uplink $b%s$b:" }, { "OSMSG_UPLINK_ADDRESS", "Address: %s:%d" }, { "OSMSG_STUPID_GLINE", "Gline %s? Now $bthat$b would be smooth." }, + { "OSMSG_STUPID_SHUN", "Shun %s? Now $bthat$b would be smooth." }, { "OSMSG_ACCOUNTMASK_AUTHED", "Invalid criteria: it is impossible to match an account mask but not be authed" }, { "OSMSG_CHANINFO_HEADER", "%s Information" }, { "OSMSG_CHANINFO_TIMESTAMP", "Created on: %a %b %d %H:%M:%S %Y (%s)" }, @@ -307,6 +319,7 @@ static struct { unsigned long untrusted_max; unsigned long clone_gline_duration; unsigned long block_gline_duration; + unsigned long block_shun_duration; unsigned long purge_lock_delay; unsigned long join_flood_moderate; unsigned long join_flood_moderate_threshold; @@ -356,6 +369,7 @@ typedef struct opservDiscrim { unsigned int match_opers : 1, option_log : 1; unsigned int chan_req_modes : 2, chan_no_modes : 2; int authed : 2, info_space : 2; + unsigned int intra_scmp : 2, intra_dcmp : 2; time_t min_ts, max_ts; unsigned int use_regex : 1; } *discrim_t; @@ -376,7 +390,9 @@ static int ungag_helper_func(struct userNode *match, void *extra); typedef enum { REACT_NOTICE, REACT_KILL, - REACT_GLINE + REACT_SILENT, + REACT_GLINE, + REACT_SHUN } opserv_alert_reaction; struct opserv_user_alert { @@ -850,7 +866,7 @@ static MODCMD_FUNC(cmd_restart) } static struct gline * -opserv_block(struct userNode *target, char *src_handle, char *reason, unsigned long duration) +opserv_block(struct userNode *target, char *src_handle, char *reason, unsigned long duration, int silent) { char *mask; mask = alloca(MAXLEN); @@ -860,7 +876,7 @@ opserv_block(struct userNode *target, char *src_handle, char *reason, unsigned l snprintf(reason, MAXLEN, "G-line requested by %s.", src_handle); } if (!duration) duration = opserv_conf.block_gline_duration; - return gline_add(src_handle, mask, duration, reason, now, 1); + return gline_add(src_handle, mask, duration, reason, now, 1, silent ? 1 : 0); } static MODCMD_FUNC(cmd_block) @@ -879,7 +895,7 @@ static MODCMD_FUNC(cmd_block) return 0; } reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : NULL; - gline = opserv_block(target, user->handle_info->handle, reason, 0); + gline = opserv_block(target, user->handle_info->handle, reason, 0, 0); reply("OSMSG_GLINE_ISSUED", gline->target); return 1; } @@ -904,7 +920,7 @@ static MODCMD_FUNC(cmd_gline) reply("MSG_INVALID_DURATION", argv[2]); return 0; } - gline = gline_add(user->handle_info->handle, argv[1], duration, reason, now, 1); + gline = gline_add(user->handle_info->handle, argv[1], duration, reason, now, 1, 0); reply("OSMSG_GLINE_ISSUED", gline->target); return 1; } @@ -944,6 +960,101 @@ static MODCMD_FUNC(cmd_refreshg) return 1; } +static struct shun * +opserv_shun(struct userNode *target, char *src_handle, char *reason, unsigned long duration) +{ + char *mask; + mask = alloca(MAXLEN); + snprintf(mask, MAXLEN, "*@%s", target->hostname); + if (!reason) { + reason = alloca(MAXLEN); + snprintf(reason, MAXLEN, "Shun requested by %s.", src_handle); + } + if (!duration) duration = opserv_conf.block_shun_duration; + return shun_add(src_handle, mask, duration, reason, now, 1); +} + +static MODCMD_FUNC(cmd_sblock) +{ + struct userNode *target; + struct shun *shun; + char *reason; + + target = GetUserH(argv[1]); + if (!target) { + reply("MSG_NICK_UNKNOWN", argv[1]); + return 0; + } + if (IsService(target)) { + reply("MSG_SERVICE_IMMUNE", target->nick); + return 0; + } + reason = (argc > 2) ? unsplit_string(argv+2, argc-2, NULL) : NULL; + shun = opserv_shun(target, user->handle_info->handle, reason, 0); + reply("OSMSG_SHUN_ISSUED", shun->target); + return 1; +} + +static MODCMD_FUNC(cmd_shun) +{ + unsigned long duration; + char *reason; + struct shun *shun; + + reason = unsplit_string(argv+3, argc-3, NULL); + if (!is_shun(argv[1]) && !IsChannelName(argv[1]) && (argv[1][0] != '&')) { + reply("MSG_INVALID_SHUN", argv[1]); + return 0; + } + if (!argv[1][strspn(argv[1], "#&*?@.")] && (strlen(argv[1]) < 10)) { + reply("OSMSG_STUPID_SHUN", argv[1]); + return 0; + } + duration = ParseInterval(argv[2]); + if (!duration) { + reply("MSG_INVALID_DURATION", argv[2]); + return 0; + } + shun = shun_add(user->handle_info->handle, argv[1], duration, reason, now, 1); + reply("OSMSG_SHUN_ISSUED", shun->target); + return 1; +} + +static MODCMD_FUNC(cmd_unshun) +{ + if (shun_remove(argv[1], 1)) + reply("OSMSG_SHUN_REMOVED", argv[1]); + else + reply("OSMSG_SHUN_FORCE_REMOVED", argv[1]); + return 1; +} + +static MODCMD_FUNC(cmd_refreshs) +{ + if (argc > 1) { + unsigned int count; + dict_iterator_t it; + struct server *srv; + + for (it=dict_first(servers), count=0; it; it=iter_next(it)) { + srv = iter_data(it); + if ((srv == self) || !match_ircglob(srv->name, argv[1])) + continue; + shun_refresh_server(srv); + reply("OSMSG_SHUNS_ONE_REFRESHED", srv->name); + count++; + } + if (!count) { + reply("MSG_SERVER_UNKNOWN", argv[1]); + return 0; + } + } else { + shun_refresh_all(); + reply("OSMSG_SHUNS_REFRESHED"); + } + return 1; +} + static void opserv_ison(struct userNode *tell, struct userNode *target, const char *message) { @@ -1468,6 +1579,11 @@ static MODCMD_FUNC(cmd_stats_glines) { return 1; } +static MODCMD_FUNC(cmd_stats_shuns) { + reply("OSMSG_SHUN_COUNT", shun_count()); + return 1; +} + static void trace_links(struct userNode *bot, struct userNode *user, struct server *server, unsigned int depth) { unsigned int nn, pos; @@ -1687,7 +1803,9 @@ static MODCMD_FUNC(cmd_stats_alerts) { switch (alert->reaction) { case REACT_NOTICE: reaction = "notice"; break; case REACT_KILL: reaction = "kill"; break; + case REACT_SILENT: reaction = "silent"; break; case REACT_GLINE: reaction = "gline"; break; + case REACT_SHUN: reaction = "shun"; break; default: reaction = ""; break; } reply("OSMSG_ALERT_IS", iter_key(it), reaction, alert->owner); @@ -1947,7 +2065,7 @@ opserv_new_user_check(struct userNode *user) } else if (ohi->clients.used > limit) { char target[18]; sprintf(target, "*@%s", inet_ntoa(user->ip)); - gline_add(opserv->nick, target, opserv_conf.clone_gline_duration, "AUTO Excessive connections from a single host.", now, 1); + gline_add(opserv->nick, target, opserv_conf.clone_gline_duration, "Excessive connections from a single host.", now, 1, 1); } } @@ -2640,6 +2758,8 @@ foreach_matching_user(const char *hostmask, discrim_search_func func, void *extr discrim->max_channels = INT_MAX; discrim->authed = -1; discrim->info_space = -1; + discrim->intra_scmp = 0; + discrim->intra_dcmp = 0; discrim->use_regex = 0; dupmask = strdup(hostmask); if (split_ircmask(dupmask, &discrim->mask_nick, &discrim->mask_ident, &discrim->mask_host)) { @@ -2805,8 +2925,12 @@ add_user_alert(const char *key, void *data, UNUSED_ARG(void *extra)) reaction = REACT_NOTICE; else if (!irccasecmp(react, "kill")) reaction = REACT_KILL; + else if (!irccasecmp(react, "silent")) + reaction = REACT_SILENT; else if (!irccasecmp(react, "gline")) reaction = REACT_GLINE; + else if (!irccasecmp(react, "shun")) + reaction = REACT_SHUN; else { log_module(OS_LOG, LOG_ERROR, "Invalid reaction %s for alert %s.", react, key); return 0; @@ -2993,7 +3117,9 @@ opserv_saxdb_write(struct saxdb_context *ctx) switch (alert->reaction) { case REACT_NOTICE: reaction = "notice"; break; case REACT_KILL: reaction = "kill"; break; + case REACT_SILENT: reaction = "silent"; break; case REACT_GLINE: reaction = "gline"; break; + case REACT_SHUN: reaction = "shun"; break; default: reaction = NULL; log_module(OS_LOG, LOG_ERROR, "Invalid reaction type %d for alert %s (while writing database).", alert->reaction, iter_key(it)); @@ -3108,6 +3234,8 @@ opserv_discrim_create(struct userNode *user, struct userNode *bot, unsigned int discrim->max_channels = INT_MAX; discrim->authed = -1; discrim->info_space = -1; + discrim->intra_dcmp = 0; + discrim->intra_scmp = 0; for (i=0; iintra_dcmp = 1; + else if (!strcasecmp(tmp, "ident")) + discrim->intra_dcmp = 2; + else if (!strcasecmp(tmp, "info")) + discrim->intra_dcmp = 3; + } + } if (irccasecmp(argv[i], "mask") == 0) { if (!is_ircmask(argv[++i])) { send_message(user, bot, "OSMSG_INVALID_IRCMASK", argv[i]); @@ -3132,13 +3272,25 @@ opserv_discrim_create(struct userNode *user, struct userNode *bot, unsigned int goto fail; } } else if (irccasecmp(argv[i], "nick") == 0) { - discrim->mask_nick = argv[++i]; + i++; + if (discrim->intra_dcmp > 0) + discrim->intra_scmp = 1; + else + discrim->mask_nick = argv[i]; } else if (irccasecmp(argv[i], "ident") == 0) { - discrim->mask_ident = argv[++i]; + i++; + if (discrim->intra_dcmp > 0) + discrim->intra_scmp = 2; + else + discrim->mask_ident = argv[i]; } else if (irccasecmp(argv[i], "host") == 0) { discrim->mask_host = argv[++i]; } else if (irccasecmp(argv[i], "info") == 0) { - discrim->mask_info = argv[++i]; + i++; + if (discrim->intra_dcmp > 0) + discrim->intra_scmp = 3; + else + discrim->mask_info = argv[i]; } else if (irccasecmp(argv[i], "server") == 0) { discrim->server = argv[++i]; } else if (irccasecmp(argv[i], "ip") == 0) { @@ -3384,6 +3536,7 @@ static int discrim_match(discrim_t discrim, struct userNode *user) { unsigned int access; + char *scmp=NULL, *dcmp=NULL; if ((user->timestamp < discrim->min_ts) || (user->timestamp > discrim->max_ts) @@ -3418,6 +3571,31 @@ discrim_match(discrim_t discrim, struct userNode *user) } } + if ((discrim->intra_scmp > 0 && discrim->intra_dcmp > 0)) { + switch(discrim->intra_scmp) { + case 1: scmp=user->nick; break; + case 2: scmp=user->ident; break; + case 3: + scmp=user->info; + if (discrim->info_space == 1) scmp++; + break; + } + switch(discrim->intra_dcmp) { + case 1: dcmp=user->nick; break; + case 2: dcmp=user->ident; break; + case 3: /* When checking INFO, and info_space is enabled + * ignore the first character in a search + * XXX: Should we ignore ALL leading whitespace? + * Also, what about ignoring ~ in ident? + */ + dcmp=user->info; + if (discrim->info_space == 1) dcmp++; + break; + } + if (irccasecmp(scmp,dcmp)) + return 0; + } + if (discrim->channel && !GetUserMode(discrim->channel, user)) return 0; access = user->handle_info ? user->handle_info->opserv_level : 0; if ((access < discrim->min_level) @@ -3536,7 +3714,19 @@ trace_gline_func(struct userNode *match, void *extra) struct discrim_and_source *das = extra; if (is_oper_victim(das->source, match, das->discrim->match_opers)) { - opserv_block(match, das->source->handle_info->handle, das->discrim->reason, das->discrim->duration); + opserv_block(match, das->source->handle_info->handle, das->discrim->reason, das->discrim->duration, 0); + } + + return 0; +} + +static int +trace_shun_func(struct userNode *match, void *extra) +{ + struct discrim_and_source *das = extra; + + if (is_oper_victim(das->source, match, das->discrim->match_opers)) { + opserv_shun(match, das->source->handle_info->handle, das->discrim->reason, das->discrim->duration); } return 0; @@ -3673,6 +3863,8 @@ static MODCMD_FUNC(cmd_trace) action = trace_domains_func; else if (!irccasecmp(argv[1], "gline")) action = trace_gline_func; + else if (!irccasecmp(argv[1], "shun")) + action = trace_shun_func; else if (!irccasecmp(argv[1], "kill")) action = trace_kill_func; else if (!irccasecmp(argv[1], "gag")) @@ -3705,6 +3897,8 @@ static MODCMD_FUNC(cmd_trace) das.discrim->limit = INT_MAX; else if ((action == trace_gline_func) && !das.discrim->duration) das.discrim->duration = opserv_conf.block_gline_duration; + else if ((action == trace_shun_func) && !das.discrim->duration) + das.discrim->duration = opserv_conf.block_shun_duration; else if (action == trace_domains_func) { das.dict = dict_new(); dict_set_free_data(das.dict, free); @@ -3943,6 +4137,23 @@ static MODCMD_FUNC(cmd_gsync) return 1; } +static MODCMD_FUNC(cmd_ssync) +{ + struct server *src; + if (argc > 1) { + src = GetServerH(argv[1]); + if (!src) { + reply("MSG_SERVER_UNKNOWN", argv[1]); + return 0; + } + } else { + src = self->uplink; + } + irc_stats(cmd->parent->bot, src, 'S'); + reply("OSMSG_SSYNC_RUNNING", src->name); + return 1; +} + struct gline_extra { struct userNode *user; struct string_list *glines; @@ -4025,6 +4236,88 @@ static MODCMD_FUNC(cmd_gtrace) return 1; } +struct shun_extra { + struct userNode *user; + struct string_list *shuns; + struct userNode *bot; +}; + +static void +strace_print_func(struct shun *shun, void *extra) +{ + struct shun_extra *xtra = extra; + char *when_text, set_text[20]; + strftime(set_text, sizeof(set_text), "%Y-%m-%d", localtime(&shun->issued)); + when_text = asctime(localtime(&shun->expires)); + when_text[strlen(when_text)-1] = 0; /* strip lame \n */ + send_message(xtra->user, xtra->bot, "OSMSG_STRACE_FORMAT", shun->target, set_text, shun->issuer, when_text, shun->reason); +} + +static void +strace_count_func(UNUSED_ARG(struct shun *shun), UNUSED_ARG(void *extra)) +{ +} + +static void +strace_unshun_func(struct shun *shun, void *extra) +{ + struct shun_extra *xtra = extra; + string_list_append(xtra->shuns, strdup(shun->target)); +} + +static MODCMD_FUNC(cmd_strace) +{ + struct shun_discrim *discrim; + shun_search_func action; + unsigned int matches, nn; + struct shun_extra extra; + struct svccmd *subcmd; + char buf[MAXLEN]; + + if (!irccasecmp(argv[1], "print")) + action = strace_print_func; + else if (!irccasecmp(argv[1], "count")) + action = strace_count_func; + else if (!irccasecmp(argv[1], "unshun")) + action = strace_unshun_func; + else { + reply("OSMSG_BAD_ACTION", argv[1]); + return 0; + } + sprintf(buf, "%s %s", argv[0], argv[0]); + if ((subcmd = dict_find(opserv_service->commands, buf, NULL)) + && !svccmd_can_invoke(user, opserv_service->bot, subcmd, channel, SVCCMD_NOISY)) { + return 0; + } + + discrim = shun_discrim_create(user, cmd->parent->bot, argc-2, argv+2); + if (!discrim) + return 0; + + if (action == strace_print_func) + reply("OSMSG_SHUN_SEARCH_RESULTS"); + else if (action == strace_count_func) + discrim->limit = INT_MAX; + + extra.user = user; + extra.shuns = alloc_string_list(4); + extra.bot = cmd->parent->bot; + matches = shun_discrim_search(discrim, action, &extra); + + if (action == strace_unshun_func) + for (nn=0; nnused; nn++) + shun_remove(extra.shuns->list[nn], 1); + free_string_list(extra.shuns); + + if (matches) + reply("MSG_MATCH_COUNT", matches); + else + reply("MSG_NO_MATCHES"); + free(discrim->alt_target_mask); + free(discrim); + return 1; +} + static int alert_check_user(const char *key, void *data, void *extra) { @@ -4050,8 +4343,14 @@ alert_check_user(const char *key, void *data, void *extra) case REACT_KILL: DelUser(user, opserv, 1, alert->discrim->reason); return 1; + case REACT_SILENT: + opserv_block(user, alert->owner, alert->discrim->reason, alert->discrim->duration, 1); + return 1; case REACT_GLINE: - opserv_block(user, alert->owner, alert->discrim->reason, alert->discrim->duration); + opserv_block(user, alert->owner, alert->discrim->reason, alert->discrim->duration, 0); + return 1; + case REACT_SHUN: + opserv_shun(user, alert->owner, alert->discrim->reason, alert->discrim->duration); return 1; default: log_module(OS_LOG, LOG_ERROR, "Invalid reaction type %d for alert %s.", alert->reaction, key); @@ -4216,8 +4515,12 @@ static MODCMD_FUNC(cmd_addalert) reaction = REACT_NOTICE; else if (!irccasecmp(argv[2], "kill")) reaction = REACT_KILL; + else if (!irccasecmp(argv[2], "silent")) + reaction = REACT_SILENT; else if (!irccasecmp(argv[2], "gline")) reaction = REACT_GLINE; + else if (!irccasecmp(argv[2], "shun")) + reaction = REACT_SHUN; else { reply("OSMSG_UNKNOWN_REACTION", argv[2]); return 0; @@ -4303,11 +4606,15 @@ opserv_conf_read(void) str = database_get_data(conf_node, KEY_NICK, RECDB_QSTRING); if (opserv && str) NickChange(opserv, str, 0); + str = database_get_data(conf_node, KEY_CLONE_GLINE_DURATION, RECDB_QSTRING); opserv_conf.clone_gline_duration = str ? ParseInterval(str) : 3600; str = database_get_data(conf_node, KEY_BLOCK_GLINE_DURATION, RECDB_QSTRING); opserv_conf.block_gline_duration = str ? ParseInterval(str) : 3600; + str = database_get_data(conf_node, KEY_BLOCK_SHUN_DURATION, RECDB_QSTRING); + opserv_conf.block_shun_duration = str ? ParseInterval(str) : 3600; + if (!opserv_conf.join_policer_params) opserv_conf.join_policer_params = policer_params_new(); policer_params_set(opserv_conf.join_policer_params, "size", "20"); @@ -4407,7 +4714,9 @@ init_opserv(const char *nick) opserv_define_func("ACCESS", cmd_access, 0, 0, 0); opserv_define_func("ADDALERT", cmd_addalert, 800, 0, 4); opserv_define_func("ADDALERT NOTICE", NULL, 0, 0, 0); + opserv_define_func("ADDALERT SILENT", NULL, 900, 0, 0); opserv_define_func("ADDALERT GLINE", NULL, 900, 0, 0); + opserv_define_func("ADDALERT SHUN", NULL, 900, 0, 0); opserv_define_func("ADDALERT KILL", NULL, 900, 0, 0); opserv_define_func("ADDBAD", cmd_addbad, 800, 0, 2); opserv_define_func("ADDEXEMPT", cmd_addexempt, 800, 0, 2); @@ -4440,6 +4749,12 @@ init_opserv(const char *nick) opserv_define_func("GTRACE", cmd_gtrace, 100, 0, 3); opserv_define_func("GTRACE COUNT", NULL, 0, 0, 0); opserv_define_func("GTRACE PRINT", NULL, 0, 0, 0); + opserv_define_func("SBLOCK", cmd_sblock, 100, 0, 2); + opserv_define_func("SHUN", cmd_shun, 600, 0, 4); + opserv_define_func("SSYNC", cmd_ssync, 600, 0, 0); + opserv_define_func("STRACE", cmd_strace, 100, 0, 3); + opserv_define_func("STRACE COUNT", NULL, 0, 0, 0); + opserv_define_func("STRACE PRINT", NULL, 0, 0, 0); opserv_define_func("INVITE", cmd_invite, 100, 2, 0); opserv_define_func("INVITEME", cmd_inviteme, 100, 0, 0); opserv_define_func("JOIN", cmd_join, 601, 0, 2); @@ -4460,6 +4775,7 @@ init_opserv(const char *nick) opserv_define_func("RAW", cmd_raw, 999, 0, 2); opserv_define_func("RECONNECT", cmd_reconnect, 900, 0, 0); opserv_define_func("REFRESHG", cmd_refreshg, 600, 0, 0); + opserv_define_func("REFRESHS", cmd_refreshs, 600, 0, 0); opserv_define_func("REHASH", cmd_rehash, 900, 0, 0); opserv_define_func("REOPEN", cmd_reopen, 900, 0, 0); opserv_define_func("RESERVE", cmd_reserve, 800, 0, 5); @@ -4470,6 +4786,7 @@ init_opserv(const char *nick) opserv_define_func("STATS BAD", cmd_stats_bad, 0, 0, 0); opserv_define_func("STATS GAGS", cmd_stats_gags, 0, 0, 0); opserv_define_func("STATS GLINES", cmd_stats_glines, 0, 0, 0); + opserv_define_func("STATS SHUNS", cmd_stats_shuns, 0, 0, 0); opserv_define_func("STATS LINKS", cmd_stats_links, 0, 0, 0); opserv_define_func("STATS MAX", cmd_stats_max, 0, 0, 0); opserv_define_func("STATS NETWORK", cmd_stats_network, 0, 0, 0); @@ -4488,12 +4805,15 @@ init_opserv(const char *nick) opserv_define_func("TRACE COUNT", NULL, 0, 0, 0); opserv_define_func("TRACE DOMAINS", NULL, 0, 0, 0); opserv_define_func("TRACE GLINE", NULL, 600, 0, 0); + opserv_define_func("TRACE SHUN", NULL, 600, 0, 0); opserv_define_func("TRACE GAG", NULL, 600, 0, 0); opserv_define_func("TRACE KILL", NULL, 600, 0, 0); opserv_define_func("UNBAN", cmd_unban, 100, 2, 2); opserv_define_func("UNGAG", cmd_ungag, 600, 0, 2); opserv_define_func("UNGLINE", cmd_ungline, 600, 0, 2); modcmd_register(opserv_module, "GTRACE UNGLINE", NULL, 0, 0, "template", "ungline", NULL); + opserv_define_func("UNSHUN", cmd_unshun, 600, 0, 2); + modcmd_register(opserv_module, "GTRACE UNSHUN", NULL, 0, 0, "template", "unshun", NULL); opserv_define_func("UNJUPE", cmd_unjupe, 900, 0, 2); opserv_define_func("UNRESERVE", cmd_unreserve, 800, 0, 2); /* opserv_define_func("UNWARN", cmd_unwarn, 800, 0, 0); */