Patch for irssi-0.8.10 from 2005-12-11 to allow proper usage of euIRC channel
modes for owner (+q/*), admin (+a/!), ban and limit linking (+B, +L).

Created by Stefan Hessenauer (shessenauer@gmail.com)

Based on the patch for irssi CVS from 2003-11-26 of Georg Lukas <georg@boerde.de>
Original patch for irssi 0.8.4 by Sebastian Schmidt (yath)


diff -ur irssi-0.8.10-orig/NEWS irssi-0.8.10-euirc/NEWS
--- irssi-0.8.10-orig/NEWS	2005-12-11 10:41:21.000000000 +0100
+++ irssi-0.8.10-euirc/NEWS	2005-12-26 11:52:14.000000000 +0100
@@ -1,3 +1,7 @@
+v0.8.10-euirc 2005-12-26 Stefan Hessenauer <shessenauer@gmail.com>
+	* add euirc user-modes owner and admin
+	* add euirc channel-modes ban- and limit-linking
+
 v0.8.10 2005-12-11  The Irssi team <staff@irssi.org>
 
 	* Long delayed release, with lots of changes. Most important ones:
diff -ur irssi-0.8.10-orig/configure irssi-0.8.10-euirc/configure
--- irssi-0.8.10-orig/configure	2005-12-11 10:45:39.000000000 +0100
+++ irssi-0.8.10-euirc/configure	2005-12-26 11:37:31.000000000 +0100
@@ -1855,7 +1855,7 @@
 
 # Define the identity of the package.
  PACKAGE=irssi
- VERSION=0.8.10
+ VERSION=0.8.10-euirc
 
 
 cat >>confdefs.h <<_ACEOF
diff -ur irssi-0.8.10-orig/default.theme irssi-0.8.10-euirc/default.theme
--- irssi-0.8.10-orig/default.theme	2005-12-08 18:32:50.000000000 +0100
+++ irssi-0.8.10-euirc/default.theme	2005-12-26 10:38:18.000000000 +0100
@@ -222,6 +222,8 @@
   # /names list
   names_prefix = "";
   names_nick = "[%_$0%_$1-] ";
+  names_nick_owner = "{names_nick $*}";
+  names_nick_admin = "{names_nick $*}";
   names_nick_op = "{names_nick $*}";
   names_nick_halfop = "{names_nick $*}";
   names_nick_voice = "{names_nick $*}";
diff -ur irssi-0.8.10-orig/src/core/channels.c irssi-0.8.10-euirc/src/core/channels.c
--- irssi-0.8.10-orig/src/core/channels.c	2005-12-08 18:32:46.000000000 +0100
+++ irssi-0.8.10-euirc/src/core/channels.c	2005-12-26 10:40:44.000000000 +0100
@@ -223,10 +223,13 @@
 	const char *flags = server->get_nick_flags(server);
 
 	return strchr(flags, flag) == NULL ||
-		(flag == flags[0] && nick->op) ||
+		(flag == flags[0] && (nick->op || nick->admin || nick->owner)) |
 		(flag == flags[1] && (nick->voice || nick->halfop ||
-				      nick->op)) ||
-		(flag == flags[2] && (nick->halfop || nick->op));
+					nick->op || nick->admin || nick->owner)) ||
+		(flag == flags[2] && (nick->halfop || nick->op || nick->admin || nick->owner)) ||
+		(flag == flags[3] && (nick->admin || nick->owner)) ||
+		(flag == flags[4] && nick->owner);
+	
 }
 
 /* Send the auto send command to channel */
diff -ur irssi-0.8.10-orig/src/core/nick-rec.h irssi-0.8.10-euirc/src/core/nick-rec.h
--- irssi-0.8.10-orig/src/core/nick-rec.h	2005-12-08 18:32:46.000000000 +0100
+++ irssi-0.8.10-euirc/src/core/nick-rec.h	2005-12-26 10:41:10.000000000 +0100
@@ -16,6 +16,8 @@
 
 /* status in channel */
 unsigned int send_massjoin:1; /* Waiting to be sent in massjoin signal */
+unsigned int owner:1;
+unsigned int admin:1;
 unsigned int op:1;
 unsigned int halfop:1;
 unsigned int voice:1;
diff -ur irssi-0.8.10-orig/src/core/nicklist.c irssi-0.8.10-euirc/src/core/nicklist.c
--- irssi-0.8.10-orig/src/core/nicklist.c	2005-12-08 18:32:46.000000000 +0100
+++ irssi-0.8.10-euirc/src/core/nicklist.c	2005-12-26 10:43:13.000000000 +0100
@@ -369,8 +369,14 @@
 	 * returns :-)
 	 * -- yath */
 
