Jump to content

User:Int 80h/files/noctcp.diff

From Wikipedia, the free encyclopedia

This patch lets Irssi not respond to CTCP queries.

noctcp.diff

[edit]

This patch was tested against Irssi 0.8.13 through 0.8.15

--- src/irc/core/ctcp.c	2009-04-15 05:11:51.000000000 +0200
+++ ctcp.c	2009-04-18 08:17:18.000000000 +0200
@@ -119,6 +119,9 @@
 static void ctcp_ping(IRC_SERVER_REC *server, const char *data,
 		      const char *nick)
 {
+    /* no PING */
+    return;
+
 	char *str;
 
 	g_return_if_fail(data != NULL);
@@ -167,6 +170,9 @@
 static void ctcp_version(IRC_SERVER_REC *server, const char *data,
 			 const char *nick)
 {
+    /* no VERSION */
+    return;
+
 	ctcp_send_parsed_reply(server, nick, "VERSION",
 			       settings_get_str("ctcp_version_reply"));
 }
@@ -175,6 +181,9 @@
 static void ctcp_time(IRC_SERVER_REC *server, const char *data,
 		      const char *nick)
 {
+    /* no TIME */
+    return;
+
 	char *str, *reply;
 
 	g_return_if_fail(server != NULL);
@@ -191,6 +200,9 @@
 static void ctcp_userinfo(IRC_SERVER_REC *server, const char *data,
 			  const char *nick)
 {
+    /* no USERINFO */
+    return;
+
 	ctcp_send_parsed_reply(server, nick, "USERINFO",
 			       settings_get_str("ctcp_userinfo_reply"));
 }
@@ -199,6 +211,9 @@
 static void ctcp_clientinfo(IRC_SERVER_REC *server, const char *data,
 			    const char *nick)
 {
+    /* no CLIENTINFO */
+    return;
+
 	GString *str;
         GSList *tmp;

Applying the patch

[edit]

Apply this patch with:

% patch -p0 < noctcp.diff

In the directory, where you unpacked the Irssi source.