join_prev_viking_society_society = { #join the society that own the button you pressed to join...
	if = { #if your mod have several societies, you can copy this "if" and make use it for the second society, this way this scripted effect will work for both society.
		limit = { PREV = { society_member_of = viking_society } }
		join_society = viking_society
	}
	# if = { #example of using this scripted effect for 2 society
		# limit = { PREV = { society_member_of = viking_society_example } }
		# join_society = viking_society_example
	# }
}

join_from_viking_society_society = { #join the society of someone
	FROM = {
		if = {
			limit = {
				society_member_of = viking_society
			}
			ROOT = {
				join_society = viking_society
			}
		}
	}
}