unsigned int irc_recv(char *buf) {
static int irc_recv(char *buf) {
unsigned int irc_recv(char *buf) {    char *data;    char byte;    unsigned int i = 0, rn = 0;        if((data = (char*)callocm(513, sizeof(char))) == NULL) return -1;        for(i = 0;i < 513;i++) {        if(recv(bot.sock, &byte, 1, 0) <= 0) {            xstrcpy(buf, data, 513);            freem(data);            return 0;        }                if((byte == '\r') || (byte == '\n')) {            rn++;            if(rn == 2) break;        }        else {            data[i] = byte;            rn = 0;        }    }        strcat(buf, data);    freem(data);    return 1;}