diff -ur irssi-0.8.10-old/src/irc/core/ctcp.c irssi-0.8.10/src/irc/core/ctcp.c
--- irssi-0.8.10-old/src/irc/core/ctcp.c	2005-10-19 04:13:30.000000000 +0200
+++ irssi-0.8.10/src/irc/core/ctcp.c	2006-04-03 21:45:47.000000000 +0200
@@ -168,6 +168,47 @@
 static void ctcp_version(IRC_SERVER_REC *server, const char *data,
 			 const char *nick)
 {
+	char *reply = (char *) settings_get_str("ctcp_version_reply");
+	char *reply2 = NULL;
+	int reply2_sz = 0;
+
+	if (!strchr((char *) reply, '%'))
+		goto fallback;
+
+	for (;;) {
+		char ch = *reply++;
+		int to_add_num = 1;
+		const char *to_add_ptr = &ch;
+		char *ptr;
+
+		if (ch == '%') {
+			to_add_num = strlen(nick);
+			to_add_ptr = nick;
+		}
+
+		ptr = (char *) realloc(reply2, reply2_sz + to_add_num);
+		if (!ptr) {
+			if (reply2)
+				free (reply2);
+			goto fallback;
+		}
+		reply2 = ptr;
+		memcpy (reply2 + reply2_sz, to_add_ptr, to_add_num);
+		reply2_sz += to_add_num;
+
+		if (!ch)
+			break;
+	}
+
+	if (!reply2)
+		goto fallback;
+
+	ctcp_send_parsed_reply (server, nick, "VERSION", reply2);
+	free (reply2);
+
+	return;
+
+fallback:
 	ctcp_send_parsed_reply(server, nick, "VERSION",
 			       settings_get_str("ctcp_version_reply"));
 }
