diff --git a/PROTO b/PROTO new file mode 100644 index 0000000..133a9d7 --- /dev/null +++ b/PROTO @@ -0,0 +1,2 @@ +Command MSG :Message +Result - Server Will Send Status MSG:STATUS: diff --git a/botthread.c b/botthread.c index 925d8ad..972c11e 100644 --- a/botthread.c +++ b/botthread.c @@ -21,7 +21,7 @@ cmdData = strtok(NULL,"\n"); if (strcasecmp(cmd,"echo") == 0x0) { - sprintf(output,"CHANMSG:@TUveBOT:%s:%s\n",chan,cmdData); + sprintf(output,"MSG:@TUveBOT:%s:%s\n",chan,cmdData); tuveSendAllInChan(chan,0x0,output); } else if (strcasecmp(cmd,"skip") == 0x0) { @@ -31,12 +31,14 @@ } else if (strcasecmp(cmd,"login") == 0x0) { if (!strcmp(cmdData,"b00b5")) { - sprintf(output,"CHANMSG:@TUveBOT:%s:You have successfully logged in.\n",chan); + sprintf(output,"MSG:@TUveBOT:%s:You have successfully logged in.\n",chan); sSendData(userConnection,output); + sprintf(output,"EMOTE:%s:STATUS:Is now an Evil Overlord!\n",userConnection->userInfo.username); + tuveSendAllInUsersChans(userConnection,output); userConnection->userInfo.mode = 1; } else { - sprintf(output,"CHANMSG:@TUveBOT:%s:You have failed login. Your connection will now be terminated!\n",chan); + sprintf(output,"MSG:@TUveBOT:%s:You have failed login. Your connection will now be terminated!\n",chan); sSendData(userConnection,output); tuveDelUserChans(userConnection,"This Mother Fucker Tried To Login With The Wrong Password!"); userConnection->userInfo.status = -1; @@ -125,7 +127,7 @@ min = strtol(playTime, (char **)NULL, 10) / 60; sec = strtol(playTime, (char **)NULL, 10) % 60; - sprintf(output,"CHANMSG:@TUveBOT:%s:Playing %s (%d:%.2d)\n",chan,title,min,sec); + sprintf(output,"MSG:@TUveBOT:%s:Playing %s (%d:%.2d)\n",chan,title,min,sec); tuveSendAllInChan(chan,0x0,output); tmpChan = findChan(chan); diff --git a/channel.c b/channel.c index b749e92..11b497e 100644 --- a/channel.c +++ b/channel.c @@ -16,6 +16,20 @@ tuveChanList_t *addChan(const char *channel); +int tuveChanList(myConnections_t *userConnection) { + char data[1024]; + tuveChanList_t *tmpChan = 0x0; + + sprintf(data,"LIST:Channel:users:Topic\n"); + sSendData(userConnection,data); + + for (tmpChan = channels;tmpChan != 0x0;tmpChan = tmpChan->next) { + sprintf(data,"LIST:%s:%i:%s\n",tmpChan->channel,tmpChan->userCount,tmpChan->topic); + sSendData(userConnection,data); + } + return(0x0); + } + int tuveChanPart(const char *channel,myConnections_t *userConnection) { char output[512]; short inChan = 0x0; @@ -30,7 +44,7 @@ } if (inChan == 0x0) { - sprintf(output,"CHANMSG:TUveD:%s:%s Part (Left Channel)\n",channel,userConnection->userInfo.username); + sprintf(output,"MSG:TUveD:%s:%s Part (Left Channel)\n",channel,userConnection->userInfo.username); tuveSendAllInChan(channel,0x0,output); sprintf(output,"PART:%s:%s\n",channel,userConnection->userInfo.username); tuveSendAllInChan(channel,0x0,output); @@ -48,9 +62,19 @@ char output[256]; tuveChanList_t *tmpChan = 0x0; int min, sec; + int i = 0x0; - assert(channel); - assert(userConnection); + tmpChan = findChan(channel); + + if (tmpChan != 0x0) { + for (i = 0x0;i < MAX_BANS;i++) { + if (tmpChan->bans[i] == userConnection->userInfo.uid) { + sprintf(output,"MSG:TUveD:%s:You are banned from %s\n",channel,channel); + sSendData(userConnection,output); + return(0x1); + } + } + } if (tuveAddChan(channel,userConnection) != 0x0) return(0x1); @@ -67,11 +91,11 @@ min = tmpChan->songTime / 60; sec = tmpChan->songTime % 60; - sprintf(output,"CHANMSG:@TUveBOT:%s:Playing %s (%i:%.2i)\n",channel,tmpChan->songTitle,min,sec); + sprintf(output,"MSG:@TUveBOT:%s:Playing %s (%i:%.2i)\n",channel,tmpChan->songTitle,min,sec); sSendData(userConnection,output); /* Notify people in the channel that someone has joined */ - sprintf(output,"CHANMSG:TUveD:%s:%s (%s) has joined the channel.\n",channel,userConnection->userInfo.username,userConnection->host); + sprintf(output,"MSG:TUveD:%s:%s (%s) has joined the channel.\n",channel,userConnection->userInfo.username,userConnection->host); tuveSendAllInChan(channel,userConnection,output); return(0x0); @@ -86,7 +110,7 @@ tmpChan2 = tmpChan; for (;tmpChan != 0x0;tmpChan = tmpChan->next) { - sprintf(output,"CHANMSG:TUveD:%s:%s Quit (%s)\n",tmpChan->channel,userConnection->userInfo.username,msg); + sprintf(output,"MSG: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); @@ -186,6 +210,8 @@ } tmpChannel->count = 0x0; + tmpChannel->userCount--; + free(tmpUsers); printf("User Freed\n"); pthread_mutex_unlock(&chanMutex); @@ -242,6 +268,8 @@ tmpChannel->count = 0x0; } + tmpChannel->userCount++; + memset(output,0x0,256); sprintf(output,"JOIN:%s:@TUveBOT",tmpChannel->channel); @@ -260,7 +288,11 @@ sprintf(output,"TOPIC:%s:%s\n",tmpChannel->channel,tmpChannel->topic); sSendData(userConnection,output); - + sprintf(output,"MSG:TUveD:%s:Topic for %s: %s\n",tmpChannel->channel,tmpChannel->channel,tmpChannel->topic); + sSendData(userConnection,output); + 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); + writeLog(2,"Added user: %s to Channel: %s\n",userConnection->userInfo.username,channel); pthread_mutex_unlock(&chanMutex); @@ -303,6 +335,8 @@ channels->users = 0x0; sprintf(channels->channel,channel); sprintf(channels->topic,"No Topic Set"); + sprintf(channels->topicSetBy,"TUveD"); + channels->topicSet = time(NULL); sprintf(channels->songTitle,"No Video"); sprintf(channels->curSong,"NA"); channels->songEnd = 0x0; @@ -313,6 +347,8 @@ tmpChannel = (tuveChanList_t *)calloc(1,sizeof(tuveChanList_t)); sprintf(tmpChannel->channel,channel); sprintf(tmpChannel->topic,"No Topic Set"); + sprintf(tmpChannel->topicSetBy,"TUveD"); + tmpChannel->topicSet = time(NULL); sprintf(tmpChannel->songTitle,"NoVideo"); sprintf(tmpChannel->curSong,"NA"); tmpChannel->songEnd = 0x0; @@ -375,13 +411,15 @@ return(0x1); } - //sprintf(tmpChannel->topic,topic); strncpy(tmpChannel->topic,topic,128); sprintf(output,"TOPIC:%s:%s\n",chan,tmpChannel->topic); tuveSendAllInChan(chan,0x0,output); - sprintf(output,"CHANMSG: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); + sprintf(tmpChannel->topicSetBy,userConnection->userInfo.username); + return(0x0); } @@ -416,7 +454,7 @@ writeLog(0,"ERROR: Can not remove %s From %s's List\n",chan,userConnection->userInfo.username); - sprintf(output,"CHANMSG:TUveD:%s:%s Has Been Kick By %s, Reason: %s\n",chan,nick,by,msg); + sprintf(output,"MSG:TUveD:%s:%s Has Been Kick By %s, Reason: %s\n",chan,nick,by,msg); tuveSendAllInChan(chan,0x0,output); sprintf(output,"PART:%s:%s\n",chan,nick); @@ -424,7 +462,103 @@ writeLog(0,"Kicked %s\n",output); - tuveChanJoin("#DogHouse",userConnection); + tuveChanJoin("#doghouse",userConnection); return(0x0); } + +int tuveBan(const char *channel,const char *nick) { + char output[1024]; + tuveChanList_t *tmpChannel = 0x0; + myConnections_t *userConnection = 0x0; + int i = 0x0; + + tmpChannel = findChan(channel); + + if (tmpChannel == 0x0) { + writeLog(1,"findchan Failed: Ban\n"); + return(0x1); + } + + userConnection = findNick(nick); + + if (userConnection == 0x0) { + writeLog(1,"nick Filed: Ban\n"); + return(0x1); + } + + for (i = 0x0;i < MAX_BANS;i++) { + if (tmpChannel->bans[i] == 0x0) { + tmpChannel->bans[i] = userConnection->userInfo.uid; + break; + } + } + + sprintf(output,"MSG:TUveD:%s:%s Has Been Banned\n",channel,userConnection->userInfo.username); + tuveSendAllInChan(channel,0x0,output); + + return(0x0); + } + +int tuveUnBan(const char *channel,const char *nick) { + char output[1024]; + tuveChanList_t *tmpChannel = 0x0; + myConnections_t *userConnection = 0x0; + int i = 0x0; + + tmpChannel = findChan(channel); + + if (tmpChannel == 0x0) { + writeLog(1,"findchan Failed: Ban\n"); + return(0x1); + } + + userConnection = findNick(nick); + + if (userConnection == 0x0) { + writeLog(1,"nick Filed: Ban\n"); + return(0x1); + } + + for (i = 0x0;i < MAX_BANS;i++) { + if (tmpChannel->bans[i] == userConnection->userInfo.uid) { + tmpChannel->bans[i] = 0x0; + break; + } + } + + sprintf(output,"MSG:TUveD:%s:%s Has Been UnBanned\n",channel,userConnection->userInfo.username); + tuveSendAllInChan(channel,0x0,output); + + return(0x0); + } + +int tuveVerifyBan(const char *channel,const char *nick) { + tuveChanList_t *tmpChannel = 0x0; + myConnections_t *userConnection = 0x0; + int i = 0x0; + + tmpChannel = findChan(channel); + + if (tmpChannel == 0x0) { + writeLog(1,"findchan Failed: Ban\n"); + return(0x1); + } + + userConnection = findNick(nick); + + if (userConnection == 0x0) { + writeLog(1,"nick Filed: Ban\n"); + return(0x1); + } + + for (i = 0x0;i < MAX_BANS;i++) { + if (tmpChannel->bans[i] == userConnection->userInfo.uid) { + return(0x1); + } + } + + return(0x0); + } + + diff --git a/nick.c b/nick.c index fb9cfae..e389e21 100644 --- a/nick.c +++ b/nick.c @@ -28,7 +28,10 @@ } // tuveVerifyNick() -myConnections_t *findNick(char *nick) { +myConnections_t *findNick(const char *nick) { + if (nick == 0x0) + return(0x0); + myConnections_t *tmpConnection = 0x0; for (tmpConnection = connections;tmpConnection != 0x0;tmpConnection = tmpConnection->next) { if (!strcasecmp(nick,tmpConnection->userInfo.username)) @@ -48,17 +51,21 @@ user = findNick(nick); if (user == 0x0) { - sprintf(output,"CHANMSG:TUveD:WHOIS:%s Not Found\n",nick); + sprintf(output,"MSG:TUveD:STATUS:%s Not Found\n",nick); sSendData(userConnection,output); return(0x0); } - sprintf(output,"CHANMSG:TUveD:WHOIS:%s is %s\n",nick,user->host); + sprintf(output,"MSG:TUveD:STATUS:%s is %s\n",user->userInfo.username,user->host); sSendData(userConnection,output); - sprintf(output,"CHANMSG:TUveD:WHOIS:%s Signed On %s",nick,ctime(&user->signedOn)); + sprintf(output,"MSG:TUveD:STATUS:%s Signed On %s",user->userInfo.username,ctime(&user->signedOn)); sSendData(userConnection,output); if (user->userInfo.mode == 1) { - sprintf(output,"CHANMSG:TUveD:WHOIS:%s Is an Evil Overlord\n",nick); + sprintf(output,"MSG:TUveD:STATUS:%s Is an Evil Overlord\n",user->userInfo.username); + sSendData(userConnection,output); + } + if ((time(NULL) - user->userInfo.idle) > 30) { + sprintf(output,"MSG:TUveD:STATUS:%s Has been idle for %i seconds.\n",user->userInfo.username,time(NULL) - user->userInfo.idle); sSendData(userConnection,output); } @@ -66,7 +73,7 @@ memset(output,0x0,256); for (chans = user->userInfo.chans;chans != 0x0;chans = chans->next) { if (strlen(output) == 0) - sprintf(output,"CHANMSG:TUveD:WHOIS:%s Is On %s",nick,chans->channel); + sprintf(output,"MSG:TUveD:STATUS:%s Is On %s",user->userInfo.username,chans->channel); else sprintf(output,"%s,%s",output,chans->channel); } diff --git a/server.c b/server.c index 8f92438..cbd2952 100644 --- a/server.c +++ b/server.c @@ -11,7 +11,7 @@ curTime = time(NULL); - sprintf(output,"CHANMSG:TUveD:STATUS:Server start on: %s\n",ctime(&startTime)); + sprintf(output,"MSG:TUveD:STATUS:Server start on: %s\n",ctime(&startTime)); sSendData(userConnection,output); curTime -= startTime; day = curTime / 86400; @@ -21,11 +21,11 @@ min = curTime / 60; curTime -= (60 * min); sec = curTime; - sprintf(output,"CHANMSG:TUveD:STATUS:Server has been running for %i days %i hours %i min %.2i sec\n",day,hour,min,sec); + sprintf(output,"MSG:TUveD:STATUS:Server has been running for %i days %i hours %i min %.2i sec\n",day,hour,min,sec); sSendData(userConnection,output); - sprintf(output,"CHANMSG:TUveD:STATUS:There are currently %i users online.\n",userCount); + sprintf(output,"MSG: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); + sprintf(output,"MSG:TUveD:STATUS:There are currently %i channels Active.\n",channelCount); sSendData(userConnection,output); curTime = playCount; day = curTime / 86400; @@ -35,7 +35,7 @@ min = curTime / 60; curTime -= (60 * min); sec = curTime; - sprintf(output,"CHANMSG: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 songs 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); diff --git a/tuve.c b/tuve.c index 5b94825..06f2a37 100644 --- a/tuve.c +++ b/tuve.c @@ -46,7 +46,7 @@ char *data = 0x0; char *title = 0x0; char *tok_last = 0x0; - char output[1024]; + char output[1280]; char buffer[1024]; memset(&output,0x0,1024); @@ -73,9 +73,16 @@ if (!strcasecmp(cmd,"IDENT")) { writeLog(2,"(ident)\n"); if (data != 0x0) { - if (tuveVerifyNick(data) == 0) { - sprintf(userConnection->userInfo.username,data); //strtok_r(data,":",&tok_last)); - userConnection->userInfo.uid = time(NULL); //atoi(strtok_r(NULL,"\n",&tok_last)); + tok_last = 0x0; + nick = strtok_r(data,":",&tok_last); + msg = strtok_r(NULL,"\n",&tok_last); + + if (tuveVerifyNick(nick) == 0) { + sprintf(userConnection->userInfo.username,nick); //strtok_r(data,":",&tok_last)); + if (msg == 0x0) + userConnection->userInfo.uid = time(NULL); //atoi(strtok_r(NULL,"\n",&tok_last)); + else + userConnection->userInfo.uid = atoll(msg); userConnection->userInfo.ident = 0x1; } else @@ -84,16 +91,30 @@ else { sSendData(userConnection,"IDENT:Invalid Ident.\n"); } + return(0x0); } else if (strcasecmp(cmd,"") == 0x0) { /* Command Checked Tested And Approved */ sprintf(output,"\n\n\n\n"); send(userConnection->fd,output,strlen(output)+1,MSG_NOSIGNAL); writeLog(1,"Sent CROSSDOMAIN\n"); + return(0x0); + } + else if (strcasecmp(cmd,"PONG!") == 0x0) { + /* Command Checked Test And Approved */ + userConnection->userInfo.pfailed = 0x0; + return(0x0); } else if (userConnection->userInfo.ident != 0x1) { /* Command Checked Tested And Approved */ sSendData(userConnection,"Please Auth"); + return(0x0); + } + + userConnection->userInfo.idle = time(NULL); + + if (!strcasecmp(cmd,"LIST")) { + return(tuveChanList(userConnection)); } else if (!strcasecmp(cmd,"JOIN")) { /* Function Checked Tested And Approved */ @@ -105,34 +126,60 @@ else tuveChanJoin(data,userConnection); } - else if (strcasecmp(cmd,"PONG!") == 0x0) { - /* Command Checked Test And Approved */ - userConnection->userInfo.pfailed = 0x0; - } - else if (strcasecmp(cmd,"chanmsg") == 0x0) { + else if (strcasecmp(cmd,"MSG") == 0x0) { if (data != 0x0) { chan = strtok_r(data,":",&tok_last); msg = strtok_r(NULL,"\n",&tok_last); - if (msg != 0x0) { + 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); + } + else if (msg != 0x0) { if ((strlen(msg) > 2) && (msg[0] == '.' && msg[1] == 't' && msg[2] == 'v')) tuveBotCMD(userConnection,chan,msg+3); else { - sprintf(output,"CHANMSG:%s:%s:%s\n",userConnection->userInfo.username,chan,msg); + strncpy(buffer,msg,1024); + sprintf(output,"MSG:%s:%s:%s\n",userConnection->userInfo.username,chan,buffer); tuveSendAllInChan(chan,userConnection,output); } } } } + else if (strcasecmp(cmd,"EMOTE") == 0x0) { + if (data != 0x0) { + chan = strtok_r(data,":",&tok_last); + msg = strtok_r(NULL,"\n",&tok_last); + 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); + } + else if (msg != 0x0) { + strncpy(buffer,msg,1024); + sprintf(output,"EMOTE:%s:%s:%s\n",userConnection->userInfo.username,chan,buffer); + tuveSendAllInChan(chan,userConnection,output); + } + } + } else if (strcasecmp(cmd,"topic") == 0x0) { - msg = strtok_r(data,":",&tok_last); - tuveSetTopic(userConnection,msg,strtok_r(NULL,"\n",&tok_last)); + if (data != 0x0) { + tok_last = 0x0; + chan = strtok_r(data,":",&tok_last); + msg = strtok_r(NULL,"\n",&tok_last); + + if (tuveVerifyBan(chan,userConnection->userInfo.username) == 0x1) { + sSendData(userConnection,"MSG:TUveD:STATUS:You can not set topic to this channel.\n"); + } + else { + tuveSetTopic(userConnection,chan,msg); + } + } } else if (strcasecmp(cmd,"NICK") == 0x0) { if (data != 0x0) { if (tuveVerifyNick(data) == 0x0) { sprintf(output,"NICK:%s:%s\n",userConnection->userInfo.username,data); tuveSendAllInUsersChans(userConnection,output); - sprintf(output,"CHANMSG:TUveD:NICK:%s is now know as %s\n",userConnection->userInfo.username,data); + sprintf(output,"MSG:TUveD:NICK:%s is now know as %s\n",userConnection->userInfo.username,data); tuveSendAllInUsersChans(userConnection,output); sprintf(userConnection->userInfo.username,data); } @@ -147,7 +194,7 @@ tok_last = 0x0; if (userConnection->userInfo.mode != 1) { - sSendData(userConnection,"CHANMSG:@TUveBOT:KICK:You do not have permission to kick!\n"); + sSendData(userConnection,"MSG:@TUveBOT:KICK:You do not have permission to kick!\n"); } else { if (data == 0x0) @@ -200,6 +247,28 @@ else if (strcasecmp(cmd,"STATUS") == 0x0) { tuveStatus(userConnection); } + else if (strcasecmp(cmd,"BAN") == 0x0) { + if (userConnection->userInfo.mode != 1) { + sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to ban.\n"); + } + else if (data != 0x0) { + tok_last = 0x0; + chan = strtok_r(data,":",&tok_last); + nick = strtok_r(NULL,"\n",&tok_last); + tuveBan(chan,nick); + } + } + else if (strcasecmp(cmd,"UNBAN") == 0x0) { + if (userConnection->userInfo.mode != 1) { + sSendData(userConnection,"MSG:TUveD:STATUS:You do not have permission to unban.\n"); + } + else if (data != 0x0) { + tok_last = 0x0; + chan = strtok_r(data,":",&tok_last); + nick = strtok_r(NULL,"\n",&tok_last); + tuveUnBan(chan,nick); + } + } else { sSendData(userConnection,"invalid command\n"); writeLog(1,"Invalid CMD: [%s]\n",cmd); diff --git a/tuved.h b/tuved.h index 426a9a6..a49d8e4 100644 --- a/tuved.h +++ b/tuved.h @@ -22,6 +22,7 @@ #define MAX_TOPIC_LEN 128 #define MAX_CHAN_LEN 32 #define MAX_USER_LEN 32 +#define MAX_BANS 30 typedef struct tuveUserList { struct tuveUserList *prev; @@ -34,12 +35,16 @@ struct tuveChanList *next; struct tuveUserList *users; struct tuveUserList *nextUser; + long long bans[MAX_BANS]; + time_t topicSet; + char topicSetBy[MAX_USER_LEN]; char topic[MAX_TOPIC_LEN]; char channel[MAX_CHAN_LEN]; char curSong[256]; char songTitle[256]; int songEnd; int songTime; + int userCount; short count; } tuveChanList_t; @@ -50,12 +55,13 @@ } tuveUserChans_t; typedef struct tuveUser { - short ident; + short ident; short pfailed; short status; short mode; - int uid; + long long uid; time_t pong; + time_t idle; char username[MAX_USER_LEN]; tuveUserChans_t *chans; } tuveUser_t; @@ -108,6 +114,7 @@ int writeLog(int level,char const * __restrict, ...); /* Channel Functions */ +int tuveChanList(myConnections_t *userConnection); int tuveChanPart(const char *channel,myConnections_t *userConnection); int tuveChanJoin(const char *channel,myConnections_t *userConnection); int tuveAddChan(const char *channel,myConnections_t *userConnection); @@ -120,6 +127,9 @@ int tuveDelChan(const char *channel,myConnections_t *userConnection); int tuveKick(char *by,char *chan,char *nick,char *msg); tuveChanList_t *findChan(const char *); +int tuveBan(const char *channel,const char *nick); +int tuveUnBan(const char *channel,const char *nick); +int tuveVerifyBan(const char *channel,const char *nick); /* Bot Functions */ void *tuveBotThread(void *threadid); @@ -129,7 +139,7 @@ /* Nick Functions */ int tuveVerifyNick(char *nick); -myConnections_t *findNick(char *); +myConnections_t *findNick(const char *); int tuveWhois(myConnections_t *userConnection,char *nick); /* Server Functions */