From 2307570f3f0b6cc630589195ef18ad8ed4cddbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 11 Mar 2019 23:49:12 +0100 Subject: Expand 24 chars limitation of bitlbee --- nixops/modules/irc/bitlbee_long_nicks.patch | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 nixops/modules/irc/bitlbee_long_nicks.patch (limited to 'nixops/modules/irc/bitlbee_long_nicks.patch') 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 @@ +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 " " + +-#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; + -- cgit v1.2.3