Skip to content

Commit

Permalink
Shut up a few CS1573 warnings
Browse files Browse the repository at this point in the history
Also testing irc bot feature
  • Loading branch information
123DMWM committed Jun 1, 2017
1 parent ea44be1 commit 870e484
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -3,6 +3,10 @@ solution: ProCraft.sln
notifications:
slack:
on_success: change
irc:
channels:
- "irc.esper.net#ProCraft"
on_success: change
script:
- loc_=/home/travis/build/123DMWM/ProCraft/bin/Release/
- ploc_=/home/travis/build/123DMWM/ProCraft/
Expand Down
7 changes: 7 additions & 0 deletions fCraft/Network/Packet.cs
Expand Up @@ -45,6 +45,7 @@ public partial struct Packet {
/// <param name="player"> Player to whom this packet is being sent.
/// Used to determine DeleteAdmincrete permission, for client-side checks. May not be null. </param>
/// <param name="motd"> Message-of-the-day (text displayed below the server name). May not be null. </param>
/// <param name="hasCP437"> If packet contains characters from CodePage 437 </param>
/// <exception cref="ArgumentNullException"> player, serverName, or motd is null </exception>
public static Packet MakeHandshake( [NotNull] Player player, [NotNull] string serverName, [NotNull] string motd, bool hasCP437 ) {
if( serverName == null ) throw new ArgumentNullException( "serverName" );
Expand Down Expand Up @@ -78,6 +79,8 @@ public partial struct Packet {
/// <param name="id"> Entity ID. Negative values refer to "self". </param>
/// <param name="name"> Entity name. May not be null. </param>
/// <param name="spawn"> Spawning position for the player. </param>
/// <param name="hasCP437"> If packet contains characters from CodePage 437 </param>
/// <param name="extPos"> If player supports Extended Positions </param>
/// <exception cref="ArgumentNullException"> name is null </exception>
public static Packet MakeAddEntity( sbyte id, [NotNull] string name, Position spawn,
bool hasCP437, bool extPos ) {
Expand All @@ -100,6 +103,7 @@ public partial struct Packet {
/// <summary> Creates a new Teleport (0x08) packet. </summary>
/// <param name="id"> Entity ID. Negative values refer to "self". </param>
/// <param name="newPosition"> Position to teleport the entity to. </param>
/// <param name="extPos"> If player supports Extended Positions </param>
public static Packet MakeTeleport( sbyte id, Position newPosition, bool extPos ) {
int size = PacketSizes[(byte)OpCode.Teleport];
if (extPos) size += 6;
Expand All @@ -116,6 +120,7 @@ public partial struct Packet {

/// <summary> Creates a new Teleport (0x08) packet, and sets ID to -1 ("self"). </summary>
/// <param name="newPosition"> Position to teleport player to. </param>
/// <param name="extPos"> If player supports Extended Positions </param>
public static Packet MakeSelfTeleport( Position newPosition, bool extPos ) {
return MakeTeleport( -1, newPosition.GetFixed(), extPos );
}
Expand Down Expand Up @@ -178,6 +183,7 @@ public partial struct Packet {
/// <param name="type"> Message type. </param>
/// <param name="message"> Message. </param>
/// <param name="useFallbacks"> whether or not to use color fallback codes. </param>
/// <param name="hasCP437"> If packet contains characters from CodePage 437 </param>
public static Packet Message(byte type, string message, bool useFallbacks, bool hasCP437) {
Packet packet = new Packet(OpCode.Message);
packet.Bytes[1] = type;
Expand All @@ -193,6 +199,7 @@ public partial struct Packet {

/// <summary> Creates a new Kick (0x0E) packet. </summary>
/// <param name="reason"> Given reason. Only first 64 characters will be sent. May not be null. </param>
/// <param name="hasCP437"> If packet contains characters from CodePage 437 </param>
/// <exception cref="ArgumentNullException"> reason is null </exception>
public static Packet MakeKick( [NotNull] string reason, bool hasCP437 ) {
if( reason == null ) throw new ArgumentNullException( "reason" );
Expand Down

0 comments on commit 870e484

Please sign in to comment.