Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 45d02f7

Browse files
committed
Merge branch 'i-like-cheese'
i-like-cheese has seen production use, as has master. The two branches have diverged a bit. Merge them while they can still be merged without inducing major headaches. (There are no conflicts, but some fixes were duplicated.)
2 parents 1f1e857 + 717fbca commit 45d02f7

File tree

7 files changed

+85
-12
lines changed

7 files changed

+85
-12
lines changed

libratbox/src/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ rb_init_ssl(void)
312312
ret = 0;
313313
}
314314
/* Disable SSLv2, make the client use our settings */
315-
SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_CIPHER_SERVER_PREFERENCE);
315+
SSL_CTX_set_options(ssl_server_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_CIPHER_SERVER_PREFERENCE);
316316
SSL_CTX_set_verify(ssl_server_ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, verify_accept_all_cb);
317317

318318
ssl_client_ctx = SSL_CTX_new(TLSv1_client_method());

modules/m_cmessage.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
#include "send.h"
4343
#include "s_conf.h"
4444
#include "packet.h"
45+
#include "supported.h"
46+
47+
static int _modinit(void);
48+
static void _moddeinit(void);
4549

4650
static int m_cmessage(int, const char *, struct Client *, struct Client *, int, const char **);
4751
static int m_cprivmsg(struct Client *, struct Client *, int, const char **);
@@ -57,7 +61,20 @@ struct Message cnotice_msgtab = {
5761
};
5862

5963
mapi_clist_av1 cmessage_clist[] = { &cprivmsg_msgtab, &cnotice_msgtab, NULL };
60-
DECLARE_MODULE_AV1(cmessage, NULL, NULL, cmessage_clist, NULL, NULL, "$Revision: 1543 $");
64+
DECLARE_MODULE_AV1(cmessage, _modinit, _moddeinit, cmessage_clist, NULL, NULL, "$Revision: 1543 $");
65+
66+
static int _modinit(void)
67+
{
68+
add_isupport("CPRIVMSG", isupport_string, "");
69+
add_isupport("CNOTICE", isupport_string, "");
70+
return 0;
71+
}
72+
73+
static void _moddeinit(void)
74+
{
75+
delete_isupport("CPRIVMSG");
76+
delete_isupport("CNOTICE");
77+
}
6178

6279
#define PRIVMSG 0
6380
#define NOTICE 1

modules/m_etrace.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
#include "msg.h"
5050
#include "parse.h"
5151
#include "modules.h"
52+
#include "supported.h"
53+
54+
static int _modinit(void);
55+
static void _moddeinit(void);
5256

5357
static int mo_etrace(struct Client *, struct Client *, int, const char **);
5458
static int me_etrace(struct Client *, struct Client *, int, const char **);
@@ -69,7 +73,18 @@ struct Message masktrace_msgtab = {
6973
};
7074

7175
mapi_clist_av1 etrace_clist[] = { &etrace_msgtab, &chantrace_msgtab, &masktrace_msgtab, NULL };
72-
DECLARE_MODULE_AV1(etrace, NULL, NULL, etrace_clist, NULL, NULL, "$Revision: 3161 $");
76+
DECLARE_MODULE_AV1(etrace, _modinit, _moddeinit, etrace_clist, NULL, NULL, "$Revision: 3161 $");
77+
78+
static int _modinit(void)
79+
{
80+
add_isupport("ETRACE", isupport_string, "");
81+
return 0;
82+
}
83+
84+
static void _moddeinit(void)
85+
{
86+
delete_isupport("ETRACE");
87+
}
7388

7489
static void do_etrace(struct Client *source_p, int ipv4, int ipv6);
7590
static void do_etrace_full(struct Client *source_p);

modules/m_knock.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
#include "parse.h"
3737
#include "modules.h"
3838
#include "s_serv.h"
39+
#include "supported.h"
40+
41+
static int _modinit(void);
42+
static void _moddeinit(void);
3943

4044
static int m_knock(struct Client *, struct Client *, int, const char **);
4145

@@ -45,7 +49,18 @@ struct Message knock_msgtab = {
4549
};
4650

4751
mapi_clist_av1 knock_clist[] = { &knock_msgtab, NULL };
48-
DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570 $");
52+
DECLARE_MODULE_AV1(knock, _modinit, _moddeinit, knock_clist, NULL, NULL, "$Revision: 3570 $");
53+
54+
static int _modinit(void)
55+
{
56+
add_isupport("KNOCK", isupport_boolean, &ConfigChannel.use_knock);
57+
return 0;
58+
}
59+
60+
static void _moddeinit(void)
61+
{
62+
delete_isupport("KNOCK");
63+
}
4964

