aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/irc/bitlbee_long_nicks.patch
blob: 70be092570a8d4d5f82513e5e05d9616e946155c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/bitlbee.h b/bitlbee.h
index 17ab2979..5858277e 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -121,7 +121,7 @@ extern "C" {
 #define CONTROL_TOPIC "Welcome to the control channel. Type \2help\2 for help information."
 #define IRCD_INFO PACKAGE " <http://www.bitlbee.org/>"
 
-#define MAX_NICK_LENGTH 24
+#define MAX_NICK_LENGTH 99
 
 #define HELP_FILE VARDIR "help.txt"
 #define CONF_FILE_DEF ETCDIR "bitlbee.conf"
diff --git a/tests/check_nick.c b/tests/check_nick.c
index ca5e5111..909fdcc9 100644
--- a/tests/check_nick.c
+++ b/tests/check_nick.c
@@ -11,16 +11,16 @@
 START_TEST(test_nick_strip){
 	int i;
 	const char *get[] = { "test:", "test", "test\n",
-		              "thisisaveryveryveryverylongnick",
-		              "thisisave:ryveryveryverylongnick",
+		              "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick",
+		              "thisis:averyveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick",
 		              "t::::est",
 		              "test123",
 		              "123test",
 		              "123",
 		              NULL };
 	const char *expected[] = { "test", "test", "test",
-		                   "thisisaveryveryveryveryl",
-		                   "thisisaveryveryveryveryl",
+		                   "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryve",
+		                   "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryve",
 		                   "test",
 		                   "test123",
 		                   "_123test",
@@ -28,7 +28,7 @@ START_TEST(test_nick_strip){
 		                   NULL };
 
 	for (i = 0; get[i]; i++) {
-		char copy[60];
+		char copy[260];
 		strcpy(copy, get[i]);
 		nick_strip(NULL, copy);
 		fail_unless(strcmp(copy, expected[i]) == 0,
@@ -53,7 +53,7 @@ END_TEST
 
 START_TEST(test_nick_ok_notok)
 {
-	const char *nicks[] = { "thisisaveryveryveryveryveryveryverylongnick",
+	const char *nicks[] = { "thisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnickthisisaveryveryveryveryveryveryverylongnick",
 		                "\nillegalchar", "", "nick%", "123test", NULL };
 	int i;