summaryrefslogtreecommitdiff
path: root/chat/irssi-icb/patches
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-09-30 08:59:58 +0000
committerjperkin <jperkin@pkgsrc.org>2014-09-30 08:59:58 +0000
commit24d49fb3260255578a10abb1879cd7ed904f37ad (patch)
treed5dc52bcc9009c472e9b3e9610e48d1326f31688 /chat/irssi-icb/patches
parentdd2b76b7d9b81876f5cf00b66fe8ae6760d4d4a3 (diff)
downloadpkgsrc-24d49fb3260255578a10abb1879cd7ed904f37ad.tar.gz
Update irssi-icb to version 0.15. Requested during the freeze by agc, as
the version number accidentally went backwards in the last irssi update. This release mainly incorporates most of the pkgsrc patches into the upstream tarball, so the only real change of note is that /beep output has been fixed.
Diffstat (limited to 'chat/irssi-icb/patches')
-rw-r--r--chat/irssi-icb/patches/patch-aa13
-rw-r--r--chat/irssi-icb/patches/patch-ab489
-rw-r--r--chat/irssi-icb/patches/patch-ac13
-rw-r--r--chat/irssi-icb/patches/patch-ad19
-rw-r--r--chat/irssi-icb/patches/patch-ae16
-rw-r--r--chat/irssi-icb/patches/patch-af167
-rw-r--r--chat/irssi-icb/patches/patch-ag33
-rw-r--r--chat/irssi-icb/patches/patch-ah13
-rw-r--r--chat/irssi-icb/patches/patch-ai13
-rw-r--r--chat/irssi-icb/patches/patch-aj41
-rw-r--r--chat/irssi-icb/patches/patch-al14
-rw-r--r--chat/irssi-icb/patches/patch-am4
-rw-r--r--chat/irssi-icb/patches/patch-an4
-rw-r--r--chat/irssi-icb/patches/patch-src_core_Makefile.in39
-rw-r--r--chat/irssi-icb/patches/patch-src_fe-common_module-formats.c15
15 files changed, 60 insertions, 833 deletions
diff --git a/chat/irssi-icb/patches/patch-aa b/chat/irssi-icb/patches/patch-aa
deleted file mode 100644
index 7f6831a56d5..00000000000
--- a/chat/irssi-icb/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2010/08/10 20:26:36 sketch Exp $
-
---- src/fe-common/Makefile.in.orig 2002-11-24 13:18:08.000000000 +0000
-+++ src/fe-common/Makefile.in 2010-08-10 20:57:17.000000000 +0100
-@@ -83,7 +83,7 @@
- moduledir = $(libdir)/irssi/modules
-
- module_LTLIBRARIES = libfe_icb.la
--libfe_icb_la_LDFLAGS = -avoid-version
-+libfe_icb_la_LDFLAGS = -module -avoid-version
-
- INCLUDES = $(GLIB_CFLAGS) -I$(IRSSI_INCLUDE) -I$(IRSSI_INCLUDE)/src -I$(IRSSI_INCLUDE)/src/core -I$(IRSSI_INCLUDE)/src/fe-common/core -I$(top_srcdir)/src/core
-
diff --git a/chat/irssi-icb/patches/patch-ab b/chat/irssi-icb/patches/patch-ab
deleted file mode 100644
index 31557aceede..00000000000
--- a/chat/irssi-icb/patches/patch-ab
+++ /dev/null
@@ -1,489 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2010/08/10 20:26:36 sketch Exp $
-
---- src/fe-common/fe-icb.c (revision 5174)
-+++ src/fe-common/fe-icb.c (working copy)
-@@ -18,33 +18,73 @@
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-+#include <time.h>
-+
- #include "module.h"
- #include "module-formats.h"
- #include "signals.h"
- #include "commands.h"
- #include "servers-setup.h"
- #include "levels.h"
-+#include "nicklist.h"
-
- #include "icb.h"
- #include "icb-servers.h"
- #include "icb-channels.h"
-+#include "icb-nicklist.h"
- #include "icb-protocol.h"
-
- #include "printtext.h"
- #include "themes.h"
-
--static void event_status(ICB_SERVER_REC *server, const char *data)
-+static void icb_change_topic(ICB_SERVER_REC *server, const char *topic,
-+ const char *setby, time_t settime)
- {
-- char **args;
-+ if (topic != NULL) {
-+ g_free_not_null(server->group->topic);
-+ server->group->topic = g_strdup(topic);
-+ }
-
-- /* FIXME: status messages should probably divided into their own
-- signals so irssi could track joins, parts, etc. */
-- args = icb_split(data, 2);
-- printformat(server, server->group->name, MSGLEVEL_CRAP,
-- ICBTXT_STATUS, args[0], args[1]);
-- icb_split_free(args);
-+ if (setby != NULL) {
-+ g_free_not_null(server->group->topic_by);
-+ server->group->topic_by = g_strdup(setby);
-+ }
-+
-+ server->group->topic_time = settime;
-+
-+ signal_emit("channel topic changed", 1, server->group);
- }
-
-+/*
-+ * ICB makes it hard to keep track of nicks:
-+ *
-+ * - moderators can come and go, and even return with a different nick, while
-+ * still retaining their moderator status
-+ *
-+ * - group moderator can change at any time, if the moderator is off-group
-+ * while changing nick
-+ *
-+ * - users can be moderator of multiple groups simultaneously, but can only
-+ * be in one group at a time
-+ *
-+ * So for now we don't bother to track the moderator, just the group nicks
-+ */
-+static void icb_update_nicklist(ICB_SERVER_REC *server)
-+{
-+ /*
-+ * In theory we should be able to just send '/who <group>' and parse,
-+ * but the problem is that ICB does not send any kind of end-of-who
-+ * marker when only listing one group, and sending a separate command
-+ * isn't guaranteed to come back in the right order.
-+ *
-+ * So we're forced do perform a full /who and then match against our
-+ * groupname. A full /who is terminated with a 'Total: ' line which we
-+ * can use as EOF>
-+ */
-+ server->silentwho = TRUE;
-+ icb_command(server, "w", "", NULL);
-+}
-+
- static void event_error(ICB_SERVER_REC *server, const char *data)
- {
- printformat(server, NULL, MSGLEVEL_CRAP, ICBTXT_ERROR, data);
-@@ -84,15 +124,351 @@
- icb_split_free(args);
- }
-
-+static void idle_time(char *buf, size_t bufsize, time_t idle)
-+{
-+#define MIN_LEN 60UL
-+#define HOUR_LEN 3600UL
-+#define DAY_LEN 86400UL
-+#define WEEK_LEN 604800UL
-+
-+ if (idle >= WEEK_LEN)
-+ snprintf(buf, bufsize, "%2dw%2dd",
-+ (int)(idle/WEEK_LEN), (int)((idle%WEEK_LEN)/DAY_LEN));
-+ else if (idle >= DAY_LEN)
-+ snprintf(buf, bufsize, "%2dd%2dh",
-+ (int)(idle/DAY_LEN), (int)((idle%DAY_LEN)/HOUR_LEN));
-+ else if (idle >= HOUR_LEN)
-+ snprintf(buf, bufsize, "%2dh%2dm",
-+ (int)(idle/HOUR_LEN), (int)((idle%HOUR_LEN)/MIN_LEN));
-+ else if (idle >= MIN_LEN)
-+ snprintf(buf, bufsize, "%2dm%2ds",
-+ (int)(idle/MIN_LEN), (int)(idle%MIN_LEN));
-+ else
-+ snprintf(buf, bufsize, " %2ds", (int)idle);
-+}
-+
-+static void cmdout_co(ICB_SERVER_REC *server, char **args)
-+{
-+ char *p, *group, *topic;
-+ int len;
-+
-+ static const char match_group[] = "Group: ";
-+ static const char match_topic[] = "Topic: ";
-+ static const char match_topicunset[] = "(None)";
-+ static const char match_topicis[] = "The topic is";
-+ static const char match_total[] = "Total: ";
-+
-+ /*
-+ * Use 'co' as the marker to denote wl lines have finished, so
-+ * reset the nick updates
-+ */
-+ server->updatenicks = FALSE;
-+
-+ /* If we're running in silent mode, parse the output for nicks/topic */
-+ if (server->silentwho) {
-+
-+ /* Match group lines */
-+ len = strlen(match_group);
-+ if (strncmp(args[0], match_group, len) == 0) {
-+
-+ group = g_strdup(args[0] + len);
-+ p = strchr(group, ' ');
-+ *p = '\0';
-+
-+ /* Check for our particular group */
-+ len = strlen(group);
-+ if (g_ascii_strncasecmp(group, server->group->name, len) == 0) {
-+
-+ /* Start matching nicks */
-+ server->updatenicks = TRUE;
-+
-+ p = strstr(args[0], match_topic);
-+ if (p != NULL && p != args[0]) {
-+ topic = p + strlen(match_topic);
-+ if (topic != NULL) {
-+ len = strlen(match_topicunset);
-+ if (strncmp(topic,
-+ match_topicunset,
-+ len) != 0) {
-+
-+ /* No way to find who set the topic, mark as unknown */
-+ icb_change_topic(server, topic, "unknown", time(NULL));
-+ }
-+ }
-+ }
-+ }
-+ g_free(group);
-+ }
-+
-+ /*
-+ * End of /who output, stop silent mode and signal front-end
-+ * to display /names list
-+ */
-+ len = strlen(match_total);
-+ if (strncmp(args[0], match_total, len) == 0) {
-+ server->silentwho = FALSE;
-+ signal_emit("channel joined", 1, server->group);
-+ }
-+ } else {
-+ /* Now that /topic works correctly, ignore server output */
-+ len = strlen(match_topicis);
-+ if (strncmp(args[0], match_topicis, len) != 0) {
-+ printtext(server, NULL, MSGLEVEL_CRAP, "%s", args[0]);
-+ }
-+ }
-+}
-+
-+static void cmdout_wl(ICB_SERVER_REC *server, char **args)
-+{
-+ struct tm *logintime;
-+ char logbuf[20];
-+ char idlebuf[20];
-+ char line[255];
-+ time_t temptime;
-+ int op;
-+
-+ /* "wl" : In a who listing, a line of output listing a user. Has the following format:
-+
-+ * Field 1: String indicating whether user is moderator or not. Usually "*" for
-+ * moderator, and " " for not.
-+ * Field 2: Nickname of user.
-+ * Field 3: Number of seconds user has been idle.
-+ * Field 4: Response Time. No longer in use.
-+ * Field 5: Login Time. Unix time_t format. Seconds since Jan. 1, 1970 GMT.
-+ * Field 6: Username of user.
-+ * Field 7: Hostname of user.
-+ * Field 8: Registration status.
-+ */
-+ temptime = strtol(args[4], NULL, 10);
-+ logintime = gmtime(&temptime);
-+ strftime(logbuf, sizeof(logbuf), "%b %e %H:%M", logintime);
-+ temptime = strtol(args[2], NULL, 10);
-+ idle_time(idlebuf, sizeof(idlebuf), temptime);
-+
-+ /* Update nicklist */
-+ if (server->updatenicks) {
-+ op = FALSE;
-+#ifdef NO_MOD_SUPPORT_YET
-+ switch(args[0][0]) {
-+ case '*':
-+ case 'm':
-+ op = TRUE;
-+ break;
-+ }
-+#endif
-+ icb_nicklist_insert(server->group, args[1], op);
-+ }
-+ if (!server->silentwho) {
-+ snprintf(line, sizeof(line), "*** %c%-14.14s %6.6s %12.12s %s@%s %s",
-+ args[0][0] == ' '?' ':'*', args[1], idlebuf, logbuf, args[5],
-+ args[6], args[7]);
-+ printtext(server, NULL, MSGLEVEL_CRAP, line);
-+ }
-+}
-+
- static void cmdout_default(ICB_SERVER_REC *server, char **args)
- {
- char *data;
-
- data = g_strjoinv(" ", args+1);
-- printtext(server, server->group->name, MSGLEVEL_CRAP, "%s", data);
-+ if (!server->silentwho) {
-+ printtext(server, NULL, MSGLEVEL_CRAP, "%s", data);
-+ }
- g_free(data);
- }
-
-+/*
-+ * args0 = "Arrive"
-+ * args0 = "<nickname> (<user>@<host>) entered group"
-+ */
-+static void status_arrive(ICB_SERVER_REC *server, char **args)
-+{
-+ char *nick, *p;
-+
-+ nick = g_strdup(args[1]);
-+ p = strchr(nick, ' ');
-+ *p = '\0';
-+ /* XXX: new arrivals can still be moderator */
-+ icb_nicklist_insert(server->group, nick, FALSE);
-+ g_free(nick);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Depart"
-+ * args1 = "<nickname> (<user>@<host>) just left"
-+ */
-+static void status_depart(ICB_SERVER_REC *server, char **args)
-+{
-+ NICK_REC *nickrec;
-+ char *nick, *p;
-+
-+ nick = g_strdup(args[1]);
-+ p = strchr(nick, ' ');
-+ *p = '\0';
-+
-+ nickrec = nicklist_find(CHANNEL(server->group), nick);
-+ if (nickrec != NULL) {
-+ nicklist_remove(CHANNEL(server->group), nickrec);
-+ }
-+ g_free(nick);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Sign-on"
-+ * args1 = "<nickname> (<user>@<host>) entered group"
-+ */
-+static void status_signon(ICB_SERVER_REC *server, char **args)
-+{
-+ char *nick, *p;
-+
-+ nick = g_strdup(args[1]);
-+ p = strchr(nick, ' ');
-+ *p = '\0';
-+
-+ icb_nicklist_insert(server->group, nick, FALSE);
-+
-+ g_free(nick);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Sign-off"
-+ * args1 = "<nickname> (<user>@<host>) has signed off."
-+ */
-+static void status_signoff(ICB_SERVER_REC *server, char **args)
-+{
-+ NICK_REC *nickrec;
-+ char *nick, *p;
-+
-+ nick = g_strdup(args[1]);
-+ p = strchr(nick, ' ');
-+ *p = '\0';
-+
-+ nickrec = nicklist_find(CHANNEL(server->group), nick);
-+ if (nickrec != NULL) {
-+ nicklist_remove(CHANNEL(server->group), nickrec);
-+ }
-+ g_free(nick);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * In theory should be status_status() but that's just silly :-)
-+ *
-+ * args0 = "Status"
-+ * args0 = "You are now in group <group>[ as moderator]"
-+ */
-+static void status_join(ICB_SERVER_REC *server, char **args)
-+{
-+ icb_update_nicklist(server);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Name"
-+ * args1 = "<oldnick> changed nickname to <newnick>"
-+ */
-+static void status_name(ICB_SERVER_REC *server, char **args)
-+{
-+ NICK_REC *nickrec;
-+ char *oldnick, *newnick, *p;
-+
-+ oldnick = g_strdup(args[1]);
-+ p = strchr(oldnick, ' ');
-+ if (p != NULL) *p = '\0';
-+
-+ p = g_strdup(args[1]);
-+ newnick = strrchr(p, ' ');
-+ if (newnick != NULL)
-+ newnick++;
-+
-+ nickrec = nicklist_find(CHANNEL(server->group), oldnick);
-+ if (nickrec != NULL)
-+ nicklist_rename(SERVER(server), oldnick, newnick);
-+
-+ /* Update our own nick */
-+ if (strcmp(oldnick, server->connrec->nick) == 0) {
-+ server_change_nick(SERVER(server), newnick);
-+ g_free(server->connrec->nick);
-+ server->connrec->nick = g_strdup(newnick);
-+ }
-+
-+ g_free(oldnick);
-+ g_free(p);
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Topic"
-+ * args1 = "<nickname> changed the topic to "<topic>"
-+ */
-+static void status_topic(ICB_SERVER_REC *server, char **args)
-+{
-+ char *topic, *setby, *p1, *p2;
-+
-+ p1 = strchr(args[1], '"');
-+ p2 = strrchr(args[1], '"');
-+
-+ if (p1++) {
-+ topic = g_strdup(p1);
-+ p2 = strrchr(topic, '"');
-+ *p2 = '\0';
-+
-+ setby = g_strdup(args[1]);
-+ p2 = strchr(setby, ' ');
-+ *p2 = '\0';
-+
-+ icb_change_topic(server, topic, setby, time(NULL));
-+
-+ g_free(topic);
-+ g_free(setby);
-+ }
-+
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+/*
-+ * args0 = "Pass"
-+ * args1 = "<nickname> just passed you moderation of group <group>"
-+ * args1 = "<nickname> has passed moderation to <nickname>"
-+ * args1 = "<nickname> is now mod."
-+ *
-+ * If the moderator signs off and you are passed moderation, then the third
-+ * args1 is used.
-+ *
-+ */
-+static void status_pass(ICB_SERVER_REC *server, char **args)
-+{
-+ /*
-+ * Eventually we might want to track this, for now just print status
-+ * to the group window
-+ */
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
-+static void status_default(ICB_SERVER_REC *server, char **args)
-+{
-+ /* Send messages to the group window by default */
-+ printformat(server, server->group->name, MSGLEVEL_CRAP,
-+ ICBTXT_STATUS, args[0], args[1]);
-+}
-+
- static void sig_server_add_fill(SERVER_SETUP_REC *rec,
- GHashTable *optlist)
- {
-@@ -109,13 +485,23 @@
- {
- theme_register(fecommon_icb_formats);
-
-- signal_add("icb event status", (SIGNAL_FUNC) event_status);
- signal_add("icb event error", (SIGNAL_FUNC) event_error);
- signal_add("icb event important", (SIGNAL_FUNC) event_important);
- signal_add("icb event beep", (SIGNAL_FUNC) event_beep);
- signal_add("icb event open", (SIGNAL_FUNC) event_open);
- signal_add("icb event personal", (SIGNAL_FUNC) event_personal);
-+ signal_add("icb cmdout co", (SIGNAL_FUNC) cmdout_co);
-+ signal_add("icb cmdout wl", (SIGNAL_FUNC) cmdout_wl);
- signal_add("default icb cmdout", (SIGNAL_FUNC) cmdout_default);
-+ signal_add("icb status arrive", (SIGNAL_FUNC) status_arrive);
-+ signal_add("icb status depart", (SIGNAL_FUNC) status_depart);
-+ signal_add("icb status sign-on", (SIGNAL_FUNC) status_signon);
-+ signal_add("icb status sign-off", (SIGNAL_FUNC) status_signoff);
-+ signal_add("icb status status", (SIGNAL_FUNC) status_join);
-+ signal_add("icb status topic", (SIGNAL_FUNC) status_topic);
-+ signal_add("icb status name", (SIGNAL_FUNC) status_name);
-+ signal_add("icb status pass", (SIGNAL_FUNC) status_pass);
-+ signal_add("default icb status", (SIGNAL_FUNC) status_default);
-
- signal_add("server add fill", (SIGNAL_FUNC) sig_server_add_fill);
- command_set_options("server add", "-icbnet");
-@@ -125,13 +511,23 @@
-
- void fe_icb_deinit(void)
- {
-- signal_remove("icb event status", (SIGNAL_FUNC) event_status);
- signal_remove("icb event error", (SIGNAL_FUNC) event_error);
- signal_remove("icb event important", (SIGNAL_FUNC) event_important);
- signal_remove("icb event beep", (SIGNAL_FUNC) event_beep);
- signal_remove("icb event open", (SIGNAL_FUNC) event_open);
- signal_remove("icb event personal", (SIGNAL_FUNC) event_personal);
-+ signal_remove("icb cmdout co", (SIGNAL_FUNC) cmdout_co);
-+ signal_remove("icb cmdout wl", (SIGNAL_FUNC) cmdout_wl);
- signal_remove("default icb cmdout", (SIGNAL_FUNC) cmdout_default);
-+ signal_remove("icb status arrive", (SIGNAL_FUNC) status_arrive);
-+ signal_remove("icb status depart", (SIGNAL_FUNC) status_depart);
-+ signal_remove("icb status sign-on", (SIGNAL_FUNC) status_signon);
-+ signal_remove("icb status sign-off", (SIGNAL_FUNC) status_signoff);
-+ signal_remove("icb status status", (SIGNAL_FUNC) status_join);
-+ signal_remove("icb status topic", (SIGNAL_FUNC) status_topic);
-+ signal_remove("icb status name", (SIGNAL_FUNC) status_name);
-+ signal_remove("icb status pass", (SIGNAL_FUNC) status_pass);
-+ signal_remove("default icb status", (SIGNAL_FUNC) status_default);
-
- signal_remove("server add fill", (SIGNAL_FUNC) sig_server_add_fill);
- }
diff --git a/chat/irssi-icb/patches/patch-ac b/chat/irssi-icb/patches/patch-ac
deleted file mode 100644
index f403f5430f1..00000000000
--- a/chat/irssi-icb/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2010/05/17 20:13:25 sketch Exp $
-
---- src/core/icb-commands.c.orig 2002-05-04 18:21:43.000000000 +0100
-+++ src/core/icb-commands.c 2010-05-17 20:40:28.000000000 +0100
-@@ -32,6 +32,8 @@
-
- "invite", "v", "echoback", "name", "motd", "topic", "status",
- "boot", "pass", "drop", "shutdown", "wall",
-+ "whereis", "brick", "away", "noaway", "nobeep", "cancel",
-+ "exclude", "news", "notify", "s_help", "shuttime", "talk", "hush",
- NULL
- };
-
diff --git a/chat/irssi-icb/patches/patch-ad b/chat/irssi-icb/patches/patch-ad
deleted file mode 100644
index c507b71b599..00000000000
--- a/chat/irssi-icb/patches/patch-ad
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2009/07/27 12:59:45 obache Exp $
-
-Clarify the README.
-
---- README.orig 2008-07-22 11:42:10.000000000 +0200
-+++ README 2008-07-22 11:46:02.000000000 +0200
-@@ -14,6 +14,10 @@
-
- icbnet = { type = "ICB"; };
-
--and then:
-+then run once:
-
-- /SERVER ADD -auto -icbnet icbnet default.icb.net
-+ /SERVER ADD -auto -icbnet icbnet default.icb.net 7326
-+
-+plus put into your ~/.irssi/startup:
-+
-+ load icb
diff --git a/chat/irssi-icb/patches/patch-ae b/chat/irssi-icb/patches/patch-ae
deleted file mode 100644
index bb64b137e97..00000000000
--- a/chat/irssi-icb/patches/patch-ae
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2009/07/27 12:59:45 obache Exp $
-
-Use glib2 instead of glib1.
-
---- configure.orig 2002-11-24 13:17:37.000000000 +0000
-+++ configure
-@@ -5892,6 +5892,9 @@ rm -f conftest*
- rm -f conf.glibtest
-
-
-+GLIB_CFLAGS="`pkg-config --cflags glib-2.0`"
-+GLIB_LIBS="`pkg-config --libs glib-2.0`"
-+
- # gcc specific options
- if test "x$ac_cv_prog_gcc" = "xyes"; then
- CFLAGS="$CFLAGS -Wall"
diff --git a/chat/irssi-icb/patches/patch-af b/chat/irssi-icb/patches/patch-af
deleted file mode 100644
index 44b0fbd83cf..00000000000
--- a/chat/irssi-icb/patches/patch-af
+++ /dev/null
@@ -1,167 +0,0 @@
-$NetBSD: patch-af,v 1.2 2010/08/10 20:26:36 sketch Exp $
-
---- src/core/icb-protocol.c (revision 5174)
-+++ src/core/icb-protocol.c (working copy)
-@@ -27,19 +27,19 @@
- #include "icb-servers.h"
-
- static char *signal_names[] = {
-- "login",
-- "open",
-- "personal",
-- "status",
-- "error",
-- "important",
-- "exit",
-- "command",
-- "cmdout",
-- "protocol",
-- "beep",
-- "ping",
-- "pong"
-+ "login", /* a */
-+ "open", /* b */
-+ "personal", /* c */
-+ "status", /* d */
-+ "error", /* e */
-+ "important", /* f */
-+ "exit", /* g */
-+ "command", /* h */
-+ "cmdout", /* i */
-+ "protocol", /* j */
-+ "beep", /* k */
-+ "ping", /* l */
-+ "pong" /* m */
- };
-
- #define SIGNAL_FIRST 'a'
-@@ -121,9 +121,93 @@
-
- void icb_send_open_msg(ICB_SERVER_REC *server, const char *text)
- {
-- icb_send_cmd(server, 'b', text, NULL);
-+ size_t remain;
-+
-+ /*
-+ * ICB has 255 byte line length limit, and public messages are sent
-+ * out with our nickname, so split text accordingly.
-+ *
-+ * 250 = 255 - 'b' - 1 space after nick - ^A - nul - extra
-+ *
-+ * Taken from ircII's icb.c, thanks phone :-)
-+ */
-+ remain = 250 - strlen(server->connrec->nick);
-+
-+ while(*text) {
-+ char buf[256], *sendbuf;
-+ size_t len, copylen;
-+
-+ len = strlen(text);
-+ copylen = remain;
-+ if (len > remain) {
-+ int i;
-+
-+ /* try to split on a word boundary */
-+ for (i = 1; i < 128 && i < len; i++) {
-+ if (isspace(text[remain - i])) {
-+ copylen -= i - 1;
-+ break;
-+ }
-+ }
-+ strncpy(buf, text, copylen);
-+ buf[copylen] = 0;
-+ sendbuf = buf;
-+ } else {
-+ sendbuf = (char *)text;
-+ }
-+ icb_send_cmd(server, 'b', sendbuf, NULL);
-+ text += len > copylen ? copylen : len;
-+ }
- }
-
-+void icb_send_private_msg(ICB_SERVER_REC *server, const char *target,
-+ const char *text)
-+{
-+ size_t mylen, targlen, remain;
-+
-+ /*
-+ * ICB has 255 byte line length limit. Private messages are sent
-+ * out with our nickname, but received with the target nickname,
-+ * so deduct the larger of the two in addition to other parts.
-+ *
-+ * 248 = 255 - 'hm' - 1 space after nick - ^A's - nul - extra
-+ *
-+ * Taken from ircII's icb.c, thanks phone :-)
-+ */
-+ mylen = strlen(server->connrec->nick);
-+ targlen = strlen(target);
-+ if (mylen > targlen) {
-+ remain = 248 - mylen;
-+ } else {
-+ remain = 248 - targlen;
-+ }
-+ while(*text) {
-+ char buf[256], *sendbuf;
-+ size_t len, copylen;
-+
-+ len = strlen(text);
-+ copylen = remain;
-+ if (len > remain) {
-+ int i;
-+
-+ /* try to split on a word boundary */
-+ for (i = 1; i < 128 && i < len; i++) {
-+ if (isspace(text[remain - i])) {
-+ copylen -= i - 1;
-+ break;
-+ }
-+ }
-+ strncpy(buf, text, copylen);
-+ buf[copylen] = 0;
-+ sendbuf = g_strconcat(target, " ", buf, NULL);
-+ } else {
-+ sendbuf = g_strconcat(target, " ", text, NULL);
-+ }
-+ icb_send_cmd(server, 'h', "m", sendbuf, NULL);
-+ text += len > copylen ? copylen : len;
-+ }
-+}
-+
- void icb_command(ICB_SERVER_REC *server, const char *cmd,
- const char *args, const char *id)
- {
-@@ -293,6 +377,20 @@
- g_strfreev(args);
- }
-
-+static void event_status(ICB_SERVER_REC *server, const char *data)
-+{
-+ char **args, *event;
-+
-+ args = g_strsplit(data, "\001", -1);
-+ if (args[0] != NULL) {
-+ event = g_strdup_printf("icb status %s", g_ascii_strdown(args[0], strlen(args[0])));
-+ if (!signal_emit(event, 2, server, args))
-+ signal_emit("default icb status", 2, server, args);
-+ g_free(event);
-+ }
-+ g_strfreev(args);
-+}
-+
- void icb_protocol_init(void)
- {
- signal_add("server connected", (SIGNAL_FUNC) sig_server_connected);
-@@ -300,6 +398,7 @@
- signal_add("icb event login", (SIGNAL_FUNC) event_login);
- signal_add("icb event ping", (SIGNAL_FUNC) event_ping);
- signal_add("icb event cmdout", (SIGNAL_FUNC) event_cmdout);
-+ signal_add("icb event status", (SIGNAL_FUNC) event_status);
- }
-
- void icb_protocol_deinit(void)
-@@ -309,4 +408,5 @@
- signal_remove("icb event login", (SIGNAL_FUNC) event_login);
- signal_remove("icb event ping", (SIGNAL_FUNC) event_ping);
- signal_remove("icb event cmdout", (SIGNAL_FUNC) event_cmdout);
-+ signal_remove("icb event status", (SIGNAL_FUNC) event_status);
- }
diff --git a/chat/irssi-icb/patches/patch-ag b/chat/irssi-icb/patches/patch-ag
deleted file mode 100644
index 290d44db287..00000000000
--- a/chat/irssi-icb/patches/patch-ag
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2010/08/10 20:26:36 sketch Exp $
-
---- src/core/icb-servers.c (revision 5174)
-+++ src/core/icb-servers.c (working copy)
-@@ -39,6 +39,9 @@
- server = g_new0(ICB_SERVER_REC, 1);
- server->chat_type = ICB_PROTOCOL;
-
-+ server->silentwho = FALSE;
-+ server->updatenicks = FALSE;
-+
- server->recvbuf_size = 256;
- server->recvbuf = g_malloc(server->recvbuf_size);
-
-@@ -113,7 +116,6 @@
- const char *msg, int target_type)
- {
- ICB_SERVER_REC *icbserver;
-- char *str;
-
- icbserver = ICB_SERVER(server);
- g_return_if_fail(server != NULL);
-@@ -125,9 +127,7 @@
- icb_send_open_msg(icbserver, msg);
- } else {
- /* private message */
-- str = g_strconcat(target, " ", msg, NULL);
-- icb_command(icbserver, "m", str, NULL);
-- g_free(str);
-+ icb_send_private_msg(icbserver, target, msg);
- }
- }
-
diff --git a/chat/irssi-icb/patches/patch-ah b/chat/irssi-icb/patches/patch-ah
deleted file mode 100644
index b7871032a1f..00000000000
--- a/chat/irssi-icb/patches/patch-ah
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2010/05/18 21:38:49 sketch Exp $
-
---- src/core/icb-protocol.h.orig 2010-05-18 21:34:32.000000000 +0100
-+++ src/core/icb-protocol.h 2010-05-18 21:34:15.000000000 +0100
-@@ -4,6 +4,8 @@
- #define ICB_PROTOCOL_LEVEL 1
-
- void icb_send_open_msg(ICB_SERVER_REC *server, const char *text);
-+void icb_send_private_msg(ICB_SERVER_REC *server, const char *target,
-+ const char *text);
- void icb_command(ICB_SERVER_REC *server, const char *cmd,
- const char *args, const char *id);
- void icb_protocol(ICB_SERVER_REC *server, const char *level,
diff --git a/chat/irssi-icb/patches/patch-ai b/chat/irssi-icb/patches/patch-ai
deleted file mode 100644
index d0e2a28692e..00000000000
--- a/chat/irssi-icb/patches/patch-ai
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2010/08/10 20:26:36 sketch Exp $
-
---- src/fe-common/module-formats.c (revision 5174)
-+++ src/fe-common/module-formats.c (working copy)
-@@ -30,7 +30,7 @@
- { "status", "[$0] $1", 2, { 0, 0 } },
- { "important", "[$0!] $1", 2, { 0, 0 } },
- { "status", "{error [Error]} $0", 1, { 0 } },
-- { "beep", "[beep] $1 beeps you", 1, { 0 } },
-+ { "beep", "[Beep] $1 beeps you", 1, { 0 } },
-
- { NULL, NULL, 0 }
- };
diff --git a/chat/irssi-icb/patches/patch-aj b/chat/irssi-icb/patches/patch-aj
deleted file mode 100644
index f246fdc2d1c..00000000000
--- a/chat/irssi-icb/patches/patch-aj
+++ /dev/null
@@ -1,41 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2010/08/10 20:26:36 sketch Exp $
-
---- src/core/Makefile.in.orig 2002-11-24 13:18:08.000000000 +0000
-+++ src/core/Makefile.in 2010-08-10 21:10:22.000000000 +0100
-@@ -83,15 +83,15 @@
- moduledir = $(libdir)/irssi/modules
-
- module_LTLIBRARIES = libicb_core.la
--libicb_core_la_LDFLAGS = -avoid-version
-+libicb_core_la_LDFLAGS = -module -avoid-version
-
- INCLUDES = $(GLIB_CFLAGS) -I$(IRSSI_INCLUDE) -I$(IRSSI_INCLUDE)/src -I$(IRSSI_INCLUDE)/src/core
-
-
--libicb_core_la_SOURCES = icb-channels.c icb-commands.c icb-core.c icb-queries.c icb-servers-reconnect.c icb-protocol.c icb-servers.c icb-session.c
-+libicb_core_la_SOURCES = icb-channels.c icb-commands.c icb-core.c icb-nicklist.c icb-queries.c icb-servers-reconnect.c icb-protocol.c icb-servers.c icb-session.c
-
-
--noinst_HEADERS = icb.h icb-channels.h icb-commands.h icb-protocol.h icb-queries.h icb-servers.h module.h
-+noinst_HEADERS = icb.h icb-channels.h icb-commands.h icb-nicklist.h icb-protocol.h icb-queries.h icb-servers.h module.h
-
- mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
- CONFIG_HEADER = ../../config-plugin.h
-@@ -106,7 +106,7 @@
- libicb_core_la_LIBADD =
- libicb_core_la_OBJECTS = icb-channels.lo icb-commands.lo icb-core.lo \
- icb-queries.lo icb-servers-reconnect.lo icb-protocol.lo icb-servers.lo \
--icb-session.lo
-+icb-session.lo icb-nicklist.lo
- CFLAGS = @CFLAGS@
- COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-@@ -257,6 +257,8 @@
- icb-commands.h icb-servers.h icb-channels.h icb-protocol.h
- icb-core.lo icb-core.o : icb-core.c module.h icb.h icb-commands.h \
- icb-servers.h icb-channels.h icb-queries.h icb-protocol.h
-+icb-nicklist.lo icb-nicklist.o : icb-nicklist.c module.h \
-+ icb-channels.h icb-nicklist.h
- icb-protocol.lo icb-protocol.o : icb-protocol.c module.h icb.h \
- icb-servers.h
- icb-queries.lo icb-queries.o : icb-queries.c module.h icb.h \
diff --git a/chat/irssi-icb/patches/patch-al b/chat/irssi-icb/patches/patch-al
deleted file mode 100644
index e355c4ec4a8..00000000000
--- a/chat/irssi-icb/patches/patch-al
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-al,v 1.1 2010/08/10 20:26:36 sketch Exp $
-
---- src/core/icb-servers.h (revision 5174)
-+++ src/core/icb-servers.h (working copy)
-@@ -31,6 +31,9 @@
- unsigned char *sendbuf;
- int sendbuf_size;
-
-+ int silentwho; /* silence /who output when updating nicks */
-+ int updatenicks; /* parse /who output for topic/nicks */
-+
- unsigned char *recvbuf;
- int recvbuf_size, recvbuf_pos;
- int recvbuf_next_packet;
diff --git a/chat/irssi-icb/patches/patch-am b/chat/irssi-icb/patches/patch-am
index 85550c175de..53893d23fc8 100644
--- a/chat/irssi-icb/patches/patch-am
+++ b/chat/irssi-icb/patches/patch-am
@@ -1,4 +1,6 @@
-$NetBSD: patch-am,v 1.1 2010/08/10 20:26:36 sketch Exp $
+$NetBSD: patch-am,v 1.2 2014/09/30 08:59:58 jperkin Exp $
+
+Support nicklists.
--- /dev/null 2009-11-03 03:54:19.098165668 +0100
+++ src/core/icb-nicklist.c 2010-05-21 13:03:14.227283420 +0200
diff --git a/chat/irssi-icb/patches/patch-an b/chat/irssi-icb/patches/patch-an
index 331c543ef13..ad8ad101d75 100644
--- a/chat/irssi-icb/patches/patch-an
+++ b/chat/irssi-icb/patches/patch-an
@@ -1,4 +1,6 @@
-$NetBSD: patch-an,v 1.1 2010/08/10 20:26:36 sketch Exp $
+$NetBSD: patch-an,v 1.2 2014/09/30 08:59:58 jperkin Exp $
+
+Support nicklists.
--- /dev/null 2009-11-03 03:54:19.098165668 +0100
+++ src/core/icb-nicklist.h 2010-05-21 13:03:14.236221682 +0200
diff --git a/chat/irssi-icb/patches/patch-src_core_Makefile.in b/chat/irssi-icb/patches/patch-src_core_Makefile.in
new file mode 100644
index 00000000000..10ab7541ef3
--- /dev/null
+++ b/chat/irssi-icb/patches/patch-src_core_Makefile.in
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_core_Makefile.in,v 1.1 2014/09/30 08:59:58 jperkin Exp $
+
+Add nicklist files.
+
+--- src/core/Makefile.in.orig 2011-06-13 23:18:30.000000000 +0000
++++ src/core/Makefile.in
+@@ -72,7 +72,7 @@ LTLIBRARIES = $(module_LTLIBRARIES)
+ libicb_core_la_LIBADD =
+ am_libicb_core_la_OBJECTS = icb-channels.lo icb-commands.lo \
+ icb-core.lo icb-queries.lo icb-servers-reconnect.lo \
+- icb-protocol.lo icb-servers.lo icb-session.lo
++ icb-nicklist.lo icb-protocol.lo icb-servers.lo icb-session.lo
+ libicb_core_la_OBJECTS = $(am_libicb_core_la_OBJECTS)
+ AM_V_lt = $(am__v_lt_$(V))
+ am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+@@ -246,6 +246,7 @@ libicb_core_la_SOURCES = \
+ icb-core.c \
+ icb-queries.c \
+ icb-servers-reconnect.c \
++ icb-nicklist.c \
+ icb-protocol.c \
+ icb-servers.c \
+ icb-session.c
+@@ -254,6 +255,7 @@ noinst_HEADERS = \
+ icb.h \
+ icb-channels.h \
+ icb-commands.h \
++ icb-nicklist.h \
+ icb-protocol.h \
+ icb-queries.h \
+ icb-servers.h \
+@@ -336,6 +338,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-channels.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-commands.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-core.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-nicklist.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-protocol.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-queries.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icb-servers-reconnect.Plo@am__quote@
diff --git a/chat/irssi-icb/patches/patch-src_fe-common_module-formats.c b/chat/irssi-icb/patches/patch-src_fe-common_module-formats.c
new file mode 100644
index 00000000000..fb71d9e61f5
--- /dev/null
+++ b/chat/irssi-icb/patches/patch-src_fe-common_module-formats.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_fe-common_module-formats.c,v 1.1 2014/09/30 08:59:58 jperkin Exp $
+
+Fix /beep output.
+
+--- src/fe-common/module-formats.c.orig 2011-06-13 18:10:41.000000000 +0000
++++ src/fe-common/module-formats.c
+@@ -30,7 +30,7 @@ FORMAT_REC fecommon_icb_formats[] = {
+ { "status", "[$0] $1", 2, { 0, 0 } },
+ { "important", "[$0!] $1", 2, { 0, 0 } },
+ { "status", "{error [Error]} $0", 1, { 0 } },
+- { "beep", "[Beep] $1 beeps you", 1, { 0 } },
++ { "beep", "[Beep] $0 beeps you", 1, { 0 } },
+
+ { NULL, NULL, 0 }
+ };