summaryrefslogtreecommitdiff
path: root/chat/eggdrop/patches/patch-ai
blob: 2370443facc49a5fa0ea5dc65204a4c6753252ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ai,v 1.3 2004/12/03 12:15:54 adam Exp $

--- src/mod/share.mod/share.c.orig	2004-07-02 21:02:02.000000000 +0000
+++ src/mod/share.mod/share.c
@@ -1120,7 +1120,8 @@ static void share_ufsend(int idx, char *
   int i, sock;
   FILE *f;
 
-  egg_snprintf(s, sizeof s, ".share.%s.%li.users", botnetnick, now);
+  egg_snprintf(s, sizeof s, "%.100s/.share.%.32s.%lu.users",
+		tempdir, botnetnick, now);
   if (!(b_status(idx) & STAT_SHARE)) {
     dprintf(idx, "s e You didn't ask; you just started sending.\n");
     dprintf(idx, "s e Ask before sending the userfile.\n");
@@ -1889,8 +1890,8 @@ static void start_sending_users(int idx)
   struct chanuserrec *ch;
   struct chanset_t *cst;
 
-  egg_snprintf(share_file, sizeof share_file, ".share.%s.%lu", dcc[idx].nick,
-               now);
+  egg_snprintf(share_file, sizeof share_file, "%.100s/.share.%.32s.%lu",
+               tempdir, dcc[idx].nick, now);
   if (dcc[idx].u.bot->uff_flags & UFF_OVERRIDE) {
     debug1("NOTE: Sharing aggressively with %s, overriding its local bots.",
            dcc[idx].nick);