I personally don't know anything about hash tables and sadly wouldn't know where to start although I'm sure this would be a good and useful script for newbies and advanced users if someone was to make this script and post it somewhere on here or wherever, by the way i changed the keyword
from this:-
on ^*:OPEN:?:*$decode*: {
too on ^*:OPEN:?:*//write $decode*: {
incase i accidently kick people for pming me asking what $decode means or is.