Skip to content

Commit

Permalink
server: add function is_playername_in_use
Browse files Browse the repository at this point in the history
  • Loading branch information
neuschaefer committed Apr 7, 2010
1 parent e79b928 commit f82a049
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,17 @@ static void create_noise(int x,int y,struct player *p)
}


static int is_playername_in_use(const char *name)
{
struct player_list *pl;

for (pl=&players;pl->next;pl=pl->next) {
if (!strcmp(pl->member.name, name))
return 1;
}
return 0;
}


/* read packet from socket */
static void read_data(void)
Expand Down

0 comments on commit f82a049

Please sign in to comment.