Ejemplo n.º 1
0
        public override void Execute()
        {
            User user = _persistance.GetUserFromIdent(_ident);

            if (!string.IsNullOrEmpty(user.Vhost))
            {
                var vhostOperCommmand = VhostOperCommmand.SetVhost(_nick, user.Vhost);
                OperCommands.Add(vhostOperCommmand);
            }
            if (user.AutoJoin)
            {
                foreach (var group in user.Groups)
                {
                    if (!string.IsNullOrEmpty(group.Channel))
                    {
                        var sajoinOperCommmand = SajoinOperCommmand.SetSaJoin(_nick, group.Channel);
                        OperCommands.Add(sajoinOperCommmand);
                        if (group.GroupAdmins.Contains(user))
                        {
                            var saModeOpsOperCommmand = SaModeOpsOperCommmand.SetSamode(_nick, group.Channel);
                            OperCommands.Add(saModeOpsOperCommmand);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
            User user = _persistance.GetUserInfo(Context.Ident);

            foreach (var group in user.Groups)
            {
                if (!string.IsNullOrEmpty(group.Channel))
                {
                    var sajoinCommand = SajoinOperCommmand.SetSaJoin(Context.User, group.Channel);
                    OperCommands.Add(sajoinCommand);
                    if (group.GroupAdmins.Contains(user))
                    {
                        var saModeCommand = SaModeOpsOperCommmand.SetSamode(Context.User, group.Channel);
                        OperCommands.Add(saModeCommand);
                    }
                }
            }
        }