no autodl spam

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7535 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2013-08-09 17:27:57 +00:00
parent 71f7dc9588
commit 03a73c40e7
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -269,7 +269,7 @@ const quickanswer [ if (>= $lastpm 0) [ saycommand (concat /pm $lastpm []) ] [ s
// For those players who use IRC too much...
const join [ connect $arg1 $arg2 $arg3 ]
const reconnect [ if $numargs [ svpass = $arg1 ] [ svpass = [] ]; if $connected [ svdata = (curserver); afterdisconnect [ connect (at $svdata 0) (at $svdata 1) $svpass ] ] ]
const dlmap [ getmap $arg1 [ map $arg1 ] ]
const dlmap [ getmap $arg1 [ sleep 2500 (concat map $arg1) ] ]
const rndmap [ result (at $defaultmaps (rnd (listlen $defaultmaps))) ]
const rrnd [ + (rnd (- $arg2 $arg1)) $arg1 ]
const ++ [ if (checkalias $arg1) [ += $arg1 1 ] ]
+9
View File
@@ -1098,8 +1098,16 @@ double dlpackage(package *pck)
return (!result && httpresult == 200) ? dlsize : 0;
}
int lastpackagesdownload = 0;
int downloadpackages()
{
if(!pendingpackages.numelems) return 0;
else if(totalmillis - lastpackagesdownload < 2000)
{
conoutf("\f3quick download attempt aborted");
return 0;
}
double total = 0;
int downloaded = 0;
enumerate(pendingpackages, package *, pck,
@@ -1114,6 +1122,7 @@ int downloadpackages()
delete pck;
});
canceldownloads = false;
lastpackagesdownload = lastmillis;
return (int)total;
}