Exemplo n.º 1
0
        public override void Load(bool startup)
        {
            config.LoadConfig();
            if (config.Token == "" || config.ChannelID == "")
            {
                Logger.Log(LogType.Warning, "Invalid config! Please setup the Discord bot in discord.properties! (plugin reload required)");
                return;
            }

            dc = new Discord.Discord(config.Token, config.ChannelID);

            OnPlayerConnectEvent.Register(PlayerConnect, Priority.Low);
            OnPlayerDisconnectEvent.Register(PlayerDisconnect, Priority.Low);
            OnPlayerChatEvent.Register(PlayerChat, Priority.Low);
            OnPlayerCommandEvent.Register(PlayerCommand, Priority.Low);
            OnModActionEvent.Register(ModAction, Priority.Low);

            OnMessageReceivedEvent.Register(DiscordMessage, Priority.Low);

            Command.Register(new CmdDiscordBot());
            registered = true;
        }
Exemplo n.º 2
0
 public override void Load(bool startup)
 {
     OnPlayerConnectEvent.Register(DoKickJini, Priority.High);
 }
Exemplo n.º 3
0
 public override void Load(bool startup)
 {
     OnPlayerConnectEvent.Register(DisableNagle, Priority.High);
 }
Exemplo n.º 4
0
 public override void Load(bool startup)
 {
     whitelist = PlayerList.Load("extra/vpnwhitelist.txt");
     OnPlayerConnectEvent.Register(HandlePlayerConnect, Priority.Low);
 }