Anope IRC Services
Anope Development => Modules => Topic started by: WilliamWikked on May 14, 2010, 11:45:56 PM
-
Hi, I downloaded the bs_911 module, and I'm looking for a way to make it issue a GLOBOPS upon trigger, instead of sending a message to a certain channel (we don't have a channel for just ircops, only admin)
I'm not a coder so I wouldn't even know where to begin.
Much appreciated,
William
-
You would want the anope_cmd_global function. http://anope.org/doxy/1.8/da/d17/ircd_8c.html#470646510a72516ffca39d1519c6ea08. Can probably just replace the anope_cmd_privmsg part of the module with that and remove the target argument (obviously a globop isn't sent to a specific target). Search the rest of the Anope source for examples of it.
-
Aha, thanks
I changed it from:
anope_cmd_privmsg(s_HelpServ, operchan, "ATTENTION! Help is needed in %s! User: %s", ci->name, argv[1]);
To:
anope_cmd_global(s_HelpServ, "ATTENTION! Help is needed in %s! Requested by %s", ci->name, argv[1]);
HelpServ: ATTENTION! Help is needed in #geek! Requested by William
Seems to have worked, and didn't crash Anope!
-
Another question, how would I make it so only a channel operator can trigger !911 with or without being on the channel's access list?
Or is that something I would need to contact the module coder for...