diff options
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c index bcca3a9..adbbe80 100644 --- a/src/server.c +++ b/src/server.c @@ -263,7 +263,7 @@ bool handle_hi(str pkt, player *p, game *g) if (! (deser_str(&pkt, &name) && deser_str(&pkt, &pass))) return false; - if (str_cmp(g->passphrase, pass) != 0) { + if (!str_eq(g->passphrase, pass)) { printf("wrong passphrase from %.*s\n", PSTR(name)); // TODO: log ip ? SEND_PKT(p->conn, CPKT_FAIL, ser_fail_reason(&pkt, FAIL_WRONG_PASS);) return true; // valid pkt, but invalid passphrase @@ -271,7 +271,7 @@ bool handle_hi(str pkt, player *p, game *g) for (size_t i = 0; i < g->players.len; i++) { player *p2 = &g->players.data[i]; - if (p2->auth && str_cmp(p2->name, name) == 0) { + if (p2->auth && str_eq(p2->name, name)) { SEND_PKT(p->conn, CPKT_FAIL, ser_fail_reason(&pkt, FAIL_ALREADY_ONLINE);) return true; } |