Exemplo n.º 1
0
        public SmileysPlugin(IConnectionManager connMgr, JObject config)
        {
            ConnectionManager = connMgr;
            Config            = new SmileysConfig(config);

            // it's a fun command in a channel and a useful command in private message
            ConnectionManager.CommandManager.RegisterChannelMessageCommandHandler(
                new Command(
                    CommandUtil.MakeNames("smileys", "smilies"),
                    tags: CommandUtil.MakeTags("fun"),
                    forbiddenFlags: MessageFlags.UserBanned
                    ),
                HandleSmileysCommand
                );
            ConnectionManager.CommandManager.RegisterQueryMessageCommandHandler(
                new Command(
                    CommandUtil.MakeNames("smileys", "smilies"),
                    tags: CommandUtil.NoTags,
                    forbiddenFlags: MessageFlags.UserBanned
                    ),
                HandleSmileysCommand
                );
        }
Exemplo n.º 2
0
 public virtual void ReloadConfiguration(JObject newConfig)
 {
     Config = new SmileysConfig(newConfig);
     PostConfigReload();
 }