displayed_usercount = 3;
strip_topic_colors = no;
opmod_send_statusmsg = no;
+ invite_notify_notice = yes;
};
serverhide {
/* ip_bans_through_vhost: should channel IP bans see through dynamic spoofed hosts? */
ip_bans_through_vhost = yes;
+
+ /* invite_notify_notice: when using extensions/invite_notify, should
+ * we send a NOTICE to clients that don't support IRCv3 invite-notify
+ */
+ invite_notify_notice = yes;
};
#include <client.h>
#include <hash.h>
#include <send.h>
+#include <s_conf.h>
#include <s_serv.h>
static const char inv_notify_desc[] = "Notifies channel on /invite and provides the invite-notify client capability";
static void
invite_notify(struct Client *source, struct Client *target, struct Channel *channel)
{
- sendto_channel_local_with_capability(source, CHFL_CHANOP, 0, CAP_INVITE_NOTIFY, channel,
- ":%s NOTICE %s :%s is inviting %s to %s.",
- me.name, channel->chname, source->name, target->name, channel->chname);
sendto_channel_local_with_capability(source, CHFL_CHANOP, CAP_INVITE_NOTIFY, 0, channel,
":%s!%s@%s INVITE %s %s", source->name, source->username,
source->host, target->name, channel->chname);
+
+ if (!ConfigChannel.invite_notify_notice)
+ return;
+
+ sendto_channel_local_with_capability(source, CHFL_CHANOP, 0, CAP_INVITE_NOTIFY, channel,
+ ":%s NOTICE %s :%s is inviting %s to %s.",
+ me.name, channel->chname, source->name, target->name, channel->chname);
}
static void
int strip_topic_colors;
int opmod_send_statusmsg;
int ip_bans_through_vhost;
+ int invite_notify_notice;
};
struct config_server_hide
{ "strip_topic_colors", CF_YESNO, NULL, 0, &ConfigChannel.strip_topic_colors },
{ "opmod_send_statusmsg", CF_YESNO, NULL, 0, &ConfigChannel.opmod_send_statusmsg },
{ "ip_bans_through_vhost", CF_YESNO, NULL, 0, &ConfigChannel.ip_bans_through_vhost },
+ { "invite_notify_notice", CF_YESNO, NULL, 0, &ConfigChannel.invite_notify_notice },
{ "\0", 0, NULL, 0, NULL }
};
ConfigChannel.disable_local_channels = false;
ConfigChannel.displayed_usercount = 3;
ConfigChannel.opmod_send_statusmsg = false;
- ConfigChannel.ip_bans_through_vhost= true;
+ ConfigChannel.ip_bans_through_vhost = true;
+ ConfigChannel.invite_notify_notice = true;
ConfigChannel.autochanmodes = MODE_TOPICLIMIT | MODE_NOPRIVMSGS;
"Channel IP bans see through dynamic spoofs",
INFO_INTBOOL_YN(&ConfigChannel.ip_bans_through_vhost),
},
+ {
+ "invite_notify_notice",
+ "NOTICEs are sent to clients that do not support invite-notify",
+ INFO_INTBOOL_YN(&ConfigChannel.invite_notify_notice),
+ },
{
"hide_opers",
"Hide all opers from unprivileged users",