From: fredrik Date: Sun, 6 Nov 2005 01:17:31 +0000 (+0000) Subject: Generalize reg status. X-Git-Tag: 0.1~97 X-Git-Url: http://dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=fcd0627b625708acf84d783e3b2a41cd0cd1ac37 Generalize reg status. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@482 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/daemon/filenet.h b/daemon/filenet.h index f0cb777..8d6b56b 100644 --- a/daemon/filenet.h +++ b/daemon/filenet.h @@ -29,6 +29,10 @@ #define FNN_EST 2 #define FNN_DEAD 3 +#define FNNS_PUB 0 +#define FNNS_REG 1 +#define FNNS_OP 2 + #define FNPD_INT 0 #define FNPD_LL 1 #define FNPD_STR 2 @@ -94,6 +98,7 @@ struct fnetnode int id; int state; int linked; + int regstatus; time_t srchwait, lastsrch; wchar_t *name; wchar_t *mynick; diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index 7175259..110c1e9 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -106,7 +106,7 @@ struct dchub char *inbuf; size_t inbufdata, inbufsize; struct qcommand *queue; - int extended, isop; + int extended; char *nativename; char *nativenick; }; @@ -1445,6 +1445,7 @@ static void cmd_getpass(struct socket *sk, struct fnetnode *fn, char *cmd, char } qstrf(sk, "$MyPass %s|", mbspw); free(mbspw); + fn->regstatus = FNNS_REG; hubhandleaction(sk, fn, cmd, args); } @@ -1453,7 +1454,7 @@ static void cmd_logedin(struct socket *sk, struct fnetnode *fn, char *cmd, char struct dchub *hub; hub = fn->data; - hub->isop = 1; + fn->regstatus = FNNS_OP; hubhandleaction(sk, fn, cmd, args); }