$ git clone http://tcclient.ion.nu/tc_client.git
commit b66aa1947570b2cbc89d669446a188408b5c03f7
Author: Alicia <...>
Date:   Fri Jul 31 21:24:53 2015 +0200

    Added support for captchas.

diff --git a/ChangeLog b/ChangeLog
index 001b959..1a64135 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 Adjusted for tinychat authentication changes (both for joining the channel and to use moderator accounts)
 Send account username in AMF0 "connect" command at startup regardless of whether we are modded or not, as is now required for non-mod accounts (contributed by Jade)
 If an RTMP chunk already has a buffer allocated when a packet sets the length, free it and start over.
+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)
 0.34:
 Fixed memory alignment in rtmp/amf code (for CPU architectures that are picky about it)
diff --git a/client.c b/client.c
index f0b5d2c..b72f8c4 100644
--- a/client.c
+++ b/client.c
@@ -200,6 +200,26 @@ char* getmodkey(const char* user, const char* pass, const char* channel, char* l
   return key;
 }
 
+void getcaptcha(void)
+{
+  char* url="http://tinychat.com/cauth/captcha";
+  char* page=http_get(url, 0);
+  char* token=strstr(page, "\"token\":\"");
+  if(token)
+  {
+    token=&token[9];
+    char* end=strchr(token, '"');
+    if(end)
+    {
+      end[0]=0;
+      printf("Captcha: http://tinychat.com/cauth/recaptcha?token=%s\n", token);
+      fflush(stdout);
+      fgetc(stdin);
+    }
+  }
+  free(page);
+}
+
 char timestampbuf[8];
 char* timestamp()
 {
@@ -363,6 +383,7 @@ int main(int argc, char** argv)
   char loggedin=0;
   char* modkey=getmodkey(account_user, account_pass, channel, &loggedin);
   if(!loggedin){free(account_pass); account_user=0; account_pass=0;}
+  getcaptcha();
   char* cookie=getcookie(channel);
   // Send connect request
   struct rtmp amf;
diff --git a/utilities/modbot/modbot.c b/utilities/modbot/modbot.c
index 3d61271..01da835 100644
--- a/utilities/modbot/modbot.c
+++ b/utilities/modbot/modbot.c
@@ -293,6 +293,13 @@ int main(int argc, char** argv)
     }
     if(!len){continue;}
     buf[len]=0;
+    if(!strncmp(buf, "Captcha: ", 9))
+    {
+      fprintf(stdout, "%s\nPress return to continue...", buf);
+      fflush(stdout);
+      fgetc(stdin);
+      write(tc_client, "\n", 1);
+    }
     char* esc;
     while((esc=strstr(buf, "\x1b["))) // Strip out ANSI colors
     {