Print version of among-sus on client connection
This commit is contained in:
parent
1e43573346
commit
6ff83c2761
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
.POSIX:
|
||||
all:
|
||||
$(CC) -o among-sus $(CFLAGS) main.c $(LDFLAGS)
|
||||
$(CC) -o among-sus $(CFLAGS) $$(git rev-parse --short HEAD >/dev/null 2>/dev/null && printf -- '-DVERSION="%s"' "$$(git rev-parse --short HEAD)" || printf -- '-DVERSION="unknown"') main.c $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f among-sus
|
||||
|
|
3
main.c
3
main.c
|
@ -1371,6 +1371,9 @@ welcome_player(int fd)
|
|||
continue;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "among-sus server: version %s\n", VERSION);
|
||||
write(fd, buf, strlen(buf));
|
||||
|
||||
if(state.stage != STAGE_LOBBY) {
|
||||
snprintf(buf, sizeof(buf), "There is a game in progress, waiting for the match to finish...\n");
|
||||
write(fd, buf, strlen(buf));
|
||||
|
|
Loading…
Reference in New Issue