Use !hi* for the match text, and inside the event handler use $1 and $2- to test for a valid trigger and text after !hi

Code:
on *:TEXT:!hi*:#:{
  if ($1 != !hi) { return }
  elseif (!$2-) { msg $chan hi $nick }
  else { msg $chan hi $nick you said $2- }
}


You can unset a variable as you desire using a timer with the -m option
Code:
if (%floodsay) { return }
set %floodsay On
.timer -m 1 1100 unset %floodsay