+	/* Owner and admin added */
+	
 	/* Treat others as highest - should really use order in 005 numeric */
 	if (p1->other)
+		status1 = 7;
+	else if (p1->owner)
+		status1 = 6;
+	else if (p1->admin)
 		status1 = 5;
 	else if (p1->op)
 		status1 = 4;
@@ -382,6 +388,10 @@
 		status1 = 1;
 
 	if (p2->other)
+		status2 = 7;
+	else if (p2->owner)
+		status2 = 6;
+	else if (p2->admin)
 		status2 = 5;
 	else if (p2->op)
 		status2 = 4;
diff -ur irssi-0.8.10-orig/src/fe-common/core/fe-channels.c irssi-0.8.10-euirc/src/fe-common/core/fe-channels.c
--- irssi-0.8.10-orig/src/fe-common/core/fe-channels.c	2005-12-08 18:32:44.000000000 +0100
+++ irssi-0.8.10-euirc/src/fe-common/core/fe-channels.c	2005-12-26 10:49:07.000000000 +0100
@@ -415,6 +415,10 @@
 
 		if (rec->other)
 			nickmode[0] = rec->other;
+		else if (rec->owner)
+			nickmode[0] = '*';
+		else if (rec->admin)
+			nickmode[0] = '!';
 		else if (rec->op)
 			nickmode[0] = '@';
 		else if (rec->halfop)
@@ -432,7 +436,9 @@
 		linebuf[columns[col]-item_extra] = '\0';
 		memcpy(linebuf, rec->nick, strlen(rec->nick));
 
-		formatnum = rec->op ? TXT_NAMES_NICK_OP :
+		formatnum = rec->owner ? TXT_NAMES_NICK_FOUNDER :
+			rec->admin ? TXT_NAMES_NICK_ADMIN :
+			rec->op ? TXT_NAMES_NICK_OP :
 			rec->halfop ? TXT_NAMES_NICK_HALFOP :
 			rec->voice ? TXT_NAMES_NICK_VOICE :
                         TXT_NAMES_NICK;
@@ -472,9 +478,9 @@
 {
 	NICK_REC *nick;
 	GSList *tmp, *nicklist, *sorted;
-	int nicks, normal, voices, halfops, ops;
+	int nicks, normal, voices, halfops, ops, admins, owners;
 
-	nicks = normal = voices = halfops = ops = 0;
+	nicks = normal = voices = halfops = ops = admins = owners = 0;
 	nicklist = nicklist_getnicks(channel);
 	sorted = NULL;
 
@@ -483,7 +489,15 @@
 		nick = tmp->data;
 
 		nicks++;
-		if (nick->op) {
+		if (nick->owner) {
+			owners++;
+			if ((flags & CHANNEL_NICKLIST_FLAG_FOUNDERS) == 0)
+				continue;
+		} else if (nick->admin) {
+			admins++;
+			if ((flags & CHANNEL_NICKLIST_FLAG_ADMINS) == 0)
+				continue;
+		} else if (nick->op) {
 			ops++;
 			if ((flags & CHANNEL_NICKLIST_FLAG_OPS) == 0)
                                 continue;
@@ -511,14 +525,14 @@
 		printformat(channel->server, channel->visible_name,
 			    MSGLEVEL_CLIENTCRAP, TXT_NAMES,
 			    channel->visible_name,
-			    nicks, ops, halfops, voices, normal);
+			    nicks, owners, admins, ops, halfops, voices, normal);
 		display_sorted_nicks(channel, sorted);
 	}
 	g_slist_free(sorted);
 
 	printformat(channel->server, channel->visible_name,
 		    MSGLEVEL_CLIENTNOTICE, TXT_ENDOFNAMES,
-		    channel->visible_name, nicks, ops, halfops, voices, normal);
+		    channel->visible_name, nicks, owners, admins, ops, halfops, voices, normal);
 }
 
 /* SYNTAX: NAMES [-count | -ops -halfops -voices -normal] [<channels> | **] */
