diff --git a/channel.c b/channel.c index 11b497e..2f1a57e 100644 --- a/channel.c +++ b/channel.c @@ -39,7 +39,7 @@ inChan = 1; } if (tuveDelChan(channel,userConnection) == 0x1) { - writeLog(0,"ERROR: Can not remove %s From %s's List\n",channel,userConnection->userInfo.username); + writeLog(0,"ERROR: Can not remove %s from %s's List\n",channel,userConnection->userInfo.username); inChan = 1; } @@ -228,14 +228,16 @@ tuveChanList_t *tmpChannel = 0x0; tuveUserList_t *tmpUsers = 0x0; + int deltaTime, day, hour, min, sec; char output[1024]; - + //mji char topicTime[1024]; + tmpChannel = findChan(channel); // tmpChannel is okay to be null here if (tmpChannel == 0x0) { - writeLog(2,"Channel %s Does Not Exist Adding To List\n",channel); + writeLog(2,"Channel %s does not exist adding to list\n",channel); tmpChannel = addChan(channel); } @@ -290,6 +292,15 @@ sSendData(userConnection,output); sprintf(output,"MSG:TUveD:%s:Topic for %s: %s\n",tmpChannel->channel,tmpChannel->channel,tmpChannel->topic); sSendData(userConnection,output); + deltaTime = time(NULL) - tmpChannel->topicSet; + day = deltaTime / 86400; + deltaTime -= (86400 * day); + hour = deltaTime / 3600; + deltaTime -= (3600 * hour); + min = deltaTime / 60; + deltaTime -= (60 * min); + sec = deltaTime; + sprintf(output,"MSG:TUveD:%s:Topic was set by %s %i seconds ago.\n",tmpChannel->channel,tmpChannel->topicSetBy,time(NULL) - tmpChannel->topicSet); sSendData(userConnection,output); @@ -414,7 +425,7 @@ strncpy(tmpChannel->topic,topic,128); sprintf(output,"TOPIC:%s:%s\n",chan,tmpChannel->topic); tuveSendAllInChan(chan,0x0,output); - sprintf(output,"MSG:TUveD:%s:%s Has Set The Topic To: %s\n",chan,userConnection->userInfo.username,tmpChannel->topic); + sprintf(output,"MSG:TUveD:%s:%s has set the topic to: %s\n",chan,userConnection->userInfo.username,tmpChannel->topic); tuveSendAllInChan(chan,0x0,output); tmpChannel->topicSet = time(NULL); @@ -451,10 +462,10 @@ if (tuveRemoveFromChanList(chan,userConnection) == 0x1) writeLog(0,"ERROR: Can not remove %s from %s\n",userConnection->userInfo.username,chan); if (tuveDelChan(chan,userConnection) == 0x1) - writeLog(0,"ERROR: Can not remove %s From %s's List\n",chan,userConnection->userInfo.username); + writeLog(0,"ERROR: Can not remove %s from %s's List\n",chan,userConnection->userInfo.username); - sprintf(output,"MSG:TUveD:%s:%s Has Been Kick By %s, Reason: %s\n",chan,nick,by,msg); + sprintf(output,"MSG:TUveD:%s:%s has been kicked by %s, Reason: %s\n",chan,nick,by,msg); tuveSendAllInChan(chan,0x0,output); sprintf(output,"PART:%s:%s\n",chan,nick); @@ -494,7 +505,7 @@ } } - sprintf(output,"MSG:TUveD:%s:%s Has Been Banned\n",channel,userConnection->userInfo.username); + sprintf(output,"MSG:TUveD:%s:%s has been banned\n",channel,userConnection->userInfo.username); tuveSendAllInChan(channel,0x0,output); return(0x0); @@ -527,7 +538,7 @@ } } - sprintf(output,"MSG:TUveD:%s:%s Has Been UnBanned\n",channel,userConnection->userInfo.username); + sprintf(output,"MSG:TUveD:%s:%s has been unbanned\n",channel,userConnection->userInfo.username); tuveSendAllInChan(channel,0x0,output); return(0x0); diff --git a/server.c b/server.c index e7c9cea..06b386c 100644 --- a/server.c +++ b/server.c @@ -27,7 +27,7 @@ sSendData(userConnection,output); sprintf(output,"MSG:TUveD:STATUS:There are currently %i users online.\n",userCount); sSendData(userConnection,output); - sprintf(output,"MSG:TUveD:STATUS:There are currently %i channels Active.\n",channelCount); + sprintf(output,"MSG:TUveD:STATUS:There are currently %i channels active.\n",channelCount); sSendData(userConnection,output); curTime = playCount; day = curTime / 86400; @@ -37,7 +37,7 @@ min = curTime / 60; curTime -= (60 * min); sec = curTime; - sprintf(output,"MSG:TUveD:STATUS:There have been %i songs played. For a total Playtime of %i days %i hours %i min %.2i sec\n",songCount,day,hour,min,sec); + sprintf(output,"MSG:TUveD:STATUS:There have been %i videos played. For a total Playtime of %i days %i hours %i min %.2i sec\n",songCount,day,hour,min,sec); sSendData(userConnection,output); return(0x0);