]> jfr.im git - irc/atheme/atheme.git/commitdiff
helpserv/services: skip BotServ bots
authorJanik Kleinhoff <redacted>
Sat, 31 Jan 2015 00:04:49 +0000 (00:04 +0000)
committerWilliam Pitcock <redacted>
Sat, 31 Jan 2015 01:42:38 +0000 (19:42 -0600)
Fixes atheme/atheme#445; botserv bots are useless clutter in a list
meant for users looking for help, and the instruction to use
/msg service help   doesn't apply to them either.

modules/helpserv/services.c

index 0feb3b4c8c6e0f924fb46562562e5a1de11c871f..e1ba225619eb5c45c2ac0ab9d801bca675e6ecab 100644 (file)
@@ -22,12 +22,12 @@ command_t helpserv_services = { "SERVICES", N_("List all services currently runn
 
 void _modinit(module_t *m)
 {
-        service_named_bind_command("helpserv", &helpserv_services);
+       service_named_bind_command("helpserv", &helpserv_services);
 }
 
 void _moddeinit(module_unload_intent_t intent)
 {
-        service_named_unbind_command("helpserv", &helpserv_services);
+       service_named_unbind_command("helpserv", &helpserv_services);
 }
 
 static void helpserv_cmd_services(sourceinfo_t *si, int parc, char *parv[])
@@ -39,12 +39,13 @@ static void helpserv_cmd_services(sourceinfo_t *si, int parc, char *parv[])
 
        MOWGLI_PATRICIA_FOREACH(sptr, &state, services_nick)
        {
-               command_success_nodata(si, _("%s"), sptr->nick);
+               if (!sptr->botonly)
+                       command_success_nodata(si, "%s", sptr->nick);
        }
 
        command_success_nodata(si, _("More information on each service is available by messaging it like so: /msg service help"));
 
-        return;
+       return;
 }
 /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs
  * vim:ts=8