If you just have this check sitting at the end of the tenser spell script, it performs the check instantly and exactly once, at the moment the spell is cast. The statement will always evaluate true at this time - caster's current action during the spell's script is 4, aka ACTION_CASTSPELL.
I don't know much about retrieving effects and spell crap generated by a different script. Assuming it works ok, you can have the spell script trigger a self-re-running script on the caster that checks every second or so for a casting action and kills the effects.
something like
void main()
{
if (GetHasSpellEffect(184)) // tenser's SPELLID
{
if (GetCurrentAction() == 4) // casting while tenser is on, nyoooo~~~
{
effect eToRemove = GetFirstEffect(OBJECT_SELF);
while (GetIsEffectValid(eToRemove))
{
if (GetEffectSpellId(eToRemove) == 184) RemoveEffect(OBJECT_SELF, eToRemove);
eToRemove = GetNextEffect(OBJECT_SELF);
}
}
else DelayCommand(1.0, ExecuteScript("this_very_script_again", OBJECT_SELF));
// See ya again in 1.0 seconds!
}
}
Can't think of a less cpu-intensive way to do it