fnetdelpeer(fn->peers);
if(fn->mynick != NULL)
free(fn->mynick);
+ if(fn->pubid != NULL)
+ free(fn->pubid);
if(fn->name != NULL)
free(fn->name);
if(fn->sk != NULL)
return(NULL);
}
fn = newfn(fnet);
+ fn->pubid = icmbstowcs(addr, NULL);
+ if(fn->pubid == NULL)
+ fn->pubid = swcsdup(L"");
fn->args = args;
for(arg = fn->args; arg != NULL; arg = arg->next)
{
int linked;
int regstatus;
time_t srchwait, lastsrch;
- wchar_t *name;
+ wchar_t *name, *pubid;
wchar_t *mynick;
struct fnet *fnet;
struct socket *sk;
}
for(fn = fnetnodes; fn != NULL; fn = fn->next)
{
- sq(sk, (fn->next != NULL)?1:0, L"200", L"%%i", fn->id, fn->fnet->name, (fn->name == NULL)?L"":fn->name, L"%%i", fn->numpeers, L"%%i", fn->state, NULL);
+ sq(sk, (fn->next != NULL)?1:0, L"200", L"%%i", fn->id, fn->fnet->name, (fn->name == NULL)?L"":fn->name, L"%%i", fn->numpeers, L"%%i", fn->state, L"%%ls", fn->pubid, NULL);
}
}
void (*newpeercb)(struct dc_fnetpeer *peer);
void (*delpeercb)(struct dc_fnetpeer *peer);
void (*chpeercb)(struct dc_fnetpeer *peer);
+ wchar_t *pubid;
};
struct dc_fnetpeerdatum
509
511
:lsnodes
-200 i s s i i
+200 i s s i i s
201
502
:dcnct
fn->name = swcsdup(ires->argv[2].val.str);
fn->numusers = ires->argv[3].val.num;
fn->state = ires->argv[4].val.num;
+ if(fn->pubid != NULL)
+ free(fn->pubid);
+ fn->pubid = swcsdup(ires->argv[5].val.str);
} else {
fn = newfn();
fn->id = ires->argv[0].val.num;
fn->name = swcsdup(ires->argv[2].val.str);
fn->numusers = ires->argv[3].val.num;
fn->state = ires->argv[4].val.num;
+ fn->pubid = swcsdup(ires->argv[5].val.str);
fn->found = 1;
}
dc_freeires(ires);