summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bdebd45)
src/chanserv.c (dnr_count_func): New function.
(cmd_dnrsearch): Recognize it.
(init_chanserv): Register it.
src/chanserv.help (DNRSEARCH ACTION): Document it.
+static int
+dnr_count_func(struct do_not_register *match, void *extra)
+{
+ return 0; (void)match; (void)extra;
+}
+
static MODCMD_FUNC(cmd_dnrsearch)
{
struct dnr_search *discrim;
static MODCMD_FUNC(cmd_dnrsearch)
{
struct dnr_search *discrim;
action = dnr_print_func;
else if(!irccasecmp(argv[1], "remove"))
action = dnr_remove_func;
action = dnr_print_func;
else if(!irccasecmp(argv[1], "remove"))
action = dnr_remove_func;
+ else if(!irccasecmp(argv[1], "count"))
+ action = dnr_count_func;
else
{
reply("CSMSG_DNR_BAD_ACTION", argv[1]);
else
{
reply("CSMSG_DNR_BAD_ACTION", argv[1]);
DEFINE_COMMAND(dnrsearch, 3, 0, "template", "noregister", NULL);
modcmd_register(chanserv_module, "dnrsearch print", NULL, 0, 0, NULL);
modcmd_register(chanserv_module, "dnrsearch remove", NULL, 0, 0, NULL);
DEFINE_COMMAND(dnrsearch, 3, 0, "template", "noregister", NULL);
modcmd_register(chanserv_module, "dnrsearch print", NULL, 0, 0, NULL);
modcmd_register(chanserv_module, "dnrsearch remove", NULL, 0, 0, NULL);
+ modcmd_register(chanserv_module, "dnrsearch count", NULL, 0, 0, NULL);
DEFINE_COMMAND(move, 1, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "template", "register", NULL);
DEFINE_COMMAND(csuspend, 2, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "flags", "+helping", NULL);
DEFINE_COMMAND(cunsuspend, 1, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "flags", "+helping", NULL);
DEFINE_COMMAND(move, 1, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "template", "register", NULL);
DEFINE_COMMAND(csuspend, 2, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "flags", "+helping", NULL);
DEFINE_COMMAND(cunsuspend, 1, MODCMD_REQUIRE_AUTHED|MODCMD_REQUIRE_REGCHAN, "flags", "+helping", NULL);
"Options for the action in $bdnrsearch$b are:",
"$bPRINT: $b Display the do-not-register entry.",
"$bREMOVE:$b Remove the do-not-register entry.",
"Options for the action in $bdnrsearch$b are:",
"$bPRINT: $b Display the do-not-register entry.",
"$bREMOVE:$b Remove the do-not-register entry.",
+ "$bCOUNT: $b Count the number of matching do-not-register entries.",
"$uSee Also:$u dnrsearch, dnrsearch criteria");
"DNRSEARCH CRITERIA" ("$bDNRSEARCH CRITERIA$b",
"Options for the criteria in $bdnrsearch$b are:",
"$uSee Also:$u dnrsearch, dnrsearch criteria");
"DNRSEARCH CRITERIA" ("$bDNRSEARCH CRITERIA$b",
"Options for the criteria in $bdnrsearch$b are:",