X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/a6fa003552075b0cd7873939a555da6f2de6f332..4cb36ef05734bc040784d67794a3376b0e3a5ec2:/src/chanserv.c?ds=sidebyside diff --git a/src/chanserv.c b/src/chanserv.c index 5555f7c..b39dd9b 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -279,7 +279,7 @@ static const struct message_entry msgtab[] = { { "CSMSG_BAD_SETLEVEL", "You cannot change any setting to above your level." }, { "CSMSG_BAD_SETTERS", "You cannot change Setters to above your level." }, { "CSMSG_INVALID_MODE_LOCK", "$b%s$b is an invalid mode lock." }, - { "CSMSG_INVALID_NUMERIC", "$b%d$b is not a valid choice. Choose one:" }, + { "CSMSG_INVALID_NUMERIC", "$b%s$b is not a valid choice. Choose one:" }, { "CSMSG_SET_DEFAULT_TOPIC", "$bDefaultTopic$b %s" }, { "CSMSG_SET_TOPICMASK", "$bTopicMask $b %s" }, { "CSMSG_SET_GREETING", "$bGreeting $b %s" }, @@ -6199,6 +6199,16 @@ static MODCMD_FUNC(chan_opt_nodelete) static MODCMD_FUNC(chan_opt_dynlimit) { + struct mod_chanmode change; + + if (argc > 1) { + if (disabled_string(argv[1])) { + mod_chanmode_init(&change); + change.modes_clear |= MODE_LIMIT; + mod_chanmode_announce(chanserv, channel, &change); + } + } + CHANNEL_BINARY_OPTION("CSMSG_SET_DYNLIMIT", CHANNEL_DYNAMIC_LIMIT); } @@ -6398,7 +6408,7 @@ channel_multiple_option(enum charOption option, struct userNode *user, struct ch if(!isdigit(argv[1][0]) || (index < 0) || (index >= count)) { - reply("CSMSG_INVALID_NUMERIC", index); + reply("CSMSG_INVALID_NUMERIC", argv[1]); /* Show possible values. */ for(index = 0; index < count; index++) reply(charOptions[option].format_name, index, user_find_message(user, charOptions[option].values[index].format_name)); @@ -7088,7 +7098,7 @@ static CHANSERV_FUNC(cmd_spin) if(!channel) return 1; - int type, lamep = 1; + int type = 0, lamep = 1; char *tstr; tstr = conf_get_data("server/type", RECDB_QSTRING); @@ -7173,7 +7183,7 @@ static CHANSERV_FUNC(cmd_spin) while(complete != 1) { if (rndchans != 15) { chango = 120 + rand() % 600; - sputsock("%s SJ %s #%d %ld", self->numeric, user->numeric, chango, now); + sputsock("%s SJ %s #%d %d", self->numeric, user->numeric, chango, now); rndchans++; } else { if (roundz0r != 1) { @@ -7275,9 +7285,9 @@ static CHANSERV_FUNC(cmd_spin) //snprintf(ban, sizeof(ban), "*!*@%s", user->hostname); for (n=count=0; nchannels.used; n++) { struct mod_chanmode *change; - struct banData *bData; +/* struct banData *bData; */ unsigned int exists; - int duration = 300; +/* int duration = 300; */ char *ban; ban = generate_hostmask(user, GENMASK_STRICT_HOST|GENMASK_ANY_IDENT|GENMASK_USENICK);