diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/BUGS @@ -0,0 +1 @@ + diff --git a/bugs b/bugs deleted file mode 100644 index 8b13789..0000000 --- a/bugs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tuve.c b/tuve.c index 827a85b..c5bf3b3 100644 --- a/tuve.c +++ b/tuve.c @@ -48,6 +48,7 @@ char *tok_last = 0x0; char output[1280]; char buffer[1024]; + myConnections_t *tmpConnection = 0x0; memset(&output,0x0,1024); memset(&buffer,0x0,1024); @@ -130,7 +131,14 @@ if (data != 0x0) { chan = strtok_r(data,":",&tok_last); msg = strtok_r(NULL,"\n",&tok_last); - if (tuveVerifyBan(chan,userConnection->userInfo.username) == 0x1) { + if (chan[0] != '#') { + tmpConnection = findNick(chan); + if (tmpConnection != 0x0) { + sprintf(output,"MSG:%s:PRIVMSG:%s\n",userConnection->userInfo.username,msg); + sSendData(tmpConnection,output); + } + } + else if (tuveVerifyBan(chan,userConnection->userInfo.username) == 0x1) { sprintf(output,"MSG:TUveD:%s:You can not send text to the channel.\n",chan); sSendData(userConnection,output); }