diff --git a/channel.c b/channel.c index a43343c..a506554 100644 --- a/channel.c +++ b/channel.c @@ -33,7 +33,7 @@ return(0x0); } -int tuveDelUserChans(myConnections_t *userConnection) { +int tuveDelUserChans(myConnections_t *userConnection,char *msg) { char output[256]; tuveUserChans_t *tmpChan = 0x0; tuveUserChans_t *tmpChan2 = 0x0; @@ -42,7 +42,7 @@ tmpChan2 = tmpChan; for (;tmpChan != 0x0;tmpChan = tmpChan->next) { - sprintf(output,"chanmsg:TUveD:%s:%s Quit (Sig Pipe)\n",tmpChan->channel,userConnection->userInfo.username); + sprintf(output,"chanmsg:TUveD:%s:%s Quit (%s)\n",tmpChan->channel,userConnection->userInfo.username,msg); tuveSendAllInChan(tmpChan->channel,userConnection,output); sprintf(output,"PART:%s:%s\n",tmpChan->channel,userConnection->userInfo.username); tuveSendAllInChan(tmpChan->channel,userConnection,output); @@ -191,14 +191,14 @@ channels->prev = 0x0; channels->users = 0x0; sprintf(channels->channel,channel); - sprintf(channels->topic,"TCA Likes Onions!!!\n"); + sprintf(channels->topic,"General Information About The TUve Network\n"); writeLog("ADDED CHAN1\n"); tmpChannel = channels; } else { tmpChannel = (tuveChanList_t *)malloc(sizeof(tuveChanList_t)); sprintf(tmpChannel->channel,channel); - sprintf(tmpChannel->topic,"TCA Likes Onions!!!\n"); + sprintf(tmpChannel->topic,"General Information About The TUve Network\n"); tmpChannel->next = channels; tmpChannel->prev = 0x0; tmpChannel->users = 0x0; diff --git a/socket.c b/socket.c index 9a4606f..216a60e 100644 --- a/socket.c +++ b/socket.c @@ -230,7 +230,7 @@ } else { send(tmpConnection->fd,"TIMEOUT",sizeof("TIMEOUT"),MSG_NOSIGNAL); - tuveDelUserChans(tmpConnection); + tuveDelUserChans(tmpConnection,"TIMEOUT"); tmpConnection->userInfo.status = -1; } } @@ -254,7 +254,7 @@ else { if (podzGetData(tmpConnection) == -1) { close(tmpConnection->fd); - tuveDelUserChans(tmpConnection); + tuveDelUserChans(tmpConnection,"SIG PIPE"); sRemoveConnection(tmpConnection->fd); } } diff --git a/tuved.h b/tuved.h index b870402..939f67c 100644 --- a/tuved.h +++ b/tuved.h @@ -80,5 +80,5 @@ int tuveAddChan(char *channel,myConnections_t *userConnection); int tuveAddToChanList(char *channel,myConnections_t *userConnection); int tuveSendAllInChan(char *channel,myConnections_t *userConnection,char *output); -int tuveDelUserChans(myConnections_t *userConnection); +int tuveDelUserChans(myConnections_t *userConnection,char *msg); int tuveRemoveFromChanList(char *channel,myConnections_t *userConnection);