save realm on user join, password change, and transfer; bump to v0.2
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmF0LkwACgkQO3+8IhRO Y5gvFw/6AgY4G8+/ybFBpwDhMQ6E8DtBlmTTjx9Yhw3bobdBFxk9xc38tngenlNd eU5aNwJJ4GR83NYfy9P9hRkg/OyMRcnJ/4FaUc8oc/CzWdjACfHFpTGyq2QWOUQp YGt5nBo3VkMVPpi95Xmdu/fbAwpJ+J6/TM1eT7SokxfXCeXO2KJsJPt3J0XwoQXw REz0RyLrLSaPDygC1CcT8CLwcR/C8Ik2o/X9rRhsNh9PRZq494ZiJf95M4bXrRtE ViWSblPAFaXAZeOwje5NAsFJr1XwgnMOmxVvvX6+wQs2l1f7Qwr87sUDd0JdGjtl o6TSstpnYCBxg028paUxk2PS3fe550JqWbmwIgBhteS47d9GoObx7F9rGarkml7+ IUmYmgzG4r6Z02QPpQ82KOXdKCUZqpmXjN9z7lbLRJ4urLq0CCkK6bO2hVrG9szO UG5R+Vx9a1ZdLMDfERyWdnnXsl1BXvfzFh4G5/M08il1A5OFNXlDu+vrtYZlHUw+ a+eC5wztT134v07Kp3Ed5kp7AiP45jNU0w7bOSncRZCNiCvp47QmnEd0/ryLeWzO qHFsA/9VoTgi6Dm425BJx91kSoNK8ntMBIZgXMY/fyB3S/U2/z1Th8MofPR6DgNB r8teJJlHpRnmYoybLEEZbQ2C9D93Ro+QrpEnac0C5ymielVSxQw= =P0uz -----END PGP SIGNATURE-----
2 files changed,
5 insertions(+),
2 deletions(-)
M
server/user.c
→
server/user.c
@@ -68,6 +68,7 @@ UserInfo* u = find_user(table, uname);
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 @@ if (old_user == nil || new_user == nil || old_user->realm == nil)
return 0; scpy(to, old_user->realm->master, 32); + save_realm(old_user->cart->name, old_user->realm); return 1; }@@ -121,6 +123,7 @@
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 @@ if (scmp(master, uname) && rm_dir(path))
return 1; else return 0; -}+}
M
server/xrxs.c
→
server/xrxs.c
@@ -17,7 +17,7 @@ #include "universe.h"
#include "realm.h" #include "user.h" -char version[] = "0.1"; +char version[] = "0.2"; int chatty9p = 0;