@@ -547,6 +561,10 @@
 	}
 
 	flags = 0;
+	if (g_hash_table_lookup(optlist, "owners") != NULL)
+		flags != CHANNEL_NICKLIST_FLAG_FOUNDERS;
+	if (g_hash_table_lookup(optlist, "admins") != NULL)
+		flags != CHANNEL_NICKLIST_FLAG_ADMINS;
 	if (g_hash_table_lookup(optlist, "ops") != NULL)
 		flags |= CHANNEL_NICKLIST_FLAG_OPS;
 	if (g_hash_table_lookup(optlist, "halfops") != NULL)
@@ -645,7 +663,7 @@
 	command_bind("cycle", NULL, (SIGNAL_FUNC) cmd_cycle);
 
 	command_set_options("channel add", "auto noauto -bots -botcmd");
-	command_set_options("names", "count ops halfops voices normal");
+	command_set_options("names", "count owners admins ops halfops voices normal");
 	command_set_options("join", "window");
 }
 
diff -ur irssi-0.8.10-orig/src/fe-common/core/fe-channels.h irssi-0.8.10-euirc/src/fe-common/core/fe-channels.h
--- irssi-0.8.10-orig/src/fe-common/core/fe-channels.h	2005-12-08 18:32:44.000000000 +0100
+++ irssi-0.8.10-euirc/src/fe-common/core/fe-channels.h	2005-12-26 10:49:38.000000000 +0100
@@ -5,8 +5,11 @@
 #define CHANNEL_NICKLIST_FLAG_HALFOPS   0x02
 #define CHANNEL_NICKLIST_FLAG_VOICES    0x04
 #define CHANNEL_NICKLIST_FLAG_NORMAL    0x08
-#define CHANNEL_NICKLIST_FLAG_ALL       0x0f
-#define CHANNEL_NICKLIST_FLAG_COUNT     0x10
+#define CHANNEL_NICKLIST_FLAG_FOUNDERS 0x10
+#define CHANNEL_NICKLIST_FLAG_ADMINS   0x20
+#define CHANNEL_NICKLIST_FLAG_ALL      0x3f
+#define CHANNEL_NICKLIST_FLAG_COUNT    0x40
+
 
 void fe_channels_nicklist(CHANNEL_REC *channel, int flags);
 
diff -ur irssi-0.8.10-orig/src/fe-common/core/fe-messages.c irssi-0.8.10-euirc/src/fe-common/core/fe-messages.c
--- irssi-0.8.10-orig/src/fe-common/core/fe-messages.c	2005-12-08 18:32:43.000000000 +0100
+++ irssi-0.8.10-euirc/src/fe-common/core/fe-messages.c	2005-12-26 10:50:59.000000000 +0100
@@ -148,6 +148,8 @@
 	}
 
 	return nickrec == NULL ? emptystr :
+		nickrec->owner ? "*" :
+		nickrec->admin ? "!" :
 		nickrec->op ? "@" :
 		nickrec->halfop ? "%" :
 		nickrec->voice ? "+" :
diff -ur irssi-0.8.10-orig/src/fe-common/core/module-formats.c irssi-0.8.10-euirc/src/fe-common/core/module-formats.c
--- irssi-0.8.10-orig/src/fe-common/core/module-formats.c	2005-12-08 18:32:43.000000000 +0100
+++ irssi-0.8.10-euirc/src/fe-common/core/module-formats.c	2005-12-26 10:52:13.000000000 +0100
@@ -110,11 +110,14 @@
 	{ "current_channel", "Current channel {channel $0}", 1, { 0 } },
 	{ "names", "{names_users Users {names_channel $0}}", 6, { 0, 1, 1, 1, 1, 1 } },
 	{ "names_prefix", "%#{names_prefix $0}", 1, { 0 } },
