aboutsummaryrefslogtreecommitdiff
path: root/overlays/bitlbee
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-02 02:17:28 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-02 02:17:28 +0200
commitc1b6f97a72e0b4897ce11414df28259d4ea3c5ab (patch)
treef0fb690030fd261b32798f5084220a7f83a3fe61 /overlays/bitlbee
parent5010032101ed3bceaa40fb0a631066e8098c1d7e (diff)
downloadNix-c1b6f97a72e0b4897ce11414df28259d4ea3c5ab.tar.gz
Nix-c1b6f97a72e0b4897ce11414df28259d4ea3c5ab.tar.zst
Nix-c1b6f97a72e0b4897ce11414df28259d4ea3c5ab.zip
Move some overlays to parent directory
Diffstat (limited to 'overlays/bitlbee')
-rw-r--r--overlays/bitlbee/bitlbee_long_nicks.patch56
-rw-r--r--overlays/bitlbee/default.nix5
2 files changed, 61 insertions, 0 deletions
diff --git a/overlays/bitlbee/bitlbee_long_nicks.patch b/overlays/bitlbee/bitlbee_long_nicks.patch
new file mode 100644
index 0000000..70be092
--- /dev/null
+++ b/overlays/bitlbee/bitlbee_long_nicks.patch
@@ -0,0 +1,56 @@
1diff --git a/bitlbee.h b/bitlbee.h
2index 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"
14diff --git a/tests/check_nick.c b/tests/check_nick.c
15index 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
diff --git a/overlays/bitlbee/default.nix b/overlays/bitlbee/default.nix
new file mode 100644
index 0000000..5183d01
--- /dev/null
+++ b/overlays/bitlbee/default.nix
@@ -0,0 +1,5 @@
1self: super: {
2 bitlbee = super.bitlbee.overrideAttrs(old: {
3 patches = (old.patches or []) ++ [ ./bitlbee_long_nicks.patch ];
4 });
5}