Updated version of the alias code.
It now checks weather AutoAcceptDccSend is set already. If not, it enables and disables it before and after the transfer.
# Sends a delayed XDCC send request
# /xdccdelay <int:delay in minutes> <string:bot> <int:package number>
# Check for correct syntax
%go = 1
if (($isnumeric($0))!=1) %go=0;
if ($str.len($1)<1) %go=0;
if (($isnumeric($2))!=1) %go=0;
if(%go)
{
%delay = $($0*60*1000); # converts minutes to miliseconds
# some feedback
echo "|"time = $0"min" = %delay"ms"
echo "|"bot = $1
echo "|""package number = "$2
timer -s (xdccdelay,%delay,$1,$2)
{
%botname = $0
%packnum = $1
%aaceptval = $option(boolAutoAcceptDccSend)
echo %aaceptval
if (%aaceptval==0)
{
option boolAutoAcceptDccSend 1; #allow all dcc
echo ">>" boolAutoAcceptDccSend 1
}
privmsg %botname XDCC SEND %packnum; #send dcc request
if (%aaceptval==0)
{
killtimer -q aaccept
timer -s (aaccept, 60000)
{ #wait 60 seconds
option boolAutoAcceptDccSend 0; #disable allow all dcc
echo ">>" boolAutoAcceptDccSend 0
}
echo "> Auto-Accept TIMER INITIALISED"
}
echo DONE
}
echo "> xdccdelay TIMER INITIALISED"
} else {
echo "SYNTAX: /xdccdelay <int:delay in minutes> <string:bot> <int:package number>"
}