$ git clone http://tcclient.ion.nu/tc_client.git
commit 26e42b4215ea1722dad0d6f657a9fb12d9675db2
Author: Alicia <...>
Date:   Sat Aug 1 00:52:51 2015 +0200

    cursedchat: added support for captchas.

diff --git a/ChangeLog b/ChangeLog
index 02d51dc..e9bcfc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Added support for captchas.
 irchack: added a check for whether tc_client is installed or should be run from the source directory (should have been added along with the 'install' target)
 tc_client-gtk and camviewer: added support for captchas.
 irchack: added support for captchas.
+cursedchat: added support for captchas.
 0.34:
 Fixed memory alignment in rtmp/amf code (for CPU architectures that are picky about it)
 Print version info when called with -v/--version (contributed by Jade)
diff --git a/utilities/cursedchat/cursedchat.c b/utilities/cursedchat/cursedchat.c
index dd3ad67..418070c 100644
--- a/utilities/cursedchat/cursedchat.c
+++ b/utilities/cursedchat/cursedchat.c
@@ -192,6 +192,7 @@ void gotline(char* line)
   }
   write(to_app, line, strlen(line));
   write(to_app, "\n", 1);
+  if(!nickname){return;}
   time_t timestamp=time(0);
   struct tm* t=localtime(&timestamp);
   // Timestamp
@@ -380,7 +381,6 @@ int main(int argc, char** argv)
   close(app_in[0]);
   close(app_out[1]);
   to_app=app_in[1];
-  write(to_app, "/color\n", 7); // Check the initial random color
   struct pollfd p[2]={{.fd=0, .events=POLLIN, .revents=0},
                       {.fd=app_out[0], .events=POLLIN, .revents=0}};
   while(1)
@@ -409,10 +409,20 @@ int main(int argc, char** argv)
       }
       else if(!strncmp(buf, "Connection ID: ", 15)) // Our initial nickname is "guest-" plus our connection ID
       {
+        write(to_app, "/color\n", 7); // Check the initial random color
         unsigned int length=strlen(&buf[15]);
         nickname=malloc(length+strlen("guest-")+1);
         sprintf(nickname, "guest-%s", &(buf[15]));
       }
+      else if(!strncmp(buf, "Captcha: ", 9))
+      {
+        waddstr(buffers[0].pad, "\n");
+        waddstr(buffers[0].pad, buf);
+        waddstr(buffers[0].pad, " (press return to continue)");
+        drawchat();
+        wrefresh(input);
+        continue;
+      }
       else if(!strncmp(buf, "Currently online: ", 18))
       {
         // Populate the userlist