mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-08 22:25:42 +12:00
Start adding custom banners
This commit is contained in:
parent
eb025b177a
commit
74b948fe61
4 changed files with 20 additions and 2 deletions
|
@ -35,6 +35,11 @@ enable_word_filter=true
|
||||||
# (NOTE: This feature is also used to filter some less-'bad' words disabling it will allow users to say them!)
|
# (NOTE: This feature is also used to filter some less-'bad' words disabling it will allow users to say them!)
|
||||||
enable_corrections=true
|
enable_corrections=true
|
||||||
|
|
||||||
|
# Custom Banner Settings
|
||||||
|
# This will replace the "Connected to server!" message
|
||||||
|
enable_custom_banner=false
|
||||||
|
custom_banner=HISP Alpha 0.1
|
||||||
|
|
||||||
# Wether or not to consider all users "Subscribers"
|
# Wether or not to consider all users "Subscribers"
|
||||||
all_users_subscribed=false
|
all_users_subscribed=false
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,13 @@ namespace HISP.Server
|
||||||
public static string MapFile;
|
public static string MapFile;
|
||||||
public static string GameDataFile;
|
public static string GameDataFile;
|
||||||
public static string CrossDomainPolicyFile;
|
public static string CrossDomainPolicyFile;
|
||||||
public static bool Debug;
|
public static string BannerText;
|
||||||
|
|
||||||
|
public static bool Debug;
|
||||||
public static bool AllUsersSubbed;
|
public static bool AllUsersSubbed;
|
||||||
public static bool BadWords;
|
public static bool BadWords;
|
||||||
public static bool DoCorrections;
|
public static bool DoCorrections;
|
||||||
|
public static bool CustomBanner;
|
||||||
|
|
||||||
public const int MAX_STACK = 40;
|
public const int MAX_STACK = 40;
|
||||||
|
|
||||||
|
@ -90,6 +92,12 @@ namespace HISP.Server
|
||||||
case "gamedata":
|
case "gamedata":
|
||||||
GameDataFile = data;
|
GameDataFile = data;
|
||||||
break;
|
break;
|
||||||
|
case "enable_custom_banner":
|
||||||
|
CustomBanner = data == "true";
|
||||||
|
break;
|
||||||
|
case "custom_banner":
|
||||||
|
BannerText = data;
|
||||||
|
break;
|
||||||
case "crossdomain":
|
case "crossdomain":
|
||||||
CrossDomainPolicyFile = data;
|
CrossDomainPolicyFile = data;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -332,6 +332,11 @@ namespace HISP.Server
|
||||||
receivePackets();
|
receivePackets();
|
||||||
});
|
});
|
||||||
recvPackets.Start();
|
recvPackets.Start();
|
||||||
|
|
||||||
|
if(ConfigReader.CustomBanner)
|
||||||
|
{
|
||||||
|
byte[] loginFailedPacket = PacketBuilder.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ namespace HISP.Server
|
||||||
return Packet;
|
return Packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] CreateLoginPacket(bool Success)
|
public static byte[] CreateLoginPacket(bool Success, string message="")
|
||||||
{
|
{
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
ms.WriteByte(PACKET_LOGIN);
|
ms.WriteByte(PACKET_LOGIN);
|
||||||
|
|
Loading…
Add table
Reference in a new issue