I told you how to number them and then delete them.

You have to k eep track of the order in a hash table. The item number doesn't get saved in order. Do not store the data in the item name, store it in the data section.

/hadd seen $nick $+($event,|,$chan,|,$network,|,$ctime)

I suggested you add an integer to the item name so you know the order. You could evaluate the time and find the latest time but that would take a lot of parsing. When you add the entry, simply include the number. Since it will be the last item entered, the number would be the total of items in the table plus 1.

/hadd seen $+($calc($hget(seen,0).item + 1),.,$nick) $+($event,|,$chan,|,$network,|,$ctime)

This will be stored as 1.Nickname event|chan|network|ctime.

To delete the last entry, you could use this:

/hdel -w seen $+($hget(seen,0).item,.*)

If you wanted to delete the last 5...

Code:
var %total = $hget(seen,0).item, %last5 = $calc(%total - 5)
while (%last5 <= %total) {
hdel -w seen $+(%last5,.*)
inc %last5
}


This code and idea wouldn't work well if you wanted to remove the 25th entry in a list of 200. It will only work successfully if you are removing the last entries of the list. Since that is what you specifically asked for, this is the simplest solution I can think of.

Also, I wrote this here without testing. Let me know if you have issues.