5065
/* m_knock
5166
* parv[1] = channel

modules/m_monitor.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
#include "monitor.h"
3939
#include "numeric.h"
4040
#include "s_conf.h"
41+
#include "supported.h"
42+
43+
static int _modinit(void);
44+
static void _moddeinit(void);
4145

4246
static int m_monitor(struct Client *, struct Client *, int, const char **);
4347

@@ -47,7 +51,18 @@ struct Message monitor_msgtab = {
4751
};
4852

4953
mapi_clist_av1 monitor_clist[] = { &monitor_msgtab, NULL };
50-
DECLARE_MODULE_AV1(monitor, NULL, NULL, monitor_clist, NULL, NULL, "$Revision: 312 $");
54+
DECLARE_MODULE_AV1(monitor, _modinit, _moddeinit, monitor_clist, NULL, NULL, "$Revision: 312 $");
55+
56+
static int _modinit(void)
57+
{
58+
add_isupport("MONITOR", isupport_intptr, &ConfigFileEntry.max_monitor);
59+
return 0;
60+
}
61+
62+
static void _moddeinit(void)
63+
{
64+
delete_isupport("MONITOR");
65+
}
5166

5267
static void
5368
add_monitor(struct Client *client_p, const char *nicks)

modules/m_who.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "modules.h"
4141
#include "packet.h"
4242
#include "s_newconf.h"
43+
#include "supported.h"
4344

4445
#define FIELD_CHANNEL 0x0001
4546
#define FIELD_HOP 0x0002
@@ -61,6 +62,9 @@ struct who_format
6162
const char *querytype;
6263
};
6364

65+
static int _modinit(void);
66+
static void _moddeinit(void);
67+
6468
static int m_who(struct Client *, struct Client *, int, const char **);
6569

6670
struct Message who_msgtab = {
@@ -69,7 +73,18 @@ struct Message who_msgtab = {
6973
};
7074

7175
mapi_clist_av1 who_clist[] = { &who_msgtab, NULL };
72-
DECLARE_MODULE_AV1(who, NULL, NULL, who_clist, NULL, NULL, "$Revision: 3350 $");
76+
DECLARE_MODULE_AV1(who, _modinit, _moddeinit, who_clist, NULL, NULL, "$Revision: 3350 $");
77+
78+
static int _modinit(void)
79+
{
80+
add_isupport("WHOX", isupport_string, "");
81+
return 0;
82+
}
83+
84+
static void _moddeinit(void)
85+
{
86+
delete_isupport("WHOX");
87+
}
7388

7489
static void do_who_on_channel(struct Client *source_p, struct Channel *chptr,
7590
int server_oper, int member,

src/supported.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ init_isupport(void)
295295
static int channellen = LOC_CHANNELLEN;
296296
static int topiclen = TOPICLEN;
297297

298+
/* only non-module features belong here */
299+
298300
add_isupport("CHANTYPES", isupport_chantypes, NULL);
299301
add_isupport("EXCEPTS", isupport_boolean, &ConfigChannel.use_except);
300302
add_isupport("INVEX", isupport_boolean, &ConfigChannel.use_invex);
@@ -304,22 +306,16 @@ init_isupport(void)
304306
add_isupport("MAXLIST", isupport_maxlist, NULL);
305307
add_isupport("MODES", isupport_intptr, &maxmodes);
306308
add_isupport("NETWORK", isupport_stringptr, &ServerInfo.network_name);
307-
add_isupport("KNOCK", isupport_boolean, &ConfigChannel.use_knock);
308309
add_isupport("STATUSMSG", isupport_string, "@+");
309310
add_isupport("CALLERID", isupport_string, "g");
310311
add_isupport("CASEMAPPING", isupport_string, "rfc1459");
311312
add_isupport("CHARSET", isupport_string, "ascii");
312313
add_isupport("NICKLEN", isupport_intptr, &nicklen);
313314
add_isupport("CHANNELLEN", isupport_intptr, &channellen);
314315
add_isupport("TOPICLEN", isupport_intptr, &topiclen);
315-
add_isupport("ETRACE", isupport_string, "");
316-
add_isupport("CPRIVMSG", isupport_string, "");
317-
add_isupport("CNOTICE", isupport_string, "");
318316
add_isupport("DEAF", isupport_string, "D");
319-
add_isupport("MONITOR", isupport_intptr, &ConfigFileEntry.max_monitor);
320317
add_isupport("FNC", isupport_string, "");
321318
add_isupport("TARGMAX", isupport_targmax, NULL);
322319
add_isupport("EXTBAN", isupport_extban, NULL);
323-
add_isupport("WHOX", isupport_string, "");
324320
add_isupport("CLIENTVER", isupport_string, "3.0");
325321
}

0 commit comments

Comments
 (0)