Skip to content

Commit d4dfe19

Browse files
committed
Add undocumented ip flag to command "clientlist".
This means both Client and ClientInfo can now return getIp() and we can move this method to the base class Client.
1 parent 60a6db6 commit d4dfe19

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/main/java/com/github/theholywaffle/teamspeak3/api/wrapper/Client.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public int getInheritedChannelGroupId() {
8181
return getInt(ClientProperty.CLIENT_CHANNEL_GROUP_INHERITED_CHANNEL_ID);
8282
}
8383

84+
public String getIp() {
85+
return get(ClientProperty.CONNECTION_CLIENT_IP);
86+
}
87+
8488
public Date getLastConnectedDate() {
8589
return new Date(getLong(ClientProperty.CLIENT_LASTCONNECTED) * 1000);
8690
}

src/main/java/com/github/theholywaffle/teamspeak3/api/wrapper/ClientInfo.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ public long getFiletransferBandwidthSent() {
9191
return getLong(ClientProperty.CONNECTION_FILETRANSFER_BANDWIDTH_SENT);
9292
}
9393

94-
public String getIp() {
95-
return get(ClientProperty.CONNECTION_CLIENT_IP);
96-
}
97-
9894
public String getLoginName() {
9995
return get(ClientProperty.CLIENT_LOGIN_NAME);
10096
}

src/main/java/com/github/theholywaffle/teamspeak3/commands/CClientList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public CClientList() {
4040
add(new OptionParam("info"));
4141
add(new OptionParam("icon"));
4242
add(new OptionParam("country"));
43+
add(new OptionParam("ip"));
4344
}
4445

4546
}

0 commit comments

Comments
 (0)