Compare commits
10 commits
c790520218
...
519d9bc0f4
Author | SHA1 | Date | |
---|---|---|---|
|
519d9bc0f4 | ||
|
dd3355732b | ||
|
1ccc642277 | ||
|
a9505057c5 | ||
|
eaf922d427 | ||
|
4d12e65469 | ||
|
642c73dddb | ||
|
c1b01bf5ec | ||
|
fd241b5fc8 | ||
|
3b24363e91 |
20 changed files with 110 additions and 55 deletions
|
@ -371,6 +371,7 @@ channel {
|
||||||
displayed_usercount = 3;
|
displayed_usercount = 3;
|
||||||
strip_topic_colors = no;
|
strip_topic_colors = no;
|
||||||
opmod_send_statusmsg = no;
|
opmod_send_statusmsg = no;
|
||||||
|
invite_notify_notice = yes;
|
||||||
};
|
};
|
||||||
|
|
||||||
serverhide {
|
serverhide {
|
||||||
|
|
|
@ -360,6 +360,11 @@ auth {
|
||||||
user = "*@198.51.100.0/24";
|
user = "*@198.51.100.0/24";
|
||||||
user = "*test@2001:db8:1:*";
|
user = "*test@2001:db8:1:*";
|
||||||
|
|
||||||
|
/* umodes; the user mode character string to apply to users
|
||||||
|
* when they get placed into this auth block.
|
||||||
|
*/
|
||||||
|
#umodes = "+w";
|
||||||
|
|
||||||
/* auth_user: This allows specifying a username:password instead of
|
/* auth_user: This allows specifying a username:password instead of
|
||||||
* just a password in PASS, so that a fixed user@host is not
|
* just a password in PASS, so that a fixed user@host is not
|
||||||
* necessary for a specific auth{} block.
|
* necessary for a specific auth{} block.
|
||||||
|
@ -605,6 +610,7 @@ connect "irc.uplink.com" {
|
||||||
* autoconn - automatically connect to this server
|
* autoconn - automatically connect to this server
|
||||||
* topicburst - burst topics between servers
|
* topicburst - burst topics between servers
|
||||||
* ssl - ssl/tls encrypted server connections
|
* ssl - ssl/tls encrypted server connections
|
||||||
|
* sctp - use SCTP instead of TCP to connect to the server
|
||||||
* no-export - marks the link as a no-export link (not exported to other links)
|
* no-export - marks the link as a no-export link (not exported to other links)
|
||||||
*/
|
*/
|
||||||
flags = topicburst;
|
flags = topicburst;
|
||||||
|
@ -815,6 +821,11 @@ channel {
|
||||||
|
|
||||||
/* ip_bans_through_vhost: should channel IP bans see through dynamic spoofed hosts? */
|
/* ip_bans_through_vhost: should channel IP bans see through dynamic spoofed hosts? */
|
||||||
ip_bans_through_vhost = yes;
|
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <client.h>
|
#include <client.h>
|
||||||
#include <hash.h>
|
#include <hash.h>
|
||||||
#include <send.h>
|
#include <send.h>
|
||||||
|
#include <s_conf.h>
|
||||||
#include <s_serv.h>
|
#include <s_serv.h>
|
||||||
|
|
||||||
static const char inv_notify_desc[] = "Notifies channel on /invite and provides the invite-notify client capability";
|
static const char inv_notify_desc[] = "Notifies channel on /invite and provides the invite-notify client capability";
|
||||||
|
@ -32,12 +33,16 @@ mapi_clist_av1 inv_notify_clist[] = { &invited_msgtab, NULL };
|
||||||
static void
|
static void
|
||||||
invite_notify(struct Client *source, struct Client *target, struct Channel *channel)
|
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,
|
sendto_channel_local_with_capability(source, CHFL_CHANOP, CAP_INVITE_NOTIFY, 0, channel,
|
||||||
":%s!%s@%s INVITE %s %s", source->name, source->username,
|
":%s!%s@%s INVITE %s %s", source->name, source->username,
|
||||||
source->host, target->name, channel->chname);
|
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
|
static void
|
||||||
|
|
|
@ -603,7 +603,7 @@ extern struct Client *find_named_person(const char *);
|
||||||
extern struct Client *next_client(struct Client *, const char *);
|
extern struct Client *next_client(struct Client *, const char *);
|
||||||
|
|
||||||
#define accept_message(s, t) ((s) == (t) || (rb_dlinkFind((s), &((t)->localClient->allow_list))))
|
#define accept_message(s, t) ((s) == (t) || (rb_dlinkFind((s), &((t)->localClient->allow_list))))
|
||||||
extern void del_all_accepts(struct Client *client_p);
|
extern void del_all_accepts(struct Client *client_p, bool self_too);
|
||||||
|
|
||||||
extern void dead_link(struct Client *client_p, int sendqex);
|
extern void dead_link(struct Client *client_p, int sendqex);
|
||||||
extern int show_ip(struct Client *source_p, struct Client *target_p);
|
extern int show_ip(struct Client *source_p, struct Client *target_p);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#define DELAYED_EXIT_TIME 10
|
#define DELAYED_EXIT_TIME 10
|
||||||
|
|
||||||
void init_reject(void);
|
void init_reject(void);
|
||||||
int check_reject(rb_fde_t *F, struct sockaddr *addr);
|
int check_reject(rb_fde_t *F, struct sockaddr *addr, bool ssl);
|
||||||
void add_reject(struct Client *, const char *mask1, const char *mask2, struct ConfItem *aconf, const char *reason);
|
void add_reject(struct Client *, const char *mask1, const char *mask2, struct ConfItem *aconf, const char *reason);
|
||||||
int is_reject_ip(struct sockaddr *addr);
|
int is_reject_ip(struct sockaddr *addr);
|
||||||
void flush_reject(void);
|
void flush_reject(void);
|
||||||
|
|
|
@ -297,6 +297,7 @@ struct config_channel_entry
|
||||||
int strip_topic_colors;
|
int strip_topic_colors;
|
||||||
int opmod_send_statusmsg;
|
int opmod_send_statusmsg;
|
||||||
int ip_bans_through_vhost;
|
int ip_bans_through_vhost;
|
||||||
|
int invite_notify_notice;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct config_server_hide
|
struct config_server_hide
|
||||||
|
|
|
@ -396,7 +396,7 @@ static void
|
||||||
restart_authd_cb(rb_helper * helper)
|
restart_authd_cb(rb_helper * helper)
|
||||||
{
|
{
|
||||||
iwarn("authd helper died - attempting to restart");
|
iwarn("authd helper died - attempting to restart");
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authdd helper died - attempting to restart");
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd helper died - attempting to restart");
|
||||||
|
|
||||||
if(helper != NULL)
|
if(helper != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1385,7 +1385,7 @@ exit_generic_client(struct Client *client_p, struct Client *source_p, struct Cli
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clean up allow lists */
|
/* Clean up allow lists */
|
||||||
del_all_accepts(source_p);
|
del_all_accepts(source_p, true);
|
||||||
|
|
||||||
whowas_add_history(source_p, 0);
|
whowas_add_history(source_p, 0);
|
||||||
whowas_off_history(source_p);
|
whowas_off_history(source_p);
|
||||||
|
@ -1793,19 +1793,19 @@ count_remote_client_memory(size_t * count, size_t * remote_client_memory_used)
|
||||||
/*
|
/*
|
||||||
* del_all_accepts
|
* del_all_accepts
|
||||||
*
|
*
|
||||||
* inputs - pointer to exiting client
|
* inputs - pointer to exiting client, flag to include own allow_list
|
||||||
* output - NONE
|
* output - NONE
|
||||||
* side effects - Walk through given clients allow_list and on_allow_list
|
* side effects - Walk through given clients allow_list and on_allow_list
|
||||||
* remove all references to this client
|
* remove all references to this client
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
del_all_accepts(struct Client *client_p)
|
del_all_accepts(struct Client *client_p, bool self_too)
|
||||||
{
|
{
|
||||||
rb_dlink_node *ptr;
|
rb_dlink_node *ptr;
|
||||||
rb_dlink_node *next_ptr;
|
rb_dlink_node *next_ptr;
|
||||||
struct Client *target_p;
|
struct Client *target_p;
|
||||||
|
|
||||||
if(MyClient(client_p) && client_p->localClient->allow_list.head)
|
if(self_too && MyClient(client_p) && client_p->localClient->allow_list.head)
|
||||||
{
|
{
|
||||||
/* clear this clients accept list, and remove them from
|
/* clear this clients accept list, and remove them from
|
||||||
* everyones on_accept_list
|
* everyones on_accept_list
|
||||||
|
@ -1813,6 +1813,7 @@ del_all_accepts(struct Client *client_p)
|
||||||
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head)
|
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head)
|
||||||
{
|
{
|
||||||
target_p = ptr->data;
|
target_p = ptr->data;
|
||||||
|
|
||||||
rb_dlinkFindDestroy(client_p, &target_p->on_allow_list);
|
rb_dlinkFindDestroy(client_p, &target_p->on_allow_list);
|
||||||
rb_dlinkDestroy(ptr, &client_p->localClient->allow_list);
|
rb_dlinkDestroy(ptr, &client_p->localClient->allow_list);
|
||||||
}
|
}
|
||||||
|
@ -1822,6 +1823,13 @@ del_all_accepts(struct Client *client_p)
|
||||||
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
|
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
|
||||||
{
|
{
|
||||||
target_p = ptr->data;
|
target_p = ptr->data;
|
||||||
|
|
||||||
|
/* If we're not doing our own, we're doing this because of a nick change.
|
||||||
|
* Skip those that would see the nick change anyway
|
||||||
|
*/
|
||||||
|
if(!self_too && has_common_channel(client_p, target_p))
|
||||||
|
continue;
|
||||||
|
|
||||||
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);
|
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);
|
||||||
rb_dlinkDestroy(ptr, &client_p->on_allow_list);
|
rb_dlinkDestroy(ptr, &client_p->on_allow_list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,13 +581,19 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
|
||||||
static time_t last_oper_notice = 0;
|
static time_t last_oper_notice = 0;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
static const char *allinuse = "ERROR :All connections in use\r\n";
|
||||||
static const char *toofast = "ERROR :Reconnecting too fast, throttled.\r\n";
|
static const char *toofast = "ERROR :Reconnecting too fast, throttled.\r\n";
|
||||||
|
|
||||||
static const unsigned char sslerrcode[] = {
|
static const unsigned char ssldeniederrcode[] = {
|
||||||
// SSLv3.0 Fatal Alert: Access Denied
|
// SSLv3.0 Fatal Alert: Access Denied
|
||||||
0x15, 0x03, 0x00, 0x00, 0x02, 0x02, 0x31
|
0x15, 0x03, 0x00, 0x00, 0x02, 0x02, 0x31
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const unsigned char sslinternalerrcode[] = {
|
||||||
|
// SSLv3.0 Fatal Alert: Internal Error
|
||||||
|
0x15, 0x03, 0x00, 0x00, 0x02, 0x02, 0x50
|
||||||
|
};
|
||||||
|
|
||||||
if(listener->ssl && (!ircd_ssl_ok || !get_ssld_count()))
|
if(listener->ssl && (!ircd_ssl_ok || !get_ssld_count()))
|
||||||
{
|
{
|
||||||
rb_close(F);
|
rb_close(F);
|
||||||
|
@ -608,7 +614,11 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
|
||||||
last_oper_notice = rb_current_time();
|
last_oper_notice = rb_current_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_write(F, "ERROR :All connections in use\r\n", 31);
|
if(listener->ssl)
|
||||||
|
rb_write(F, sslinternalerrcode, sizeof(sslinternalerrcode));
|
||||||
|
else
|
||||||
|
rb_write(F, allinuse, strlen(allinuse));
|
||||||
|
|
||||||
rb_close(F);
|
rb_close(F);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -625,7 +635,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
|
||||||
|
|
||||||
if(listener->ssl)
|
if(listener->ssl)
|
||||||
{
|
{
|
||||||
rb_write(F, sslerrcode, sizeof(sslerrcode));
|
rb_write(F, ssldeniederrcode, sizeof(ssldeniederrcode));
|
||||||
}
|
}
|
||||||
else if(ConfigFileEntry.dline_with_reason)
|
else if(ConfigFileEntry.dline_with_reason)
|
||||||
{
|
{
|
||||||
|
@ -648,7 +658,7 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(check_reject(F, addr)) {
|
if(check_reject(F, addr, listener->ssl)) {
|
||||||
/* Reject the connection without closing the socket
|
/* Reject the connection without closing the socket
|
||||||
* because it is now on the delay_exit list. */
|
* because it is now on the delay_exit list. */
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -656,7 +666,11 @@ accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, voi
|
||||||
|
|
||||||
if(throttle_add(addr))
|
if(throttle_add(addr))
|
||||||
{
|
{
|
||||||
|
if(listener->ssl)
|
||||||
|
rb_write(F, ssldeniederrcode, sizeof(ssldeniederrcode));
|
||||||
|
else
|
||||||
rb_write(F, toofast, strlen(toofast));
|
rb_write(F, toofast, strlen(toofast));
|
||||||
|
|
||||||
rb_close(F);
|
rb_close(F);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2821,6 +2821,7 @@ static struct ConfEntry conf_channel_table[] =
|
||||||
{ "strip_topic_colors", CF_YESNO, NULL, 0, &ConfigChannel.strip_topic_colors },
|
{ "strip_topic_colors", CF_YESNO, NULL, 0, &ConfigChannel.strip_topic_colors },
|
||||||
{ "opmod_send_statusmsg", CF_YESNO, NULL, 0, &ConfigChannel.opmod_send_statusmsg },
|
{ "opmod_send_statusmsg", CF_YESNO, NULL, 0, &ConfigChannel.opmod_send_statusmsg },
|
||||||
{ "ip_bans_through_vhost", CF_YESNO, NULL, 0, &ConfigChannel.ip_bans_through_vhost },
|
{ "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 }
|
{ "\0", 0, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ typedef struct _delay_data
|
||||||
rb_fde_t *F;
|
rb_fde_t *F;
|
||||||
struct ConfItem *aconf;
|
struct ConfItem *aconf;
|
||||||
const char *reason;
|
const char *reason;
|
||||||
|
bool ssl;
|
||||||
} delay_t;
|
} delay_t;
|
||||||
|
|
||||||
typedef struct _throttle
|
typedef struct _throttle
|
||||||
|
@ -92,28 +93,39 @@ reject_exit(void *unused)
|
||||||
delay_t *ddata;
|
delay_t *ddata;
|
||||||
static const char *errbuf = "ERROR :Closing Link: (*** Banned (cache))\r\n";
|
static const char *errbuf = "ERROR :Closing Link: (*** Banned (cache))\r\n";
|
||||||
|
|
||||||
|
static const unsigned char ssldeniederrcode[] = {
|
||||||
|
// SSLv3.0 Fatal Alert: Access Denied
|
||||||
|
0x15, 0x03, 0x00, 0x00, 0x02, 0x02, 0x31
|
||||||
|
};
|
||||||
|
|
||||||
RB_DLINK_FOREACH_SAFE(ptr, ptr_next, delay_exit.head)
|
RB_DLINK_FOREACH_SAFE(ptr, ptr_next, delay_exit.head)
|
||||||
{
|
{
|
||||||
ddata = ptr->data;
|
ddata = ptr->data;
|
||||||
|
|
||||||
|
if (ddata->ssl)
|
||||||
|
{
|
||||||
|
rb_write(ddata->F, ssldeniederrcode, sizeof(ssldeniederrcode));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
*dynamic_reason = '\0';
|
*dynamic_reason = '\0';
|
||||||
|
|
||||||
if (ddata->aconf)
|
if (ddata->aconf)
|
||||||
{
|
|
||||||
snprintf(dynamic_reason, sizeof dynamic_reason, form_str(ERR_YOUREBANNEDCREEP) "\r\n",
|
snprintf(dynamic_reason, sizeof dynamic_reason, form_str(ERR_YOUREBANNEDCREEP) "\r\n",
|
||||||
me.name, "*", get_user_ban_reason(ddata->aconf));
|
me.name, "*", get_user_ban_reason(ddata->aconf));
|
||||||
rb_write(ddata->F, dynamic_reason, strlen(dynamic_reason));
|
|
||||||
|
|
||||||
deref_conf(ddata->aconf);
|
|
||||||
}
|
|
||||||
else if (ddata->reason)
|
else if (ddata->reason)
|
||||||
{
|
|
||||||
snprintf(dynamic_reason, sizeof dynamic_reason, ":%s 465 %s :%s\r\n",
|
snprintf(dynamic_reason, sizeof dynamic_reason, ":%s 465 %s :%s\r\n",
|
||||||
me.name, "*", ddata->reason);
|
me.name, "*", ddata->reason);
|
||||||
|
|
||||||
|
if (*dynamic_reason)
|
||||||
rb_write(ddata->F, dynamic_reason, strlen(dynamic_reason));
|
rb_write(ddata->F, dynamic_reason, strlen(dynamic_reason));
|
||||||
}
|
|
||||||
|
|
||||||
rb_write(ddata->F, errbuf, strlen(errbuf));
|
rb_write(ddata->F, errbuf, strlen(errbuf));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ddata->aconf)
|
||||||
|
deref_conf(ddata->aconf);
|
||||||
|
|
||||||
rb_close(ddata->F);
|
rb_close(ddata->F);
|
||||||
rb_free(ddata);
|
rb_free(ddata);
|
||||||
}
|
}
|
||||||
|
@ -228,7 +240,7 @@ add_reject(struct Client *client_p, const char *mask1, const char *mask2, struct
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
check_reject(rb_fde_t *F, struct sockaddr *addr)
|
check_reject(rb_fde_t *F, struct sockaddr *addr, bool ssl)
|
||||||
{
|
{
|
||||||
rb_patricia_node_t *pnode;
|
rb_patricia_node_t *pnode;
|
||||||
reject_t *rdata;
|
reject_t *rdata;
|
||||||
|
@ -276,6 +288,7 @@ check_reject(rb_fde_t *F, struct sockaddr *addr)
|
||||||
ddata->reason = NULL;
|
ddata->reason = NULL;
|
||||||
}
|
}
|
||||||
ddata->F = F;
|
ddata->F = F;
|
||||||
|
ddata->ssl = ssl;
|
||||||
rb_dlinkAdd(ddata, &ddata->node, &delay_exit);
|
rb_dlinkAdd(ddata, &ddata->node, &delay_exit);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -830,6 +830,7 @@ set_default_conf(void)
|
||||||
ConfigChannel.displayed_usercount = 3;
|
ConfigChannel.displayed_usercount = 3;
|
||||||
ConfigChannel.opmod_send_statusmsg = false;
|
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;
|
ConfigChannel.autochanmodes = MODE_TOPICLIMIT | MODE_NOPRIVMSGS;
|
||||||
|
|
||||||
|
|
|
@ -1725,7 +1725,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use
|
||||||
if(changed)
|
if(changed)
|
||||||
{
|
{
|
||||||
monitor_signon(target_p);
|
monitor_signon(target_p);
|
||||||
del_all_accepts(target_p);
|
del_all_accepts(target_p, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ do_modreload(struct Client *source_p, const char *module)
|
||||||
struct modreload *info = rb_malloc(sizeof *info);
|
struct modreload *info = rb_malloc(sizeof *info);
|
||||||
strcpy(info->module, module);
|
strcpy(info->module, module);
|
||||||
strcpy(info->id, source_p->id);
|
strcpy(info->id, source_p->id);
|
||||||
rb_event_addonce("modules_do_reload", modules_do_reload, info, 1);
|
rb_defer(&modules_do_reload, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -304,7 +304,7 @@ do_modrestart(struct Client *source_p)
|
||||||
*
|
*
|
||||||
* So, defer the restart to the event loop and return now.
|
* So, defer the restart to the event loop and return now.
|
||||||
*/
|
*/
|
||||||
rb_event_addonce("modules_do_restart", modules_do_restart, NULL, 1);
|
rb_defer(&modules_do_restart, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -619,8 +619,6 @@ static void
|
||||||
change_local_nick(struct Client *client_p, struct Client *source_p,
|
change_local_nick(struct Client *client_p, struct Client *source_p,
|
||||||
char *nick, int dosend)
|
char *nick, int dosend)
|
||||||
{
|
{
|
||||||
struct Client *target_p;
|
|
||||||
rb_dlink_node *ptr, *next_ptr;
|
|
||||||
struct Channel *chptr;
|
struct Channel *chptr;
|
||||||
char note[NICKLEN + 10];
|
char note[NICKLEN + 10];
|
||||||
int samenick;
|
int samenick;
|
||||||
|
@ -704,20 +702,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
|
||||||
/* Make sure everyone that has this client on its accept list
|
/* Make sure everyone that has this client on its accept list
|
||||||
* loses that reference.
|
* loses that reference.
|
||||||
*/
|
*/
|
||||||
/* we used to call del_all_accepts() here, but theres no real reason
|
del_all_accepts(source_p, false);
|
||||||
* to clear a clients own list of accepted clients. So just remove
|
|
||||||
* them from everyone elses list --anfl
|
|
||||||
*/
|
|
||||||
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, source_p->on_allow_list.head)
|
|
||||||
{
|
|
||||||
target_p = ptr->data;
|
|
||||||
|
|
||||||
if (!has_common_channel(source_p, target_p))
|
|
||||||
{
|
|
||||||
rb_dlinkFindDestroy(source_p, &target_p->localClient->allow_list);
|
|
||||||
rb_dlinkDestroy(ptr, &source_p->on_allow_list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(note, sizeof(note), "Nick: %s", nick);
|
snprintf(note, sizeof(note), "Nick: %s", nick);
|
||||||
rb_note(client_p->localClient->F, note);
|
rb_note(client_p->localClient->F, note);
|
||||||
|
|
|
@ -226,8 +226,8 @@ m_challenge(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
|
||||||
|
|
||||||
if(ConfigFileEntry.failed_oper_notice)
|
if(ConfigFileEntry.failed_oper_notice)
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
||||||
"Failed CHALLENGE attempt - host mismatch by %s (%s@%s)",
|
"Failed CHALLENGE attempt - user@host mismatch or no operator block for %s by %s (%s@%s)",
|
||||||
source_p->name, source_p->username, source_p->host);
|
parv[1], source_p->name, source_p->username, source_p->host);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -636,6 +636,11 @@ static struct InfoStruct info_table[] = {
|
||||||
"Channel IP bans see through dynamic spoofs",
|
"Channel IP bans see through dynamic spoofs",
|
||||||
INFO_INTBOOL_YN(&ConfigChannel.ip_bans_through_vhost),
|
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_opers",
|
||||||
"Hide all opers from unprivileged users",
|
"Hide all opers from unprivileged users",
|
||||||
|
|
|
@ -107,8 +107,8 @@ m_oper(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
|
||||||
if(ConfigFileEntry.failed_oper_notice)
|
if(ConfigFileEntry.failed_oper_notice)
|
||||||
{
|
{
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
||||||
"Failed OPER attempt - host mismatch by %s (%s@%s)",
|
"Failed OPER attempt - user@host mismatch or no operator block for %s by %s (%s@%s)",
|
||||||
source_p->name, source_p->username, source_p->host);
|
name, source_p->name, source_p->username, source_p->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -280,7 +280,10 @@ doit:
|
||||||
|
|
||||||
monitor_signon(target_p);
|
monitor_signon(target_p);
|
||||||
|
|
||||||
del_all_accepts(target_p);
|
/* Make sure everyone that has this client on its accept list
|
||||||
|
* loses that reference.
|
||||||
|
*/
|
||||||
|
del_all_accepts(target_p, false);
|
||||||
|
|
||||||
snprintf(note, sizeof(note), "Nick: %s", target_p->name);
|
snprintf(note, sizeof(note), "Nick: %s", target_p->name);
|
||||||
rb_note(target_p->localClient->F, note);
|
rb_note(target_p->localClient->F, note);
|
||||||
|
|
|
@ -45,7 +45,14 @@ mapi_clist_av1 starttls_clist[] = { &starttls_msgtab, NULL };
|
||||||
|
|
||||||
unsigned int CLICAP_TLS = 0;
|
unsigned int CLICAP_TLS = 0;
|
||||||
|
|
||||||
|
static bool
|
||||||
|
tls_visible(struct Client *ignored)
|
||||||
|
{
|
||||||
|
return ircd_ssl_ok && get_ssld_count();
|
||||||
|
}
|
||||||
|
|
||||||
static struct ClientCapability capdata_tls = {
|
static struct ClientCapability capdata_tls = {
|
||||||
|
.visible = tls_visible,
|
||||||
.flags = CLICAP_FLAGS_PRIORITY,
|
.flags = CLICAP_FLAGS_PRIORITY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue