|
|
@@ -952,7 +952,7 @@ share_userfileq(int idx, char *par)
|
|
|
flush_tbuf(dcc[idx].nick);
|
|
|
|
|
|
if (bot_aggressive_to(dcc[idx].user)) {
|
|
|
- putlog(LOG_ERRORS, "*", "%s offered user transfer - I'm supposed to be aggressive to it", dcc[idx].nick);
|
|
|
+ putlog(LOG_ERRORS, "*", "%s offered user transfer - I'm supposed to be aggressive to it [likely a hack]", dcc[idx].nick);
|
|
|
dprintf(idx, "s un I have you marked for Agressive sharing.\n");
|
|
|
botunlink(-2, dcc[idx].nick, "I'm aggressive to you");
|
|
|
} else {
|
|
|
@@ -985,6 +985,13 @@ share_userfileq(int idx, char *par)
|
|
|
static void
|
|
|
share_ufsend(int idx, char *par)
|
|
|
{
|
|
|
+ if (bot_aggressive_to(dcc[idx].user)) {
|
|
|
+ putlog(LOG_ERRORS, "*", "%s attempted to start sending userfile [compat] - I'm supposed to be aggressive to it [likely a hack]", dcc[idx].nick);
|
|
|
+ dprintf(idx, "s un I have you marked for Agressive sharing.\n");
|
|
|
+ botunlink(-2, dcc[idx].nick, "I'm aggressive to you");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
char *port = NULL, *ip = NULL;
|
|
|
char s[1024] = "";
|
|
|
int i, sock;
|
|
|
@@ -1100,13 +1107,22 @@ share_end(int idx, char *par)
|
|
|
}
|
|
|
|
|
|
static void share_userfile_line(int idx, char *par) {
|
|
|
- char *size = newsplit(&par);
|
|
|
+ if (stream_in && (dcc[idx].status & STAT_GETTING)) {
|
|
|
+ char *size = newsplit(&par);
|
|
|
|
|
|
- (*stream_in) << bd::String(par, atoi(size));
|
|
|
- (*stream_in) << '\n';
|
|
|
+ (*stream_in) << bd::String(par, atoi(size));
|
|
|
+ (*stream_in) << '\n';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void share_userfile_start(int idx, char *par) {
|
|
|
+ if (bot_aggressive_to(dcc[idx].user)) {
|
|
|
+ putlog(LOG_ERRORS, "*", "%s attempted to initiate user transfer - I'm supposed to be aggressive to it [likely a hack]", dcc[idx].nick);
|
|
|
+ dprintf(idx, "s un I have you marked for Agressive sharing.\n");
|
|
|
+ botunlink(-2, dcc[idx].nick, "I'm aggressive to you");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
dcc[idx].status |= STAT_GETTING;
|
|
|
/* Start up a tbuf to queue outgoing changes for this bot until the
|
|
|
* userlist is done transferring.
|
|
|
@@ -1116,6 +1132,13 @@ static void share_userfile_start(int idx, char *par) {
|
|
|
}
|
|
|
|
|
|
static void share_userfile_end(int idx, char *par) {
|
|
|
+ if (bot_aggressive_to(dcc[idx].user)) {
|
|
|
+ putlog(LOG_ERRORS, "*", "%s attempted to end user transfer - I'm supposed to be aggressive to it [likely a hack]", dcc[idx].nick);
|
|
|
+ dprintf(idx, "s un I have you marked for Agressive sharing.\n");
|
|
|
+ botunlink(-2, dcc[idx].nick, "I'm aggressive to you");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
stream_in->seek(0, SEEK_SET);
|
|
|
share_read_stream(idx, *stream_in);
|
|
|
delete stream_in;
|