Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make .share filename unique #1628

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mod/share.mod/share.c
Original file line number Diff line number Diff line change
Expand Up @@ -2032,14 +2032,14 @@ static void finish_share(int idx)
static void start_sending_users(int idx)
{
struct userrec *u;
char share_file[1024], s1[64];
char r[9], share_file[PATH_MAX], s1[64], s[EGG_INET_ADDRSTRLEN];
int i = 1;
struct chanuserrec *ch;
struct chanset_t *cst;
char s[EGG_INET_ADDRSTRLEN];

snprintf(share_file, sizeof share_file, ".share.%s.%" PRId64, dcc[idx].nick,
(int64_t) now);
make_rand_str_from_chars(r, (sizeof r) - 1, CHARSET_LOWER_ALPHA);
snprintf(share_file, sizeof share_file, ".share.%s.%" PRId64 ".%s",
dcc[idx].nick, (int64_t) now, r);
if (dcc[idx].u.bot->uff_flags & UFF_OVERRIDE) {
debug1("NOTE: Sharing aggressively with %s, overriding its local bots.",
dcc[idx].nick);
Expand Down