+	{ "names_nick_owner", "{names_nick_owner $0 $1}", 2, { 0, 0 } },
+	{ "names_nick_admin", "{names_nick_admin $0 $1}", 2, { 0, 0 } },
         { "names_nick_op", "{names_nick_op $0 $1}", 2, { 0, 0 } },
         { "names_nick_halfop", "{names_nick_halfop $0 $1}", 2, { 0, 0 } },
         { "names_nick_voice", "{names_nick_voice $0 $1}", 2, { 0, 0 } },
         { "names_nick", "{names_nick $0 $1}", 2, { 0, 0 } },
-        { "endofnames", "{channel $0}: Total of {hilight $1} nicks {comment {hilight $2} ops, {hilight $3} halfops, {hilight $4} voices, {hilight $5} normal}", 6, { 0, 1, 1, 1, 1, 1 } },
+	{ "endofnames", "{channel $0}: Total of {hilight $1} nicks {comment {hilight $2} owners, {hilight $3} admins, {hilight $4} ops, {hilight $5} halfops, {hilight $6} voices, {hilight $7} normal}", 8, { 0, 1, 1, 1, 1, 1, 1, 1 } },
+	
 	{ "chanlist_header", "%#You are on the following channels:", 0 },
 	{ "chanlist_line", "%#{channel $[-10]0} %|+$1 ($2): $3", 4, { 0, 0, 0, 0 } },
 	{ "chansetup_not_found", "Channel {channel $0} not found", 2, { 0, 0 } },
diff -ur irssi-0.8.10-orig/src/fe-common/core/module-formats.h irssi-0.8.10-euirc/src/fe-common/core/module-formats.h
--- irssi-0.8.10-orig/src/fe-common/core/module-formats.h	2005-12-08 18:32:43.000000000 +0100
+++ irssi-0.8.10-euirc/src/fe-common/core/module-formats.h	2005-12-26 11:01:10.000000000 +0100
@@ -86,6 +86,8 @@
 	TXT_CURRENT_CHANNEL,
 	TXT_NAMES,
 	TXT_NAMES_PREFIX,
+	TXT_NAMES_NICK_FOUNDER,
+	TXT_NAMES_NICK_ADMIN,
 	TXT_NAMES_NICK_OP,
 	TXT_NAMES_NICK_HALFOP,
 	TXT_NAMES_NICK_VOICE,
diff -ur irssi-0.8.10-orig/src/irc/core/irc-expandos.c irssi-0.8.10-euirc/src/irc/core/irc-expandos.c
--- irssi-0.8.10-orig/src/irc/core/irc-expandos.c	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/irc-expandos.c	2005-12-26 11:05:53.000000000 +0100
@@ -82,7 +82,8 @@
 	return IS_IRC_SERVER(server) ? IRC_SERVER(server)->usermode : "";
 }
 
-/* expands to your usermode on channel, op '@', halfop '%', "+" voice or other */
+/* expands to your usermode on channel, owner '*', admin '!', op '@', halfop '%', "+" voice or other */
+/* shown in the status bar */
 static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret)
 {
 	if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
@@ -95,15 +96,17 @@
 			return cumode;
 		}
 
