diff --git a/channel.c b/channel.c index dbbcfaf..356e2df 100644 --- a/channel.c +++ b/channel.c @@ -15,8 +15,17 @@ tuveChanList_t *addChan(char *channel); int tuveChanPart(char *channel,myConnections_t *userConnection) { + char output[512]; + if (tuveRemoveFromChanList(channel,userConnection) == 0x1) writeLog(0,"ERROR: Can not remove %s from %s\n",userConnection->userInfo.username,channel); + if (tuveDelChan(channel,userConnection) == 0x1) + writeLog(0,"ERROR: Can not remove %s From %s's List\n",channel,userConnection->userInfo); + + sprintf(output,"CHANMSG:TUveD:%s:%s Part (Left Channel)\n",channel,userConnection->userInfo.username); + tuveSendAllInChan(tmpChan->channel,userConnection,output); + sprintf(output,"PART:%s:%s\n",channel,userConnection->userInfo.username); + tuveSendAllInChan(tmpChan->channel,userConnection,output); } /* End tuveChanPart(); */ /*