mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-27 15:30:58 -04:00
Fix players being announced on IRC when admins-join-silent is set to true. (Thanks venom983)
This commit is contained in:
parent
fddbd360d9
commit
df3ee22bba
@ -148,6 +148,7 @@ namespace MCGalaxy {
|
||||
void Player_PlayerConnect(Player p) {
|
||||
if (!Server.irc || !IsConnected()) return;
|
||||
if (!Server.guestJoinNotify && p.group.Permission <= LevelPermission.Guest) return;
|
||||
if (!p.hidden)
|
||||
connection.Sender.PublicMessage(channel, p.name + " joined the game");
|
||||
}
|
||||
|
||||
|
@ -760,15 +760,9 @@ namespace MCGalaxy {
|
||||
SetPrefix();
|
||||
playerDb.Dispose();
|
||||
|
||||
if (PlayerConnect != null)
|
||||
PlayerConnect(this);
|
||||
OnPlayerConnectEvent.Call(this);
|
||||
|
||||
if (Server.server_owner != "" && Server.server_owner.ToLower().Equals(name.ToLower())) {
|
||||
if (color == Group.standard.color)
|
||||
color = "&c";
|
||||
if (title == "")
|
||||
title = "Owner";
|
||||
if (color == Group.standard.color) color = "&c";
|
||||
if (title == "") title = "Owner";
|
||||
SetPrefix();
|
||||
}
|
||||
|
||||
@ -780,8 +774,22 @@ namespace MCGalaxy {
|
||||
if (!File.Exists("text/login/" + this.name + ".txt"))
|
||||
CP437Writer.WriteAllText("text/login/" + this.name + ".txt", "joined the server.");
|
||||
|
||||
CheckLoginJailed();
|
||||
string joinm = "&a+ " + this.FullName + Server.DefaultColor + " " + File.ReadAllText("text/login/" + this.name + ".txt");
|
||||
if (group.Permission < Server.adminchatperm || !Server.adminsjoinsilent) {
|
||||
if ((Server.guestJoinNotify && group.Permission <= LevelPermission.Guest) || group.Permission > LevelPermission.Guest) {
|
||||
PlayerInfo.players.ForEach(p1 => Player.SendMessage(p1, joinm));
|
||||
}
|
||||
}
|
||||
if (group.Permission >= Server.adminchatperm && Server.adminsjoinsilent) {
|
||||
hidden = true;
|
||||
adminchat = true;
|
||||
}
|
||||
|
||||
if (PlayerConnect != null)
|
||||
PlayerConnect(this);
|
||||
OnPlayerConnectEvent.Call(this);
|
||||
|
||||
CheckLoginJailed();
|
||||
if (Server.agreetorulesonentry) {
|
||||
if (!File.Exists("ranks/agreed.txt"))
|
||||
File.WriteAllText("ranks/agreed.txt", "");
|
||||
@ -792,19 +800,6 @@ namespace MCGalaxy {
|
||||
}
|
||||
}
|
||||
|
||||
string joinm = "&a+ " + this.FullName + Server.DefaultColor + " " + File.ReadAllText("text/login/" + this.name + ".txt");
|
||||
if (group.Permission < Server.adminchatperm || Server.adminsjoinsilent == false)
|
||||
{
|
||||
if ((Server.guestJoinNotify && group.Permission <= LevelPermission.Guest) || group.Permission > LevelPermission.Guest)
|
||||
{
|
||||
PlayerInfo.players.ForEach(p1 => Player.SendMessage(p1, joinm));
|
||||
}
|
||||
}
|
||||
if (group.Permission >= Server.adminchatperm && Server.adminsjoinsilent) {
|
||||
hidden = true;
|
||||
adminchat = true;
|
||||
}
|
||||
|
||||
if (Server.verifyadmins && group.Permission >= Server.verifyadminsrank) {
|
||||
if (!Directory.Exists("extra/passwords") || !File.Exists("extra/passwords/" + this.name + ".dat"))
|
||||
SendMessage("&cPlease set your admin verification password with &a/setpass [Password]!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user