diff --git a/SCPDiscordPlugin/RoundEventHandler.cs b/SCPDiscordPlugin/RoundEventHandler.cs index 26f7d041..9bbd448e 100644 --- a/SCPDiscordPlugin/RoundEventHandler.cs +++ b/SCPDiscordPlugin/RoundEventHandler.cs @@ -17,7 +17,7 @@ public void OnRoundStart(RoundStartEvent ev) /// /// This is the event handler for Round start events (before people are spawned in) /// - plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onroundstart"), "Round started."); + plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onroundstart"), "**Round started.**"); } public void OnConnect(ConnectEvent ev) @@ -65,7 +65,7 @@ public void OnWaitingForPlayers(WaitingForPlayersEvent ev) /// /// This event handler will call when the server is waiting for players /// - plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onwaitingforplayers"), "Server is ready and waiting for players."); + plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onwaitingforplayers"), "**Server is ready and waiting for players.**"); } public void OnRoundRestart(RoundRestartEvent ev) diff --git a/SCPDiscordPlugin/SCPDiscord.cs b/SCPDiscordPlugin/SCPDiscord.cs index fb460144..0105a829 100644 --- a/SCPDiscordPlugin/SCPDiscord.cs +++ b/SCPDiscordPlugin/SCPDiscord.cs @@ -35,10 +35,6 @@ public override void Register() this.AddEventHandlers(new EnvironmentEventHandler(this)); this.AddEventHandlers(new TeamEventHandler(this)); - //Connection settings - this.AddConfig(new Smod2.Config.ConfigSetting("discord_bot_ip", "127.0.0.1", Smod2.Config.SettingType.STRING, true, "IP of the discord bot.")); - this.AddConfig(new Smod2.Config.ConfigSetting("discord_bot_port", 8888, Smod2.Config.SettingType.NUMERIC, true, "Port of the discord bot.")); - //Round events this.AddConfig(new Smod2.Config.ConfigSetting("discord_channel_onroundstart", "off", Smod2.Config.SettingType.STRING, true, "Discord channel to post event messages in.")); this.AddConfig(new Smod2.Config.ConfigSetting("discord_channel_onconnect", "off", Smod2.Config.SettingType.STRING, true, "Discord channel to post event messages in.")); @@ -90,8 +86,13 @@ public override void Register() public override void OnEnable() { + //Connection settings + this.AddConfig(new Smod2.Config.ConfigSetting("discord_bot_ip", "127.0.0.1", Smod2.Config.SettingType.STRING, true, "IP of the discord bot.")); + this.AddConfig(new Smod2.Config.ConfigSetting("discord_bot_port", 8888, Smod2.Config.SettingType.NUMERIC, true, "Port of the discord bot.")); + try { + this.Info("Your Bot IP: " + this.GetConfigString("discord_bot_ip") + ". Your Bot Port: " + this.GetConfigInt("discord_bot_port") + "."); clientSocket.Connect(this.GetConfigString("discord_bot_ip"), this.GetConfigInt("discord_bot_port")); } catch(SocketException e) diff --git a/SCPDiscordPlugin/TeamEventHandler.cs b/SCPDiscordPlugin/TeamEventHandler.cs index 708fe9e1..b42daf87 100644 --- a/SCPDiscordPlugin/TeamEventHandler.cs +++ b/SCPDiscordPlugin/TeamEventHandler.cs @@ -27,11 +27,11 @@ public void OnTeamRespawn(TeamRespawnEvent ev) /// if (!ev.SpawnChaos) { - plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onteamrespawn"), "MTF Epsilon-11 - \"Nine-Tailed Fox\" have arrived at the facility."); + plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onteamrespawn"), "**MTF Epsilon-11 - \"Nine-Tailed Fox\" have arrived at the facility.**"); } else { - plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onteamrespawn"), "Hostile incursion detected, intruders identified as members of hostile GOI \"Chaos Insurgency\"."); + plugin.SendMessageAsync(plugin.GetConfigString("discord_channel_onteamrespawn"), "**Hostile incursion detected, intruders identified as members of hostile GOI \"Chaos Insurgency\".**"); } }