Updated messageBuffer to parse out newline names.

This commit is contained in:
Shank 2011-05-30 20:41:08 -06:00
parent 97524f1e02
commit 40e1f11b61
3 changed files with 12 additions and 4 deletions

View file

@ -53,6 +53,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View file

@ -9,7 +9,7 @@ namespace Terraria
{
class ShankShock
{
private static double version = 3;
private static double version = 4;
private static bool shownVersion = false;
public static bool killGuide = true;
@ -308,8 +308,7 @@ namespace Terraria
{
if (banTnt) { _writeGrief(ply); }
ShankShock.Broadcast(FindPlayer(ply) + " was " + (banTnt ? "banned " : "kicked ") + "for kill tile abuse.");
if (kickTnt) { Kick(ply); }
if (kickTnt) { ShankShock.Broadcast(FindPlayer(ply) + " was " + (banTnt ? "banned " : "kicked ") + "for kill tile abuse."); Kick(ply); }
}
private static void _writeGrief(int ply)

View file

@ -610,6 +610,11 @@
Main.player[num7].shoeColor.B = this.readBuffer[index];
index++;
string text = Encoding.ASCII.GetString(this.readBuffer, index, (length - index) + start);
text = text.Replace("\\", "");
if (text == "" || text == " ")
{
text = "mingebag";
}
Main.player[num7].name = text;
if (Main.netMode == 2)
{
@ -1082,7 +1087,7 @@
ShankShock.SendMessage(this.whoAmI, "/p - Talk in party chat");
if (ShankShock.IsAdmin(this.whoAmI))
{
ShankShock.SendMessage(this.whoAmI, "/kick | /ban | /eater | /hardcore");
ShankShock.SendMessage(this.whoAmI, "/kick | /ban | /eater | /hardcore | /skeletron");
ShankShock.SendMessage(this.whoAmI, "/invade | /dropmeteor | /bloodmoon | /eye");
}
return;