blob: dd4ed514b988ef49623b50229a864f49deb3cbf6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package NET.worlds.network;
import java.io.IOException;
public class ChannelCmd extends netPacket {
public static final byte CHANNELCMD = 31;
protected String _channel;
public ChannelCmd(String channel) {
super(null, 31);
this._channel = channel;
}
@Override
int packetSize() {
return 1 + ServerOutputStream.utfLength(this._channel) + super.packetSize();
}
@Override
void send(ServerOutputStream o) throws IOException {
super.send(o);
o.writeUTF(this._channel);
}
@Override
public String toString(WorldServer serv) {
return "CHANNEL " + this._channel;
}
}
|