-		return NICK(CHANNEL(item)->ownnick)->op ? "@" :
-		       NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
-		       NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
+		return NICK(CHANNEL(item)->ownnick)->owner ? "*" :
+			NICK(CHANNEL(item)->ownnick)->admin ? "!" :
+			NICK(CHANNEL(item)->ownnick)->op ? "@" :
+			NICK(CHANNEL(item)->ownnick)->halfop ? "%" :
+			NICK(CHANNEL(item)->ownnick)->voice ? "+" : "";
 	}
 	return "";
 }
 
 /* expands to your usermode on channel,
-   op '@', halfop '%', "+" voice, " " normal */
+   owner '*', admin '!', op '@', halfop '%', voice '+', normal " " */
 static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret)
 {
 	char *ret;
diff -ur irssi-0.8.10-orig/src/irc/core/irc-nicklist.c irssi-0.8.10-euirc/src/irc/core/irc-nicklist.c
--- irssi-0.8.10-orig/src/irc/core/irc-nicklist.c	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/irc-nicklist.c	2005-12-26 11:11:21.000000000 +0100
@@ -31,7 +31,7 @@
 
 /* Add new nick to list */
 NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
-			      int op, int halfop, int voice, int send_massjoin)
+		int owner, int admin, int op, int halfop, int voice, int send_massjoin)
 {
 	NICK_REC *rec;
 
@@ -41,6 +41,8 @@
 	rec = g_new0(NICK_REC, 1);
 	rec->nick = g_strdup(nick);
 
+	if (owner) rec->owner = TRUE;
+	if (admin) rec->admin = TRUE;
 	if (op) rec->op = TRUE;
 	if (halfop) rec->halfop = TRUE;
 	if (voice) rec->voice = TRUE;
@@ -99,7 +101,7 @@
 	IRC_CHANNEL_REC *chanrec;
 	NICK_REC *rec;
 	char *params, *type, *channel, *names, *ptr;
-        int op, halfop, voice, other;
+	int owner, admin, op, halfop, voice, other;
 
 	g_return_if_fail(data != NULL);
 
@@ -138,9 +140,15 @@
 		   showing "@+nick" and since none of these chars are valid
 		   nick chars, just check them until a non-nickflag char is
 		   found. FIXME: we just ignore owner char now. */
-		op = halfop = voice = other = FALSE;
+		owner = admin = op = halfop = voice = other = FALSE;
 		while (isnickflag(server, *ptr)) {
 			switch (*ptr) {
+			case '*':
+				owner = TRUE;
+			 	break;
+			case '!':
+				admin = TRUE;
+				break;
 			case '@':
                                 op = TRUE;
                                 break;
@@ -157,8 +165,9 @@
 		}
 
 		if (nicklist_find((CHANNEL_REC *) chanrec, ptr) == NULL) {
-			rec = irc_nicklist_insert(chanrec, ptr, op, halfop,
-						  voice, FALSE);
+			rec = irc_nicklist_insert(chanrec, ptr, owner, admin,
+					op, halfop, voice, FALSE);
+			
 			if (other)
 				rec->other = other;
 		}
@@ -186,8 +195,8 @@
 			   if channel is empty */
 			nicks = g_hash_table_size(chanrec->nicks);
 			ownnick = irc_nicklist_insert(chanrec, server->nick,
-						      nicks == 0, FALSE,
-						      FALSE, FALSE);
+							nicks == 0, FALSE, FALSE,
+							FALSE, FALSE, FALSE);
 		}
 		nicklist_set_own(CHANNEL(chanrec), ownnick);
                 chanrec->chanop = chanrec->ownnick->op;
diff -ur irssi-0.8.10-orig/src/irc/core/irc-nicklist.h irssi-0.8.10-euirc/src/irc/core/irc-nicklist.h
--- irssi-0.8.10-orig/src/irc/core/irc-nicklist.h	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/irc-nicklist.h	2005-12-26 11:11:45.000000000 +0100
@@ -5,7 +5,7 @@
 
 /* Add new nick to list */
 NICK_REC *irc_nicklist_insert(IRC_CHANNEL_REC *channel, const char *nick,
-			      int op, int halfop, int voice, int send_massjoin);
+		int owner, int admin, int op, int halfop, int voice, int send_massjoin);
 
 /* Remove all "extra" characters from `nick'. Like _nick_ -> nick */
 char *irc_nick_strip(const char *nick);
