|
@@ -1724,6 +1724,35 @@ public class Server extends WritableFrameContainer<ServerWindow> implements Conf
|
1724
|
1724
|
}
|
1725
|
1725
|
}
|
1726
|
1726
|
|
|
1727
|
+ /**
|
|
1728
|
+ * Attempts to accept the specified invites, and join the corresponding
|
|
1729
|
+ * channels.
|
|
1730
|
+ *
|
|
1731
|
+ * @param invites The invites to process
|
|
1732
|
+ * @since 0.6.4
|
|
1733
|
+ */
|
|
1734
|
+ public void acceptInvites(final Invite ... invites) {
|
|
1735
|
+ final ChannelJoinRequest[] requests = new ChannelJoinRequest[invites.length];
|
|
1736
|
+
|
|
1737
|
+ for (int i = 0; i < invites.length; i++) {
|
|
1738
|
+ requests[i] = new ChannelJoinRequest(invites[i].getChannel());
|
|
1739
|
+ }
|
|
1740
|
+
|
|
1741
|
+ join(requests);
|
|
1742
|
+ }
|
|
1743
|
+
|
|
1744
|
+ /**
|
|
1745
|
+ * Attempts to accept all active invites for this server, and join the
|
|
1746
|
+ * corresponding channels.
|
|
1747
|
+ *
|
|
1748
|
+ * @since 0.6.4
|
|
1749
|
+ */
|
|
1750
|
+ public void acceptInvites() {
|
|
1751
|
+ synchronized (invites) {
|
|
1752
|
+ acceptInvites(invites.toArray(new Invite[invites.size()]));
|
|
1753
|
+ }
|
|
1754
|
+ }
|
|
1755
|
+
|
1727
|
1756
|
/**
|
1728
|
1757
|
* Removes all invites for the specified channel.
|
1729
|
1758
|
*
|