command for sending to a channel & snomask

These are old archives. They are kept for historic purposes only.
Post Reply

command for sending to a channel & snomask

Post by sac »

I would like to create a command that would allows sending messages to a given channel or user but only to the users that have a given snomask active.

I think there is no function or combination of functions that allow me to do this cleanly.

I'm trying to do this to send special commands for user interfaces. These commands should not bother users that are not using a capable interface. These commands should only be sent to the channel or user the sender is talking to. So i would like a function that "intersects" snomask (or umode i guess) and user|channel, this function should make the proper checks for flooding and the like.

I was thinking to make the command copying m_message adding the snomask checking and maybe disabling some checks that would not apply to this case, as checking for PING or ACTION.

I would like you to tell me if you knew a better way to implement this.

Thank you in advance... and congratulations for your great work...
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States

Post by codemastr »

You'd pretty much have to do what you said. You'd need to cycle through the (local) members of the channel, find out which ones have the snomask, then send them the message. Next you'd pass the message along to other servers so that they could do the same check.
-- codemastr
Post Reply