Ejemplo n.º 1
0
        public SockpuppetPlugin(IConnectionManager connMgr, JObject config)
        {
            ConnectionManager = connMgr;
            Config            = new SockpuppetConfig(config);

            ConnectionManager.CommandManager.RegisterQueryMessageCommandHandler(
                new Command(
                    CommandUtil.MakeNames("sockpuppet"),
                    CommandUtil.NoOptions,
                    CommandUtil.MakeArguments(
                        RestTaker.Instance // raw IRC command
                        ),
                    forbiddenFlags: MessageFlags.UserBanned
                    ),
                HandleSockpuppetCommand
                );
            ConnectionManager.CommandManager.RegisterQueryMessageCommandHandler(
                new Command(
                    CommandUtil.MakeNames("reload"),
                    forbiddenFlags: MessageFlags.UserBanned
                    ),
                HandleReloadCommand
                );
        }
Ejemplo n.º 2
0
 public virtual void ReloadConfiguration(JObject newConfig)
 {
     Config = new SockpuppetConfig(newConfig);
     PostConfigReload();
 }