|
@@ -99,14 +99,12 @@ void write_userfile_protected(bd::Stream& stream, const struct userrec *u, const
|
|
|
int localhub = nextbot(u->handle);
|
|
int localhub = nextbot(u->handle);
|
|
|
/* only write if saving local, or if sending to hub, or if sending to same user as entry, or the localhub in the chain */
|
|
/* only write if saving local, or if sending to hub, or if sending to same user as entry, or the localhub in the chain */
|
|
|
if (idx == -1 || dcc[idx].hub || dcc[idx].user == u || (localhub != -1 && idx == localhub)) {
|
|
if (idx == -1 || dcc[idx].hub || dcc[idx].user == u || (localhub != -1 && idx == localhub)) {
|
|
|
- bd::String buf;
|
|
|
|
|
stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
|
|
stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void def_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
void def_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
|
{
|
|
{
|
|
|
- bd::String buf;
|
|
|
|
|
stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
|
|
stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -370,7 +368,6 @@ static void set_write_userfile(bd::Stream& stream, const struct userrec *u, cons
|
|
|
/* only write if saving local, or if sending to hub, or if sending to same user as entry, or the localhub in the chain */
|
|
/* only write if saving local, or if sending to hub, or if sending to same user as entry, or the localhub in the chain */
|
|
|
if (idx == -1 || dcc[idx].hub || dcc[idx].user == u || (localhub != -1 && idx == localhub)) {
|
|
if (idx == -1 || dcc[idx].hub || dcc[idx].user == u || (localhub != -1 && idx == localhub)) {
|
|
|
struct xtra_key *x = (struct xtra_key *) e->u.extra;
|
|
struct xtra_key *x = (struct xtra_key *) e->u.extra;
|
|
|
- bd::String buf;
|
|
|
|
|
|
|
|
|
|
for (; x; x = x->next)
|
|
for (; x; x = x->next)
|
|
|
stream << bd::String::printf("--%s %s %s\n", e->type->name, x->key, x->data ? x->data : "");
|
|
stream << bd::String::printf("--%s %s %s\n", e->type->name, x->key, x->data ? x->data : "");
|
|
@@ -706,7 +703,6 @@ static bool laston_unpack(struct userrec *u, struct user_entry *e)
|
|
|
static void laston_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
static void laston_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
|
{
|
|
{
|
|
|
struct laston_info *li = (struct laston_info *) e->u.extra;
|
|
struct laston_info *li = (struct laston_info *) e->u.extra;
|
|
|
- bd::String buf;
|
|
|
|
|
|
|
|
|
|
stream << bd::String::printf("--LASTON %li %s\n", (long) li->laston, li->lastonplace ? li->lastonplace : "");
|
|
stream << bd::String::printf("--LASTON %li %s\n", (long) li->laston, li->lastonplace ? li->lastonplace : "");
|
|
|
}
|
|
}
|
|
@@ -828,7 +824,6 @@ static bool botaddr_kill(struct user_entry *e)
|
|
|
static void botaddr_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
static void botaddr_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
|
{
|
|
{
|
|
|
register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
|
|
register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
|
|
|
- bd::String buf;
|
|
|
|
|
|
|
|
|
|
stream << bd::String::printf("--%s %s:%u/%u:%u:%s\n", e->type->name, bi->address, bi->telnet_port, bi->relay_port, bi->hublevel, bi->uplink);
|
|
stream << bd::String::printf("--%s %s:%u/%u:%u:%s\n", e->type->name, bi->address, bi->telnet_port, bi->relay_port, bi->hublevel, bi->uplink);
|
|
|
}
|
|
}
|
|
@@ -915,7 +910,6 @@ struct user_entry_type USERENTRY_BOTADDR =
|
|
|
static void hosts_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
static void hosts_write_userfile(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
|
|
|
{
|
|
{
|
|
|
struct list_type *h = NULL;
|
|
struct list_type *h = NULL;
|
|
|
- bd::String buf;
|
|
|
|
|
|
|
|
|
|
for (h = (struct list_type *) e->u.extra; h; h = h->next)
|
|
for (h = (struct list_type *) e->u.extra; h; h = h->next)
|
|
|
stream << bd::String::printf("--HOSTS %s\n", h->extra);
|
|
stream << bd::String::printf("--HOSTS %s\n", h->extra);
|