Exemplo n.º 1
0
        public GroupNameCheckResult CheckGroupName(string guildName)
        {
            GroupNameCheckResult groupNameCheckResult = GuildAPI._CheckGroupName(guildName);

            if (groupNameCheckResult == GroupNameCheckResult.Succeed)
            {
                if (GuildContents.HasForbiddenWords(guildName))
                {
                    return(GroupNameCheckResult.NotMatchedNamingRule);
                }
                try
                {
                    HeroesGuildDBDataContext heroesGuildDBDataContext = new HeroesGuildDBDataContext();
                    Log <GuildAPI> .Logger.InfoFormat("CheckGroupName: ServerCode[{0}], GuildName[{1}]", GuildAPI.ServerCode, guildName);

                    if (heroesGuildDBDataContext.GuildCheckGroupName(new int?(GuildAPI.ServerCode), guildName) == 0)
                    {
                        return(GroupNameCheckResult.Succeed);
                    }
                    return(GroupNameCheckResult.DuplicatedName);
                }
                catch (Exception ex)
                {
                    Log <GuildService> .Logger.Error("잘못된 길드명입니다", ex);

                    groupNameCheckResult = GroupNameCheckResult.DuplicatedName;
                }
                return(groupNameCheckResult);
            }
            return(groupNameCheckResult);
        }
Exemplo n.º 2
0
        public GroupNameCheckResult CheckGroupName(string guildName)
        {
            GroupNameCheckResult groupNameCheckResult = GuildAPI._CheckGroupName(guildName);

            if (groupNameCheckResult == GroupNameCheckResult.Succeed)
            {
                try
                {
                    Log <GuildAPI> .Logger.InfoFormat("CheckGroupName: ServerCode[{0}], GuildName[{1}]", GuildAPI.ServerCode, guildName);

                    HeroesGuild.CheckGroupName(GuildAPI.ServerCode, guildName);
                    return(GroupNameCheckResult.Succeed);
                }
                catch (Exception ex)
                {
                    Log <GuildService> .Logger.Error("잘못된 길드명입니다", ex);

                    groupNameCheckResult = GroupNameCheckResult.DuplicatedName;
                }
                return(groupNameCheckResult);
            }
            return(groupNameCheckResult);
        }