version 1.186 | | version 1.187 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.186 2005/12/05 23:34:04 akirschbaum Exp $"; | | * "$Id: player.c,v 1.187 2005/12/07 18:25:55 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
int add_player(NewSocket *ns) { | | int add_player(NewSocket *ns) { |
player *p; | | player *p; |
char *defname = "nobody"; | | |
| | |
/* Check for banned players and sites. usename is no longer accurate, | | |
* (can't get it over sockets), so all we really have to go on is | | |
* the host. | | |
*/ | | |
| | |
if (checkbanned (defname, ns->host)){ | | |
fprintf (logfile, "Banned player tried to add. [%s@%s]\n", defname, ns->host); | | |
fflush (logfile); | | |
return 0; | | |
} | | |
| | |
p=get_player(NULL); | | p=get_player(NULL); |
memcpy(&p->socket, ns, sizeof(NewSocket)); | | memcpy(&p->socket, ns, sizeof(NewSocket)); |