Commit e9fa0c2e authored by Justin Mitchell's avatar Justin Mitchell
Browse files

some witterings about where we are

parent debca6e4
Loading
Loading
Loading
Loading

src/TODO

0 → 100644
+17 −0
Original line number Diff line number Diff line
Things that still need to be done

* Remove the global 'user' variable in the client
  - this needs to be replaced with looking values up some other way
  - should fetch a copy of the user record (ala who list) from the 
    server and keep it cached. 
  - update cached record whenever you get an IPC_CHANGE update

* put in some proper encryption / auth mechanism so we dont wind
  up potentially passing plaintext passwords around

* check that the server is now logging all the things a user
  says an does, client shouldnt really be logging anything much

* have server perform the mwuri lookups and logging

* final big change would be to have the server do the bbs features as well

src/server/user.h

0 → 100644
+22 −0
Original line number Diff line number Diff line
#ifndef SUSER_H
#define SUSER_H

#include <stdint.h>
#include <time.h>
#include <user.h>

extern int userdb_open(int flags);
extern void userdb_write(struct user *user);
extern int fetch_user(struct user *record, int32_t userposn);
extern int fetch_first_user(int fd, struct user *user);
extern int fetch_next_user(int fd, struct user *user);
extern void update_user(struct user *user);
extern int update_user_fd(int fd, struct user *user);
extern int user_exists(const char *name, struct user *user);

#define for_each_user(userp, fd, status) \
	for((status) = fetch_first_user((fd), (userp)); \
	 (status) == 0; \
	 (status) = fetch_next_user((fd), (userp)))

#endif