diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-11 23:49:12 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-11 23:49:12 +0100 |
commit | 2307570f3f0b6cc630589195ef18ad8ed4cddbf0 (patch) | |
tree | 3272b2246b2769516c9a8dbfaeb20b216bc7c81a /nixops/modules/irc/bitlbee_long_nicks.patch | |
parent | 93fea40a4a1d90eb6c7651f3aa36214fbb2bdd57 (diff) | |
download | Nix-2307570f3f0b6cc630589195ef18ad8ed4cddbf0.tar.gz Nix-2307570f3f0b6cc630589195ef18ad8ed4cddbf0.tar.zst Nix-2307570f3f0b6cc630589195ef18ad8ed4cddbf0.zip |
Expand 24 chars limitation of bitlbee
Diffstat (limited to 'nixops/modules/irc/bitlbee_long_nicks.patch')
-rw-r--r-- | nixops/modules/irc/bitlbee_long_nicks.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/nixops/modules/irc/bitlbee_long_nicks.patch b/nixops/modules/irc/bitlbee_long_nicks.patch new file mode 100644 index 0000000..70be092 --- /dev/null +++ b/nixops/modules/irc/bitlbee_long_nicks.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | diff --git a/bitlbee.h b/bitlbee.h | ||
2 | index 17ab2979..5858277e 100644 | ||
3 | --- a/bitlbee.h | ||
4 | +++ b/bitlbee.h | ||
5 | @@ -121,7 +121,7 @@ extern "C" { | ||
6 | #define CONTROL_TOPIC "Welcome to the control channel. Type \2help\2 for help information." | ||
7 | #define IRCD_INFO PACKAGE " <http://www.bitlbee.org/>" | ||
8 | |||
9 | -#define MAX_NICK_LENGTH 24 | ||
10 | +#define MAX_NICK_LENGTH 99 | ||
11 | |||
12 | #define HELP_FILE VARDIR "help.txt" | ||
13 | #define CONF_FILE_DEF ETCDIR "bitlbee.conf" | ||
14 | diff --git a/tests/check_nick.c b/tests/check_nick.c | ||
15 | index ca5e5111..909fdcc9 100644 | ||
16 | --- a/tests/check_nick.c | ||
17 | +++ b/tests/check_nick.c | ||
18 | @@ -11,16 +11,16 @@ | ||
19 | START_TEST(test_nick_strip){ | ||
20 | int i; | ||
21 | const char *get[] = { "test:", "test", "test\n", | ||
22 | - "thisisaveryveryveryverylongnick", | ||
23 | - "thisisave:ryveryveryverylongnick", | ||
24 | + "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick", | ||
25 | + "thisis:averyveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick", | ||
26 | "t::::est", | ||
27 | "test123", | ||
28 | "123test", | ||
29 | "123", | ||
30 | NULL }; | ||
31 | const char *expected[] = { "test", "test", "test", | ||
32 | - "thisisaveryveryveryveryl", | ||
33 | - "thisisaveryveryveryveryl", | ||
34 | + "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryve", | ||
35 | + "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryve", | ||
36 | "test", | ||
37 | "test123", | ||
38 | "_123test", | ||
39 | @@ -28,7 +28,7 @@ START_TEST(test_nick_strip){ | ||
40 | NULL }; | ||
41 | |||
42 | for (i = 0; get[i]; i++) { | ||
43 | - char copy[60]; | ||
44 | + char copy[260]; | ||
45 | strcpy(copy, get[i]); | ||
46 | nick_strip(NULL, copy); | ||
47 | fail_unless(strcmp(copy, expected[i]) == 0, | ||
48 | @@ -53,7 +53,7 @@ END_TEST | ||
49 | |||
50 | START_TEST(test_nick_ok_notok) | ||
51 | { | ||
52 | - const char *nicks[] = { "thisisaveryveryveryveryveryveryverylongnick", | ||
53 | + const char *nicks[] = { "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick", | ||
54 | "\nillegalchar", "", "nick%", "123test", NULL }; | ||
55 | int i; | ||
56 | |||