示例#1
0
        public bool SetBanned(ChannelMember member, string targetName, bool addBan)
        {
            IUser namedEntity = World.GetNamedEntity(targetName, true) as IUser;

            if (namedEntity != null)
            {
                return(this.SetBanned(member, namedEntity, false));
            }
            ChatMgr.SendChatPlayerNotFoundReply((IPacketReceiver)member.User, targetName);
            return(false);
        }
示例#2
0
        public bool SetBanned(ChannelMember member, string targetName, bool addBan)
        {
            var target = World.GetNamedEntity(targetName, true) as IUser;

            if (target != null)
            {
                return(SetBanned(member, target, false));
            }

            ChatMgr.SendChatPlayerNotFoundReply(member.User, targetName);
            return(false);
        }
示例#3
0
        public void Invite(ChannelMember inviter, string targetName)
        {
            IUser namedEntity = World.GetNamedEntity(targetName, false) as IUser;

            if (namedEntity != null)
            {
                this.Invite(inviter, namedEntity);
            }
            else
            {
                ChatMgr.SendChatPlayerNotFoundReply((IPacketReceiver)inviter.User, targetName);
            }
        }
示例#4
0
        public void Invite(ChannelMember inviter, string targetName)
        {
            var target = World.GetNamedEntity(targetName, false) as IUser;

            if (target != null)
            {
                Invite(inviter, target);
            }
            else
            {
                ChatMgr.SendChatPlayerNotFoundReply(inviter.User, targetName);
            }
        }
示例#5
0
 public void Invite(ChannelMember inviter, IUser target)
 {
     if (!target.IsIgnoring(inviter.User) || inviter.User.Role.IsStaff)
     {
         if (this.IsPresent(target.EntityId.Low))
         {
             ChannelHandler.SendAlreadyOnChannelReply((IPacketReceiver)inviter.User, target.Name,
                                                      target.EntityId);
         }
         else if (target.FactionGroup != inviter.User.FactionGroup)
         {
             ChannelHandler.SendWrongFaction((IPacketReceiver)inviter.User, this.m_name, target.Name);
         }
         else
         {
             ChannelHandler.SendInvitedMessage((IPacketReceiver)target, this.m_name, inviter.User.EntityId);
             ChannelHandler.SendYouInvitedReply((IPacketReceiver)inviter.User, this.m_name, target.Name);
         }
     }
     else
     {
         ChatMgr.SendChatPlayerNotFoundReply((IPacketReceiver)inviter.User, target.Name);
     }
 }
示例#6
0
 public void Invite(ChannelMember inviter, IUser target)
 {
     if (!target.IsIgnoring(inviter.User) || inviter.User.Role.IsStaff)
     {
         if (IsPresent(target.EntityId.Low))
         {
             ChannelHandler.SendAlreadyOnChannelReply(inviter.User, target.Name, target.EntityId);
         }
         else if (target.FactionGroup != inviter.User.FactionGroup)
         {
             ChannelHandler.SendWrongFaction(inviter.User, m_name, target.Name);
         }
         else
         {
             // TODO: all other checks (eg ban etc)
             ChannelHandler.SendInvitedMessage(target, m_name, inviter.User.EntityId);
             ChannelHandler.SendYouInvitedReply(inviter.User, m_name, target.Name);
         }
     }
     else
     {
         ChatMgr.SendChatPlayerNotFoundReply(inviter.User, target.Name);
     }
 }