mirror of
https://github.com/deavminet/dnetd
synced 2024-09-21 01:33:24 +02:00
Zero-extend (not sign) due to implciti integer promotion
This commit is contained in:
parent
6837d290bd
commit
53bbf8710c
@ -202,55 +202,55 @@ public class DConnection : Thread
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Command getCommand(byte commandByte)
|
private Command getCommand(ubyte commandByte)
|
||||||
{
|
{
|
||||||
Command command = Command.UNKNOWN;
|
Command command = Command.UNKNOWN;
|
||||||
|
|
||||||
if(commandByte == cast(ulong)0)
|
if(commandByte == 0)
|
||||||
{
|
{
|
||||||
command = Command.AUTH;
|
command = Command.AUTH;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)1)
|
else if(commandByte == 1)
|
||||||
{
|
{
|
||||||
command = Command.LINK;
|
command = Command.LINK;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)2)
|
else if(commandByte == 2)
|
||||||
{
|
{
|
||||||
command = Command.REGISTER;
|
command = Command.REGISTER;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)3)
|
else if(commandByte == 3)
|
||||||
{
|
{
|
||||||
command = Command.JOIN;
|
command = Command.JOIN;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)4)
|
else if(commandByte == 4)
|
||||||
{
|
{
|
||||||
command = Command.PART;
|
command = Command.PART;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)5)
|
else if(commandByte == 5)
|
||||||
{
|
{
|
||||||
command = Command.MSG;
|
command = Command.MSG;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)6)
|
else if(commandByte == 6)
|
||||||
{
|
{
|
||||||
command = Command.LIST;
|
command = Command.LIST;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)7)
|
else if(commandByte == 7)
|
||||||
{
|
{
|
||||||
command = Command.MSG;
|
command = Command.MSG;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)8)
|
else if(commandByte == 8)
|
||||||
{
|
{
|
||||||
command = Command.MEMBER_COUNT;
|
command = Command.MEMBER_COUNT;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)9)
|
else if(commandByte == 9)
|
||||||
{
|
{
|
||||||
command = Command.MEMBER_LIST;
|
command = Command.MEMBER_LIST;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)10)
|
else if(commandByte == 10)
|
||||||
{
|
{
|
||||||
command = Command.SERVER_INFO;
|
command = Command.SERVER_INFO;
|
||||||
}
|
}
|
||||||
else if(commandByte == cast(ulong)11)
|
else if(commandByte == 11)
|
||||||
{
|
{
|
||||||
command = Command.MOTD;
|
command = Command.MOTD;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user