From 2f462c3c4b529362ac84cdc5736513bd94daa552 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 24 Jan 2017 14:31:11 +1100 Subject: [PATCH] change default login message to 'joined' --- MCGalaxy/Commands/building/CmdTree.cs | 1 - MCGalaxy/Database/PlayerDB.cs | 2 +- MCGalaxy/Drawing/DrawOps/TreeDrawOp.cs | 2 +- MCGalaxy/Economy/MessageItems.cs | 4 ++-- MCGalaxy/sharkbite.thresher/NameGenerator.cs | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/MCGalaxy/Commands/building/CmdTree.cs b/MCGalaxy/Commands/building/CmdTree.cs index 9cf972d01..6fb3bd8f8 100644 --- a/MCGalaxy/Commands/building/CmdTree.cs +++ b/MCGalaxy/Commands/building/CmdTree.cs @@ -50,7 +50,6 @@ namespace MCGalaxy.Commands.Building { DrawArgs dArgs = (DrawArgs)state; TreeDrawOp op = new TreeDrawOp(); op.Tree = dArgs.tree; - op.random = new System.Random(); Brush brush = null; if (dArgs.brushMsg != "") { diff --git a/MCGalaxy/Database/PlayerDB.cs b/MCGalaxy/Database/PlayerDB.cs index e649221b0..99b5cd871 100644 --- a/MCGalaxy/Database/PlayerDB.cs +++ b/MCGalaxy/Database/PlayerDB.cs @@ -49,7 +49,7 @@ namespace MCGalaxy { if (File.Exists(path)) return CP437Reader.ReadAllText(path); // Unix is case sensitive (older files used correct casing of name) path = "text/login/" + p.name + ".txt"; - return File.Exists(path) ? CP437Reader.ReadAllText(path) : "joined the game."; + return File.Exists(path) ? CP437Reader.ReadAllText(path) : "joined"; } public static string GetLogoutMessage(Player p) { diff --git a/MCGalaxy/Drawing/DrawOps/TreeDrawOp.cs b/MCGalaxy/Drawing/DrawOps/TreeDrawOp.cs index f10522705..4fe2e0c3b 100644 --- a/MCGalaxy/Drawing/DrawOps/TreeDrawOp.cs +++ b/MCGalaxy/Drawing/DrawOps/TreeDrawOp.cs @@ -33,7 +33,7 @@ namespace MCGalaxy.Drawing.Ops { public class TreeDrawOp : DrawOp { public override string Name { get { return "Tree"; } } - public Random random; + public Random random = new Random(); public Tree Tree; static Brush defBrush = new SolidBrush(Block.leaf, 0); diff --git a/MCGalaxy/Economy/MessageItems.cs b/MCGalaxy/Economy/MessageItems.cs index 869214033..21c49bcf1 100644 --- a/MCGalaxy/Economy/MessageItems.cs +++ b/MCGalaxy/Economy/MessageItems.cs @@ -30,7 +30,7 @@ namespace MCGalaxy.Eco { protected override void DoPurchase(Player p, string message, string[] args) { if (args.Length == 1) { - Command.all.Find("loginmessage").Use(null, p.name + " joined the game."); + Command.all.Find("loginmessage").Use(null, p.name); Player.Message(p, "%aYour login message was removed for free."); return; } @@ -59,7 +59,7 @@ namespace MCGalaxy.Eco { protected override void DoPurchase(Player p, string message, string[] args) { if (args.Length == 1) { - Command.all.Find("logoutmessage").Use(null, p.name + " disconnected"); + Command.all.Find("logoutmessage").Use(null, p.name); Player.Message(p, "%aYour logout message was removed for free."); return; } diff --git a/MCGalaxy/sharkbite.thresher/NameGenerator.cs b/MCGalaxy/sharkbite.thresher/NameGenerator.cs index c8350a2d9..d140e7494 100644 --- a/MCGalaxy/sharkbite.thresher/NameGenerator.cs +++ b/MCGalaxy/sharkbite.thresher/NameGenerator.cs @@ -109,7 +109,6 @@ namespace Sharkbite.Irc } return char.ToUpper(newName[0] ) + newName.Substring(1); } - } }