i would create a faction that is hostile towards imperials thalmor etc. this way if the player is any of these factions he will attack the player on sight. If you want him to only join the player if he is a storm cloak then set up a conditioned response in the dialogue, this is done through quests, i would tell you how but this site does it better. http://www.creationkit.com/Bethesda_Tutorial_Planning_the_Quest