mhm...
should probably learn to be more clear in the future...
Ill try it, even though i meant it to be $get rather then $send
And i see that i should probably be more clear now.
The reason for this to be done is that i cant get a trigger when i close the inactive dcc get window. why i want the trigger on that is for the reason that i want my treeview switchbar reloaded, otherwise it keeps the information it got from the last trigger (ie. the getfail).. id get a screenshot to show what i mean if there were any to send a file (everybodys away/busy).
Now, the code i have for the trigger that wont work:
ctcp *:dcc send *:?:{
unset %dcc.get
var %n = 1
while ($get(%n)) {
set %dcc.get $addtok(%dcc.get,$ifmatch,32)
inc %n
}
[color:red]
;This sets another var and starts another timer that checks to see if the
;send has started (ie. been accepted)[/color]
[color:green] set %dcc.acc $true
.timerdcc.acc 0 1 dcc.acc
[color:red];switchbar reload[/color]
.timer -m 1 1 load.switchbar
}[/color]
[color:red];The above makes a variable that contains the nick of the send
;(Online and Nimue: yeah i know it wont work with more then 1 sender)[/color]
[color:green]
alias dcc.acc {
if (!%dcc.acc) { .timerdcc.acc off | halt }
elseif ($get(0) >= 1) {
var %n = 1
while ($get(%n)) {
if ($get(%n).rcvd > 1) {
.timer -m 1 1 load.switchbar
unset %dcc.acc
}
inc %n
}
}
elseif ($send(0) >= 1) {
var %x = 1
while ($send(%x)) {
if ($send(%x).sent > 1) {
.timer -m 1 1 load.switchbar
unset %dcc.acc
}
inc %x
}
}
}
[/color]
[color:red];OT: /me is listening to the last night of the proms :D
;The above is the alias that checks if the sends/gets have been accepted and
;have started to send the file[/color]
[color:green]
on *:getfail:*:{
.timer -m 1 1 load.switchbar
.timerdcc.canc 0 1 dcc.canc
echo -a Failed to receive $nopath($filename) from $nick ( $+ $_comchan($nick) $+ )
}
[/color]
[color:red];Starts the timer that starts the alias that checks for any closed windows, more of that below[/color]
[color:green]
alias dcc.canc {
if ($get(0) < $numtok(%dcc.get,32)) { .timer -m 1 1 load.switchbar | .timerdcc.canc off }
else { .timerdcc.canc off | halt }
}[/color]
[color:red];Above checks the %dcc.get variable and trys to match the amount of open dcc
;get windows with the amount that was accepted, if
;less than the var, it updates the switchbar. (the else i added in hope for a miracle so dont
;bother about it unless u figure its important[/color]
REMEMBER! ask questions first, shoot later! thx to those of the repliers, for their insight in this question.