Example #1
0
        public override void Execute()
        {
            User user = _persistance.GetUserInfo(Mapping[SetAutoJoinArguments.Username]);

            if (user.AutoJoin)
            {
                _persistance.DisableAutoJoin(Mapping[SetAutoJoinArguments.Username]);
                Messages.Add(string.Format("Autojoin disabled for user {0}. Run the command again to enable.", Mapping[SetAutoJoinArguments.Username]));
            }
            else
            {
                _persistance.EnableAutoJoin(Mapping[SetAutoJoinArguments.Username]);
                Messages.Add(string.Format("Autojoin enabled for user {0}. Run the command again to disable.", Mapping[SetAutoJoinArguments.Username]));
            }
        }