X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/a8370a2040a877d2ec0c9c502e6d42fb9bcbf7a2..35305a49c0973c0e29e4a607c2b507a2d8face43:/src/modcmd.c diff --git a/src/modcmd.c b/src/modcmd.c index 9776ef6..ce25e38 100644 --- a/src/modcmd.c +++ b/src/modcmd.c @@ -639,13 +639,6 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo unsigned int cmd_arg, perms, flags, options; char channel_name[CHANNELLEN+1]; - /* First check pubcmd for the channel. */ - if (channel && (channel->channel_info) && (service->bot == chanserv) - && !check_user_level(channel, user, lvlPubCmd, 1, 0)) { - send_message(user, service->bot, "MCMSG_PUBLIC_DENY", channel->name); - return 0; - } - options = (server_qualified ? SVCCMD_QUALIFIED : 0) | SVCCMD_DEBIT | SVCCMD_NOISY; /* Find the command argument. */ cmd_arg = IsChannelName(argv[0]) ? 1 : 0; @@ -663,6 +656,14 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo send_message(user, service->bot, "MSG_COMMAND_UNKNOWN", argv[cmd_arg]); return 0; } + + /* Check pubcmd for the channel. */ + if (channel && (channel->channel_info) && (service->bot == chanserv) + && !check_user_level(channel, user, lvlPubCmd, 1, 0)) { + send_message(user, service->bot, "MCMSG_PUBLIC_DENY", channel->name); + return 0; + } + flags = cmd->effective_flags; /* If they put a channel name first, check if the command allows * it. If so, swap it with the command name. @@ -2471,6 +2472,8 @@ create_default_binds(int rebind) { svccmd->min_opserv_level = 101; svccmd = service_make_alias(service, "service", "*modcmd.joiner", NULL); svccmd->min_opserv_level = 900; + svccmd = service_make_alias(service, "routing", "*modcmd.joiner", NULL); + svccmd->min_opserv_level = 100; } } }