$ git clone http://tcclient.ion.nu/tc_client.git
commit 1c6f29cdd4a6f7178b222c218f555ce21c97e92c
Author: Alicia <...>
Date: Fri Jan 20 14:39:11 2017 +0100
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)
diff --git a/ChangeLog b/ChangeLog
index 980f642..7398fae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Cleaned up no-longer-needed headers in client.c
Don't bother trying to verify certificates on windows (lacking a ca bundle)
Fixed tinychat account support.
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)
0.41.1:
Use tinychat.com instead of apl.tinychat.com (works around SSL/TLS issues on windows)
0.41:
diff --git a/utilities/modbot/modbot.c b/utilities/modbot/modbot.c
index 93048b3..2751ca5 100644
--- a/utilities/modbot/modbot.c
+++ b/utilities/modbot/modbot.c
@@ -261,6 +261,7 @@ int main(int argc, char** argv)
char* logfile=0;
char verbose=0;
char disablelists=0;
+ char disableunapproved=0;
unsigned int i;
for(i=1; i<argc; ++i)
{
@@ -300,6 +301,15 @@ int main(int argc, char** argv)
argv[argc]=0;
--i;
}
+ else if(!strcmp(argv[i], "--no-unapproved"))
+ {
+ disableunapproved=1;
+ // Remove non-tc_client argument
+ --argc;
+ memmove(&argv[i], &argv[i+1], sizeof(char*)*(argc-i));
+ argv[argc]=0;
+ --i;
+ }
else if(!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
{
printf("Additional options for modbot:\n"
@@ -307,6 +317,8 @@ int main(int argc, char** argv)
"-l/--log <file> = log output into <file>\n"
"-v/--verbose = print/log all incoming messages\n"
"--disable-lists = disable playlists\n"
+ "--no-unapproved = don't add unapproved videos to queue\n"
+ " (a mod must have played it first)\n"
"\n");
execvp(strncmp(argv[0], "./", 2)?"tc_client":"./tc_client", argv);
return 1;
@@ -513,6 +525,11 @@ int main(int argc, char** argv)
list_save(&badvids, "badvids.txt");
}
+ if(disableunapproved && !list_contains(&goodvids, vid))
+ {
+ say(pm, "The video I found for '%s' is not approved.\n", &msg[9]);
+ continue;
+ }
queue_add(&queue, vid, nick, title, timeoffset);
if(!list_contains(&goodvids, vid))
{