$ git clone http://tcclient.ion.nu/tc_client.git
commit 87275963ca5e515b56c81e9b04501c40e18a01f9
Author: Alicia <...>
Date: Tue Jul 4 16:43:09 2017 +0000
Automatically use tinychat_beta for beta channels.
diff --git a/ChangeLog b/ChangeLog
index b2774a5..d5b1b93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@ Workaround for the new captcha mechanism.
Bugfix: use //IGNORE to skip characters instead of freezing if the locale can't represent them.
Use curl's curl_easy_unescape() for from_owner notices instead of doing it ourselves (contributed by Aida)
Added some basic support for tinychat beta (-s/--site tinychat_beta)
+Automatically use tinychat_beta for beta channels.
modbot: use https instead of http and use the tcclient subdomain since some DNSes have trouble with underscores.
modbot: added an option (--no-unapproved) to not add any unapproved videos to queue (videos still get approved by mods requesting or playing them manually)
tc_client-gtk: fixed a race-condition in the builtin video player.
diff --git a/tinychat.c b/tinychat.c
index a239a20..6015be5 100644
--- a/tinychat.c
+++ b/tinychat.c
@@ -683,8 +683,16 @@ static void opencam(conn c, const char* nick)
stream_start(nick, camid, c.fd);
}
+extern int init_tinychat_beta(const char* chanpass, const char* username, const char* userpass, struct site* site);
int init_tinychat(const char* chanpass, const char* username, const char* userpass, struct site* site)
{
+ char url[strlen("https://tinychat.com/0")+strlen(channel)];
+ sprintf(url, "https://tinychat.com/%s", channel);
+ char* res=http_get(url, 0);
+ if(!strstr(res, "swfobject.getFlashPlayerVersion()"))
+ { // Channel joined the beta, so use that
+ return init_tinychat_beta(chanpass, username, userpass, site);
+ }
char badchar;
if((badchar=checknick(nickname)))
{