public TimePlugin(IConnectionManager connMgr, JObject config) { ConnectionManager = connMgr; Config = new TimeConfig(config); LoadTimeZoneData(); ConnectionManager.CommandManager.RegisterChannelMessageCommandHandler( new Command( CommandUtil.MakeNames("time", "ltime"), CommandUtil.NoOptions, CommandUtil.MakeArguments( RestTaker.Instance // location ), CommandUtil.MakeTags("fun"), forbiddenFlags: MessageFlags.UserBanned ), HandleTimeCommand ); ConnectionManager.CommandManager.RegisterChannelMessageCommandHandler( new Command( CommandUtil.MakeNames("interval"), CommandUtil.NoOptions, CommandUtil.MakeArguments( RestTaker.Instance // date/time ), CommandUtil.MakeTags("fun"), forbiddenFlags: MessageFlags.UserBanned ), HandleIntervalCommand ); }
public virtual void ReloadConfiguration(JObject newConfig) { Config = new TimeConfig(newConfig); PostConfigReload(); }