diff -ur irssi-0.8.10-orig/src/irc/core/irc-session.c irssi-0.8.10-euirc/src/irc/core/irc-session.c
--- irssi-0.8.10-orig/src/irc/core/irc-session.c	2005-12-08 18:32:47.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/irc-session.c	2005-12-26 11:13:03.000000000 +0100
@@ -115,7 +115,7 @@
 {
 	const char *nick;
 	char *other;
-        int op, halfop, voice;
+	int owner, admin, op, halfop, voice;
         NICK_REC *nickrec;
 
 	if (!IS_IRC_CHANNEL(channel))
@@ -125,10 +125,12 @@
 	if (nick == NULL)
                 return;
 
+	owner = config_node_get_bool(node, "owner", FALSE);
+	admin = config_node_get_bool(node, "admin", FALSE);
 	op = config_node_get_bool(node, "op", FALSE);
         voice = config_node_get_bool(node, "voice", FALSE);
         halfop = config_node_get_bool(node, "halfop", FALSE);
-	nickrec = irc_nicklist_insert(channel, nick, op, halfop, voice, FALSE);
+	nickrec = irc_nicklist_insert(channel, nick, owner, admin, op, halfop, voice, FALSE);
 	other = config_node_get_str(node, "other", NULL);
 	nickrec->other = other == NULL ? '\0' : other[0];
 }
diff -ur irssi-0.8.10-orig/src/irc/core/massjoin.c irssi-0.8.10-euirc/src/irc/core/massjoin.c
--- irssi-0.8.10-orig/src/irc/core/massjoin.c	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/massjoin.c	2005-12-26 11:13:34.000000000 +0100
@@ -65,7 +65,7 @@
 	}
 
 	/* add user to nicklist */
