mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 20:16:36 -04:00
Fix last commit
This commit is contained in:
parent
be7765797c
commit
fd4fc7189e
@ -24,7 +24,7 @@ namespace MCGalaxy.Core {
|
||||
|
||||
internal static void HandleOnChat(ChatScope scope, Player source, ref string msg,
|
||||
object arg, ref ChatMessageFilter filter, bool irc) {
|
||||
msg = msg.Replace("λFULL", source.name).Replace("λNICK", source.name);
|
||||
string text = msg.Replace("λFULL", source.name).Replace("λNICK", source.name);
|
||||
LogType logType = LogType.PlayerChat;
|
||||
|
||||
if (scope == ChatScope.Perms) {
|
||||
@ -35,7 +35,7 @@ namespace MCGalaxy.Core {
|
||||
logType = LogType.RankChat;
|
||||
}
|
||||
|
||||
if (scope != ChatScope.PM) Logger.Log(logType, msg);
|
||||
if (scope != ChatScope.PM) Logger.Log(logType, text);
|
||||
}
|
||||
|
||||
internal static void HandleCommand(Player p, string cmd, string args, CommandData data) {
|
||||
|
@ -52,9 +52,9 @@ namespace MCGalaxy.SQL
|
||||
}
|
||||
|
||||
static string[] colTypes = new string[] {
|
||||
"TINYINT UNSIGNED", "SMALLINT UNSIGNED", "MEDIUMINT UNSIGNED",
|
||||
"INT UNSIGNED", "BIGINT UNSIGNED", "TINYINT", "SMALLINT",
|
||||
"MEDIUMINT", "INT", "BIGINT", "INTEGER", "DATETIME",
|
||||
"TINYINT UNSIGNED", "SMALLINT UNSIGNED", "MEDIUMINT UNSIGNED", "INT UNSIGNED", "BIGINT UNSIGNED",
|
||||
"TINYINT", "SMALLINT", "MEDIUMINT", "INT", "BIGINT",
|
||||
"INTEGER", "DATETIME",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -325,24 +325,24 @@ namespace MCGalaxy.Modules.Relay
|
||||
ref ChatMessageFilter filter, bool relay) {
|
||||
if (!relay) return;
|
||||
|
||||
msg = PrepareMessage(msg);
|
||||
MessageToRelay(scope, msg, arg, filter);
|
||||
string text = PrepareMessage(msg);
|
||||
MessageToRelay(scope, text, arg, filter);
|
||||
}
|
||||
|
||||
void OnChatFrom(ChatScope scope, Player source, ref string msg,
|
||||
object arg, ref ChatMessageFilter filter, bool relay) {
|
||||
if (!relay) return;
|
||||
|
||||
msg = PrepareMessage(msg);
|
||||
MessageToRelay(scope, Unescape(source, msg), arg, filter);
|
||||
string text = PrepareMessage(msg);
|
||||
MessageToRelay(scope, Unescape(source, text), arg, filter);
|
||||
}
|
||||
|
||||
void OnChat(ChatScope scope, Player source, ref string msg,
|
||||
object arg, ref ChatMessageFilter filter, bool relay) {
|
||||
if (!relay) return;
|
||||
|
||||
msg = PrepareMessage(msg);
|
||||
MessageToRelay(scope, Unescape(source, msg), arg, filter);
|
||||
string text = PrepareMessage(msg);
|
||||
MessageToRelay(scope, Unescape(source, text), arg, filter);
|
||||
}
|
||||
|
||||
void OnShutdown(bool restarting, string message) {
|
||||
|
@ -44,7 +44,7 @@ namespace MCGalaxy.Network
|
||||
/// <summary> Initialises state to begin asynchronously sending and receiving data </summary>
|
||||
public abstract void Init();
|
||||
/// <summary> Sends a block of data </summary>
|
||||
public abstract void Send(byte[] buffer, SendFlags flags);
|
||||
public abstract void Send(byte[] buffer, SendFlags flags);
|
||||
/// <summary> Closes this network socket </summary>
|
||||
public abstract void Close();
|
||||
|
||||
|
@ -20,15 +20,16 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
#if NET_20
|
||||
namespace System.Runtime.CompilerServices {
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
|
||||
public sealed class ExtensionAttribute : Attribute {}
|
||||
}
|
||||
|
||||
namespace MCGalaxy.Util {
|
||||
|
||||
public sealed class IReaderWriterLock {
|
||||
|
||||
namespace MCGalaxy.Util
|
||||
{
|
||||
public sealed class IReaderWriterLock
|
||||
{
|
||||
ReaderWriterLock locker = new ReaderWriterLock();
|
||||
|
||||
public IDisposable AccquireRead() { return AccquireRead(int.MaxValue); }
|
||||
@ -53,7 +54,8 @@ namespace MCGalaxy.Util {
|
||||
}
|
||||
|
||||
|
||||
class SlimLock : IDisposable {
|
||||
class SlimLock : IDisposable
|
||||
{
|
||||
ReaderWriterLock locker;
|
||||
bool writeMode;
|
||||
|
||||
|
@ -19,10 +19,10 @@ using System;
|
||||
using System.Threading;
|
||||
|
||||
#if !NET_20
|
||||
namespace MCGalaxy.Util {
|
||||
|
||||
public sealed class IReaderWriterLock {
|
||||
|
||||
namespace MCGalaxy.Util
|
||||
{
|
||||
public sealed class IReaderWriterLock
|
||||
{
|
||||
ReaderWriterLockSlim locker = new ReaderWriterLockSlim();
|
||||
|
||||
public IDisposable AccquireRead() { return AccquireRead(-1); }
|
||||
@ -37,9 +37,9 @@ namespace MCGalaxy.Util {
|
||||
if (!locker.TryEnterWriteLock(msTimeout)) return null;
|
||||
return new SlimLock(locker, true);
|
||||
}
|
||||
|
||||
|
||||
class SlimLock : IDisposable {
|
||||
|
||||
class SlimLock : IDisposable
|
||||
{
|
||||
ReaderWriterLockSlim locker;
|
||||
bool writeMode;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user