Fix chat messages starting with numbers being stuffed on IRC

This commit is contained in:
UnknownShadow200 2018-06-16 16:01:43 +10:00
parent ed6a0bed16
commit adf174900c
3 changed files with 7 additions and 3 deletions

View File

@ -58,6 +58,10 @@ namespace MCGalaxy.Blocks.Physics {
return false;
}
// cache to avoid allocation each time accessed
internal static ExtraInfoHandler doorsHandler = DoDoorsOnly;
internal static ExtraInfoHandler normalHandler = DoNormal;
static void ParseType(byte type, ref ExtraInfoArgs args, byte value) {
switch (type) {
case PhysicsArgs.Wait:

View File

@ -135,10 +135,10 @@ namespace MCGalaxy {
const uint mask = PhysicsArgs.TypeMask;
HandlePhysics[] handlers = physicsHandlers;
ExtraInfoHandler extraHandler = ExtraInfoPhysics.DoNormal;
ExtraInfoHandler extraHandler = ExtraInfoPhysics.normalHandler;
if (physics == 5) {
handlers = physicsDoorsHandlers;
extraHandler = ExtraInfoPhysics.DoDoorsOnly;
extraHandler = ExtraInfoPhysics.doorsHandler;
}
PhysInfo C;

View File

@ -28,7 +28,7 @@ namespace MCGalaxy {
/// <summary> Manages a connection to an IRC server, and handles associated events. </summary>
public sealed class IRCBot {
public const string ResetSignal = "\x0F\x03";
public const string ResetSignal = "\x03\x0F";
internal Connection connection;
internal string[] channels, opchannels;
internal string nick, server;