-	nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, TRUE);
+	nickrec = irc_nicklist_insert(chanrec, nick, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE);
         nicklist_set_host(CHANNEL(chanrec), nickrec, address);
 
 	if (chanrec->massjoins == 0) {
diff -ur irssi-0.8.10-orig/src/irc/core/modes.c irssi-0.8.10-euirc/src/irc/core/modes.c
--- irssi-0.8.10-orig/src/irc/core/modes.c	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/modes.c	2005-12-26 11:16:30.000000000 +0100
@@ -43,7 +43,9 @@
 	nickrec = nicklist_find(CHANNEL(channel), nick);
 	if (nickrec == NULL) return; /* No /names list got yet */
 
-	if (mode == '@') nickrec->op = type == '+';
+	if (mode == '*' ) nickrec->owner = type == '+';
+	else if (mode == '!' ) nickrec->admin = type == '+';
+	else if (mode == '@') nickrec->op = type == '+';
 	else if (mode == '+') nickrec->voice = type == '+';
 	else if (mode == '%') nickrec->halfop = type == '+';
 	else if (channel->server->prefix[(unsigned char) mode] != '\0')
@@ -826,6 +828,17 @@
 	server->modes['e'].func = modes_type_a;
 	server->modes['I'].func = modes_type_a;
 
+	/* added */
+	server->modes['w'].func = modes_type_a;
+	server->modes['L'].func = modes_type_a;
+	server->modes['B'].func = modes_type_a;
+
+	server->modes['a'].func = modes_type_prefix;
+	server->modes['a'].prefix = '!';
+	server->modes['q'].func = modes_type_prefix;
+	server->modes['q'].prefix = '*';
+
+
 	server->modes['h'].func = modes_type_prefix;
 	server->modes['h'].prefix = '%';
 	server->modes['o'].func = modes_type_prefix;
@@ -835,6 +848,8 @@
 	server->modes['v'].func = modes_type_prefix;
 	server->modes['v'].prefix = '+';
 
+	server->prefix['!'] = 'a';
+	server->prefix['*'] = 'q';
 	server->prefix['%'] = 'h';
 	server->prefix['@'] = 'o';
 	server->prefix['+'] = 'v';
diff -ur irssi-0.8.10-orig/src/irc/core/netsplit.c irssi-0.8.10-euirc/src/irc/core/netsplit.c
--- irssi-0.8.10-orig/src/irc/core/netsplit.c	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/netsplit.c	2005-12-26 11:16:53.000000000 +0100
@@ -132,6 +132,8 @@
 
 		splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
 		splitchan->name = g_strdup(channel->visible_name);
+		splitchan->owner = nickrec->owner;
+		splitchan->admin = nickrec->admin;
 		splitchan->op = nickrec->op;
 		splitchan->halfop = nickrec->halfop;
 		splitchan->voice = nickrec->voice;
diff -ur irssi-0.8.10-orig/src/irc/core/netsplit.h irssi-0.8.10-euirc/src/irc/core/netsplit.h
--- irssi-0.8.10-orig/src/irc/core/netsplit.h	2005-12-08 18:32:48.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/core/netsplit.h	2005-12-26 11:17:13.000000000 +0100
@@ -25,6 +25,8 @@
 
 typedef struct {
 	char *name;
+	unsigned int owner:1;
+	unsigned int admin:1;
 	unsigned int op:1;
 	unsigned int halfop:1;
 	unsigned int voice:1;
diff -ur irssi-0.8.10-orig/src/irc/proxy/dump.c irssi-0.8.10-euirc/src/irc/proxy/dump.c
--- irssi-0.8.10-orig/src/irc/proxy/dump.c	2005-12-08 18:32:46.000000000 +0100
+++ irssi-0.8.10-euirc/src/irc/proxy/dump.c	2005-12-26 11:18:15.000000000 +0100
@@ -182,6 +182,10 @@
 
 		if (nick->other)
                         g_string_append_c(str, nick->other);
+		else if (nick->owner)
+			g_string_append_c(str, '*');
+		else if (nick->admin)
+			g_string_append_c(str, '!');
 		else if (nick->op)
                         g_string_append_c(str, '@');
 		else if (nick->halfop)
diff -ur irssi-0.8.10-orig/src/perl/irc/Channel.xs irssi-0.8.10-euirc/src/perl/irc/Channel.xs
--- irssi-0.8.10-orig/src/perl/irc/Channel.xs	2005-12-08 18:32:45.000000000 +0100
+++ irssi-0.8.10-euirc/src/perl/irc/Channel.xs	2005-12-26 11:27:08.000000000 +0100
@@ -50,14 +50,16 @@
 	}
 
 Irssi::Irc::Nick
-irc_nick_insert(channel, nick, op, halfop, voice, send_massjoin)
+irc_nick_insert(channel, nick, owner, admin, op, halfop, voice, send_massjoin)
 	Irssi::Irc::Channel channel
 	char *nick
+	int owner
+	int admin
 	int op
 	int halfop
 	int voice
 	int send_massjoin
 CODE:
-	RETVAL = irc_nicklist_insert(channel, nick, op, halfop, voice, send_massjoin);
+	RETVAL = irc_nicklist_insert(channel, nick, owner, admin, op, halfop, voice, send_massjoin);
 OUTPUT:
 	RETVAL
diff -ur irssi-0.8.10-orig/src/perl/irc/Irc.xs irssi-0.8.10-euirc/src/perl/irc/Irc.xs
--- irssi-0.8.10-orig/src/perl/irc/Irc.xs	2005-12-08 18:32:45.000000000 +0100
+++ irssi-0.8.10-euirc/src/perl/irc/Irc.xs	2005-12-26 11:19:39.000000000 +0100
@@ -122,6 +122,8 @@
 static void perl_netsplit_channel_fill_hash(HV *hv, NETSPLIT_CHAN_REC *rec)
 {
 	hv_store(hv, "name", 4, new_pv(rec->name), 0);
+	hv_store(hv, "owner", 2, newSViv(rec->owner), 0);
+	hv_store(hv, "admin", 2, newSViv(rec->admin), 0);
 	hv_store(hv, "op", 2, newSViv(rec->op), 0);
 	hv_store(hv, "halfop", 6, newSViv(rec->halfop), 0);
 	hv_store(hv, "voice", 5, newSViv(rec->voice), 0);
diff -ur irssi-0.8.10-orig/src/perl/perl-common.c irssi-0.8.10-euirc/src/perl/perl-common.c
--- irssi-0.8.10-orig/src/perl/perl-common.c	2005-12-08 18:32:45.000000000 +0100
+++ irssi-0.8.10-euirc/src/perl/perl-common.c	2005-12-26 11:21:42.000000000 +0100
@@ -433,6 +433,8 @@
 	hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
 	hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
 
+	hv_store(hv, "owner", 7, newSViv(nick->owner), 0);
+	hv_store(hv, "admin", 5, newSViv(nick->admin), 0);
 	hv_store(hv, "op", 2, newSViv(nick->op), 0);
 	hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
 	hv_store(hv, "voice", 5, newSViv(nick->voice), 0);
