Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from NOT-FOUND-404-UI/patch-1
Browse files Browse the repository at this point in the history
Update PhiClient.cs
  • Loading branch information
emipa606 authored May 24, 2022
2 parents 0850f04 + 03628b0 commit aebb850
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Source/PhiClient/PhiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,20 @@ public void TryConnect()
Disconnect();
}

client = new Client(serverAddress, 16180);
// Edited by [NOT-FOUND-404-UI]
// ---------------------------------------------------------------
int serverPort = new int();
if (0 <= serverAddress.IndexOf(":")) {
string[] temp = new string[2];
temp = serverAddress.Split(':');
serverAddress = temp[0];
serverPort = int.Parse(temp[1]);
} else {
serverPort = PORT;
}
client = new Client(serverAddress, serverPort);
// ---------------------------------------------------------------
//client = new Client(serverAddress,16180);
client.Connection += ConnectionCallback;
client.Message += MessageCallback;
client.Disconnection += DisconnectCallback;
Expand Down Expand Up @@ -382,4 +395,4 @@ public void ChangeNickname(string newNickname)
});
}
}
}
}

0 comments on commit aebb850

Please sign in to comment.