

all_sites  = {'cntaobao','cnalichn','wangwang','chnyahoo','cnkoubei'}
exclude_info = {["cntaobao"]={'cnwujing','chnaigou','htyahooo'},['cnalichn']={'cnwujing','chnaigou','htyahooo'},['wangwang']={'cnwujing','chnaigou'},['chnyahoo']={'cnwujing','chnaigou','htyahooo'},['cnkoubei']={'cnwujing','chnaigou','htyahooo'}}
all_sites_include = {'cntaobao'}
include_info = {["cntaobao"]={'cntaobao','cnalichn'}}
--
--
function is_exclude(self_site, target_site)
	
	 local n = table.getn(all_sites);
	 local bFound = false;
	 for i= 1, n do
	 	if self_site == all_sites[i] then
	 		bFound = true;
	 		break;
	 	end	     
	 end
	 if not bFound then return false end;
	 local exclude_elm = exclude_info[self_site];
	 n = table.getn(exclude_elm);	
	 for i= 1, n do
	 	if target_site == exclude_elm[i] then
	 	--如果是旺号登录或者绑定了旺号,那么我就让他能发给雅虎通用户消息
	 		if 'htyahooo' == target_site then
	 			if IsBindWangHao() == true or IsWangHaoLogined() == true then
	 			
	 				return false;
	 			end
	 		end
	 		return true;
	 	end	     
	 end
	 return false;
end

function is_include(self_site, target_site)
	 local n = table.getn(all_sites);
     local bFound = false;
	 for i= 1, n do
		if self_site == all_sites_include[i] then
	 		bFound = true;
	 		break;
	 	end	     
	 end
	 if not bFound then return not is_exclude(self_site, target_site) end;
	
	 local include_elm = include_info[self_site];
	 n = table.getn(include_elm);	
	 for i= 1, n do
	 	if target_site == include_elm[i] then
	 		return true;
	 	end	     
	 end
	 return false;
end
