diff --git a/thread.c b/thread.c index 869a8cf..c7bda15 100644 --- a/thread.c +++ b/thread.c @@ -24,7 +24,7 @@ } else { sleep(30); - res = dbQuery("SELECT channel,rating,classification,random,queue,exclusive,time FROM channels WHERE updated = 1",1); + res = dbQuery("SELECT channel,rating,classification,random,queue,exclusive,time,topic FROM channels WHERE updated = 1",1); if (mysql_num_rows(res) > 0) { for (i = 0;i < mysql_num_rows(res);i++) { row = mysql_fetch_row(res); @@ -64,6 +64,8 @@ else sWriteSocket("MSG %s:.tv mode -T",row[0]); + sWriteSocket("TOPIC %s:%s",row[0],row[7]); + sprintf(qryStr,"UPDATE channels SET updated = 0 WHERE channel = '%s'",row[0]); dbQuery(qryStr,0); }