$ git clone https://tcclient.ion.nu/tc_client.git
commit 9584a62e162f9366fee62ba06274973d4b0a6603
Author: Alicia <...>
Date:   Sat Oct 31 22:43:54 2015 +0100

    irchack: changed WHOIS to use the new /whois command instead of /userinfo (which tinychat retired)

diff --git a/ChangeLog b/ChangeLog
index 62711d1..82d4ecc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ modbot: take time offset into account for the duration of videos.
 modbot: added support for /mbpa (pause) and /mbpl (play/resume)
 modbot: check that videos can be embedded (for the flash client) before adding them to the queue.
 modbot: when skipping an unapproved video after 2 minutes, find the next approved video when it's time to play it (in case the queue has changed)
+irchack: changed WHOIS to use the new /whois command instead of /userinfo (which tinychat retired)
 0.35:
 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)
diff --git a/client.c b/client.c
index 253ce8d..c7f8250 100644
--- a/client.c
+++ b/client.c
@@ -1009,6 +1009,7 @@ int main(int argc, char** argv)
             }else{
               printf("%s is not logged in\n", idlist[i].name);
             }
+            fflush(stdout);
             break;
           }
         }
diff --git a/utilities/irchack/irchack.c b/utilities/irchack/irchack.c
index 364757d..54009e8 100644
--- a/utilities/irchack/irchack.c
+++ b/utilities/irchack/irchack.c
@@ -300,6 +300,20 @@ printf("Got from tc_client: '%s'\n", buf);
         dprintf(sock, ":irchack MODE #%s -o %s\n", channel, buf);
         continue;
       }
+      if(space && !strncmp(space, " is logged in as ", 17)) // /whois response
+      {
+        space[0]=0;
+        dprintf(sock, ":server 311 %s %s user host * :%s\n", nick, buf, &space[17]);
+        dprintf(sock, ":server 318 %s %s :End of /WHOIS list\n", nick, buf);
+        continue;
+      }
+      if(space && !strcmp(space, " is not logged in")) // /whois response
+      {
+        space[0]=0;
+        dprintf(sock, ":server 311 %s %s user host * :Not logged in\n", nick, buf);
+        dprintf(sock, ":server 318 %s %s :End of /WHOIS list\n", nick, buf);
+        continue;
+      }
       if(!strcmp(buf, "Banned users:"))
       {
         while(strncmp(buf, "Use /forgive ", 13))
@@ -347,12 +361,6 @@ printf("Got from tc_client: '%s'\n", buf);
           if(!msg){continue;}
           msg=&msg[1];
           dprintf(sock, ":%s!user@host PRIVMSG %s :%s%s\n", name, nick, color, msg);
-        }
-        else if(!strncmp(msg, "/userinfo ", 10)) // /userinfo response (translated as whois)
-        {
-          if(!strcmp(&msg[10], "$request")){continue;} // Special, ignore
-          dprintf(sock, ":server 311 %s %s user host * :%s\n", nick, name, &msg[10]);
-          dprintf(sock, ":server 318 %s %s :End of /WHOIS list\n", nick, name);
         }else{ // Regular channel message
           dprintf(sock, ":%s!user@host PRIVMSG #%s :%s%s\n", name, channel, color, msg);
         }
@@ -427,7 +435,7 @@ printf("Got from IRC client: '%s'\n", buf);
       {
         char* space=strchr(&buf[6], ' ');
         if(space){space[0]=0;}
-        dprintf(tc_in[1], "/priv %s /userinfo $request\n", buf[6]==':'?&buf[7]:&buf[6]);
+        dprintf(tc_in[1], "/whois %s\n", buf[6]==':'?&buf[7]:&buf[6]);
       }
       else if(!strncasecmp(buf, "TOPIC ", 6))
       {