$ git clone http://tcclient.ion.nu/tc_client.git
commit fb815ea65b8133d568660c48cdbd58fe293e01d0
Author: Alicia <...>
Date: Fri Dec 11 22:33:55 2015 +0100
Reimplemented announcement of people cammed up when joining.
diff --git a/ChangeLog b/ChangeLog
index 4b47c84..ef90879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.37:
Reimplemented announcement of moderators.
+Reimplemented announcement of people cammed up when joining.
0.36:
Implemented /whois <nick/ID> to check someone's username.
Changed the /whois output to be more human-readable in cases where the user isn't logged in.
diff --git a/client.c b/client.c
index 0fa94c0..0f6e73b 100644
--- a/client.c
+++ b/client.c
@@ -863,6 +863,21 @@ int main(int argc, char** argv)
{
if(idlist[i].op){printf("%s is a moderator.\n", idlist[i].name);}
}
+ printf("Currently on cam: ");
+ char first=1;
+ for(i = 2; i < amfin->itemcount; ++i)
+ {
+ if(amfin->items[i].type==AMF_OBJECT)
+ {
+ struct amfitem* item=amf_getobjmember(&amfin->items[i].object, "bf");
+ if(item->type!=AMF_BOOL || !item->boolean){continue;}
+ item=amf_getobjmember(&amfin->items[i].object, "nick");
+ if(item->type!=AMF_STRING){continue;}
+ printf("%s%s", (first?"":", "), item->string.string);
+ first=0;
+ }
+ }
+ printf("\n");
}else{
printf(" entered the channel\n");
if(idlist[idlistlen-1].op){printf("%s is a moderator.\n", idlist[idlistlen-1].name);}
@@ -983,22 +998,6 @@ int main(int argc, char** argv)
printf("Use /forgive <ID/nick> to unban someone\n");
fflush(stdout);
}
- // "avons", 0, "ID1", "nick1", "IDn", "nickn"...
- else if(amfin->itemcount>1 && amfin->items[0].type==AMF_STRING && amf_comparestrings_c(&amfin->items[0].string, "avons"))
- {
- printf("Currently on cam: ");
- int i;
- // a "numeric" id precedes each nick, so we start on 3 and increment by 2
- for(i = 3; i < amfin->itemcount; i+=2)
- {
- if(amfin->items[i].type==AMF_STRING)
- {
- printf("%s%s", (i==3?"":", "), amfin->items[i].string.string);
- }
- }
- printf("\n");
- fflush(stdout);
- }
else if(amfin->itemcount>4 && amfin->items[0].type==AMF_STRING && amf_comparestrings_c(&amfin->items[0].string, "notice") && amfin->items[2].type==AMF_STRING && amf_comparestrings_c(&amfin->items[2].string, "avon"))
{
if(amfin->items[4].type==AMF_STRING)