Changing the last line to this should work:
Code:
/run SendChatMessage("Aethran cast Raise Ally on "..UnitName("mouseover")..".", UnitInBattleground("player") and "BATTLEGROUND" or IsInRaid() and "RAID" or IsInGroup() and "PARTY" or "SAY")
Note that I haven't tested it.
Edit: Changed to IsInRaid and IsInGroup instead of checking player count.