I really should urge you to switch to my variables based script and leave the hash tables. You are only saving very little data. Hash tables are designed for large amounts of data, and there is nothing to gain when you only have small amounts of data.
The elseif error is fixed by adding a ) at the designated place. What exactly are the other errors you get?
elseif (!$istok(%offline,$notify(%notify),32[color:red])[/color])
Actually it will need some extra fixing: everytime you add a nick to %onlineN, check if it is in %offline via the $istok identifier similar to what I used, and if found, use $deltok or $remtok to delete the nick from %offline.