Dani, neither your example will respond. You changed the variable name to %floodnick, which doesn't match the first conditional check for it. This is efficiently done with a regex though:
on $*:TEXT:/^!(?i)(youtube|google)( |$)/S:#:{
if (%floodnick [ $+ [ $nick ] ]) halt | set -u3 %Floodnick [ $+ [ $nick ] ] . | var %s $replace($$2-,$chr(32),+)
if !$strip($2) { notice $nick $+(http://,$iif($regml(1) != google,youtube,google),.com) }
elseif ($regml(1) == google) msg # 3your google search: $+(http://www.google.com/search?q=,%s)
else msg # 3Your Youtube Search: $2- $+ : http://www.youtube.com/results?search_query= $+ %s $+ &search_type=&aq=f
}
You don't really need the -e switch because upon existing, the timed var will be unset anyway. And you only need one check for $2 and $replace($2,$chr(32),+) with a variable to apply to all the routines.