Skip to content

Commit

Permalink
Unseal Discord/IRC bot classes
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Jul 25, 2024
1 parent 9dec181 commit 0bb1e53
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MCGalaxy/Modules/Relay/Discord/DiscordApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace MCGalaxy.Modules.Relay.Discord
/// <summary> Implements a basic web client for sending messages to the Discord API </summary>
/// <remarks> https://discord.com/developers/docs/reference </remarks>
/// <remarks> https://discord.com/developers/docs/resources/channel#create-message </remarks>
public sealed class DiscordApiClient : AsyncWorker<DiscordApiMessage>
public class DiscordApiClient : AsyncWorker<DiscordApiMessage>
{
public string Token;
public string Host;
Expand Down
2 changes: 1 addition & 1 deletion MCGalaxy/Modules/Relay/Discord/DiscordBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public override string GetMessagePrefix() {
}
}

public sealed class DiscordBot : RelayBot
public class DiscordBot : RelayBot
{
DiscordApiClient api;
DiscordWebsocket socket;
Expand Down
4 changes: 2 additions & 2 deletions MCGalaxy/Modules/Relay/Discord/DiscordWebsocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions and limitations under the Licenses.

namespace MCGalaxy.Modules.Relay.Discord
{
public sealed class DiscordSession
public class DiscordSession
{
public string ID, LastSeq;
public int Intents;
Expand All @@ -39,7 +39,7 @@ public sealed class DiscordSession
/// <summary> Implements a basic websocket for communicating with Discord's gateway </summary>
/// <remarks> https://discord.com/developers/docs/topics/gateway </remarks>
/// <remarks> https://i.imgur.com/Lwc5Wde.png </remarks>
public sealed class DiscordWebsocket : ClientWebSocket
public class DiscordWebsocket : ClientWebSocket
{
/// <summary> Authorisation token for the bot account </summary>
public string Token;
Expand Down
2 changes: 1 addition & 1 deletion MCGalaxy/Modules/Relay/IRC/IRCBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace MCGalaxy.Modules.Relay.IRC
public enum IRCControllerVerify { None, HalfOp, OpChannel };

/// <summary> Manages a connection to an IRC server, and handles associated events. </summary>
public sealed class IRCBot : RelayBot
public class IRCBot : RelayBot
{
internal Connection conn;
string botNick;
Expand Down
10 changes: 5 additions & 5 deletions MCGalaxy/util/OperatingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ protected virtual void RestartInPlace() {
execvp(runtime, new string[] { runtime, exePath, null });
Console.WriteLine("execvp {0} failed: {1}", runtime, Marshal.GetLastWin32Error());

#if !MCG_DOTNET
// .. and fallback to mono if that doesn't work for some reason
execvp("mono", new string[] { "mono", exePath, null });
Console.WriteLine("execvp mono failed: {0}", Marshal.GetLastWin32Error());
#endif
if (Server.RunningOnMono()) {
// .. and fallback to mono if that doesn't work for some reason
execvp("mono", new string[] { "mono", exePath, null });
Console.WriteLine("execvp mono failed: {0}", Marshal.GetLastWin32Error());
}
}

[DllImport("libc", SetLastError = true)]
Expand Down

0 comments on commit 0bb1e53

Please sign in to comment.