Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: REQUEST: New 911 system  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

WilliamWikked

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • WikkedWire IRC Network
REQUEST: New 911 system
« 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
Logged
WikkedWire IRC Network
Proud Anope Donator.

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: REQUEST: New 911 system
« Reply #1 on: May 15, 2010, 01:46:23 AM »

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.
Logged

WilliamWikked

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • WikkedWire IRC Network
Re: REQUEST: New 911 system
« Reply #2 on: May 16, 2010, 09:25:14 AM »

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!
Logged
WikkedWire IRC Network
Proud Anope Donator.

WilliamWikked

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • WikkedWire IRC Network
Re: REQUEST: New 911 system
« Reply #3 on: May 16, 2010, 09:27:50 AM »

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...
Logged
WikkedWire IRC Network
Proud Anope Donator.
Pages: [1]   Go Up