Change send_msg_to_channels() to remove 'channels' argument and always use PRIVMSG
The 'channels' argument was unnecessary because the channel list passed to it would always be from get_server_channels(server) anyway. Changing the message argument from a protocol message format string to a plain payload string for PRIVMSG means printf-escaping of the argument is avoided in the caller. This simplifies the callers and means we can remove the last use of quote_it(). This change also switches set_server_away() to use send_msg_to_channels() instead of open-coding the equivalent, which simplifies that function a lot. We are changing the signature of a function exported to modules here; however none of the in-tree modules use this function so it should be OK.
This commit is contained in:
@@ -375,7 +375,7 @@ struct sockaddr_foobar get_server_local_addr (int);
|
||||
struct sockaddr_foobar get_server_uh_addr (int);
|
||||
NotifyItem *get_server_notify_list (int);
|
||||
void BX_send_msg_to_nicks (ChannelList *, int, char *);
|
||||
void BX_send_msg_to_channels (ChannelList *, int, char *);
|
||||
void BX_send_msg_to_channels (int, const char *);
|
||||
int BX_is_server_queue (void);
|
||||
int save_servers (FILE *);
|
||||
void add_split_server (char *, char *, int);
|
||||
|
||||
Reference in New Issue
Block a user