Newer
Older
tuved / server.c
@reddawg reddawg on 30 Oct 2007 924 bytes Sync
#include <stdio.h>

#include "tuved.h"


int tuveStatus(myConnections_t *userConnection) {
  char output[512];
  int min,sec;


  sprintf(output,"CHANMSG:TUveD:STATUS:Server start on: %s\n",ctime(&startTime));
  sSendData(userConnection,output);
  min = startTime / 60;
  sec = startTime % 60;
  sprintf(output,"CHANMSG:TUveD:STATUS:Server has been running for %i:%.2i\n",min,sec);
  sSendData(userConnection,output);
  sprintf(output,"CHANMSG:TUveD:STATUS:There are currently %i users online.\n",userCount);
  sSendData(userConnection,output);
  sprintf(output,"CHANMSG:TUveD:STATUS:There are currently %i channels Active.\n",channelCount);
  sSendData(userConnection,output);
  min = playCount / 60;
  sec = playCount % 60;
  sprintf(output,"CHANMSG:TUveD:STATUS:There have been %i songs played. For a total Playtime of %i:%.2i\n",songCount,min,sec);
  sSendData(userConnection,output);

  return(0x0);
} // tuveStatus()