diff --git a/server/user.c b/server/user.c index b4960b5..59e063b 100644 --- a/server/user.c +++ b/server/user.c @@ -68,6 +68,7 @@ int protect_realm(UserInfo* table, char* uname, char* password) { if (u != nil && u->realm != nil && scmp(uname, u->realm->master)) { u->realm->password = hash(password, 0); + save_realm(u->cart->name, u->realm); return 1; } return 0; @@ -81,6 +82,7 @@ int transfer_realm(UserInfo* table, char* from, char* to) { return 0; scpy(to, old_user->realm->master, 32); + save_realm(old_user->cart->name, old_user->realm); return 1; } @@ -121,6 +123,7 @@ int enter_realm(UserInfo* table, char* uname, char* realm_name) { if (r != nil) { if (j < r->max) { u->realm = r; + save_realm(u->cart->name, r); return 1; } else { return 0; @@ -215,4 +218,4 @@ int delete_realm(UserInfo* table, char* uname, char* realm) { return 1; else return 0; -} \ No newline at end of file +} diff --git a/server/xrxs.c b/server/xrxs.c index 3da5e11..1bb42bc 100644 --- a/server/xrxs.c +++ b/server/xrxs.c @@ -17,7 +17,7 @@ #include "realm.h" #include "user.h" -char version[] = "0.1"; +char version[] = "0.2"; int chatty9p = 0;