This ones going to take a little explaining..
the code comes in 2 parts.. in 2 seperate "modules" in my eggdrop..
the second part takes a varable (string) and then "arrays" it and, if "matches" the current $arg, returns 0 and then outputs a line to the chatroom.. this part of the script works FLAWLESS
heres the element of the code I'm referring to.. its a PART of a much larger command set and it would be meaningless to display the whole command set; this part is enough to get the jist, however...
Code: Select all
} elseif {([catch {foreach I [split $DataPQ "\r\n"] {if {($I == $arg)} {return "0";};};}])} {
putquick "NOTICE $nick :Request query rejected - Query Item has just been played!";
};
now, what I need to do is generate $DataPQ.. which is simply a list of 10 numbers of the "last played items" which are derived from another varable ($DetPY) on a "once-per-entry" basis at the time each item is played...
again, this is just a partial..
Code: Select all
set DataPY "$VarD\r\n";
set DataPQ [append DataPQ $DataPY];
($DataPY will be a number of a "playing" item)
Now, the HARD part...
I need to create this list in a way so that each item can be "singled out" AND that the varable $DataPQ holds SPECIFICALLY 10 items- and for each item that enters thereafter, will cause the FIRST item to be ejected!
example:
assume 10 items..
"100 101 102 103 104 105 106 107 108 109 110"
now comes in 111...
"101 102,103 104 105 106 107 108 109 110 111"
and so on and so on...
admittingly, I'm spent a considerable amout of time on this "issue" and that I'm now cranky and tired over it.. any advice and suggestions would be appreciated!
thanks!
-DjZ-

