|
@@ -24,18 +24,24 @@ package com.dmdirc;
|
24
|
24
|
|
25
|
25
|
import java.util.Date;
|
26
|
26
|
|
|
27
|
+import lombok.Getter;
|
|
28
|
+
|
27
|
29
|
/**
|
28
|
30
|
* Model for a channel invitation.
|
29
|
31
|
*/
|
|
32
|
+@SuppressWarnings("PMD.UnusedPrivateField")
|
30
|
33
|
public class Invite {
|
31
|
34
|
|
32
|
35
|
/** The server this invite was on. */
|
|
36
|
+ @Getter
|
33
|
37
|
private final Server server;
|
34
|
38
|
|
35
|
39
|
/** The channel this invite is for. */
|
|
40
|
+ @Getter
|
36
|
41
|
private final String channel;
|
37
|
42
|
|
38
|
43
|
/** The time this invite was created. */
|
|
44
|
+ @Getter
|
39
|
45
|
private final long timestamp;
|
40
|
46
|
|
41
|
47
|
/** The source of this invite. */
|
|
@@ -56,36 +62,10 @@ public class Invite {
|
56
|
62
|
}
|
57
|
63
|
|
58
|
64
|
/**
|
59
|
|
- * Retrieves the server that this invite is associated with.
|
60
|
|
- *
|
61
|
|
- * @return This invite's server
|
62
|
|
- */
|
63
|
|
- public Server getServer() {
|
64
|
|
- return server;
|
65
|
|
- }
|
66
|
|
-
|
67
|
|
- /**
|
68
|
|
- * Retrieves the name of the channel that this invite is for.
|
69
|
|
- *
|
70
|
|
- * @return This invite's channel
|
71
|
|
- */
|
72
|
|
- public String getChannel() {
|
73
|
|
- return channel;
|
74
|
|
- }
|
75
|
|
-
|
76
|
|
- /**
|
77
|
|
- * Retrieves the timestamp that this invite was received at.
|
78
|
|
- *
|
79
|
|
- * @return This invite's timestamp
|
80
|
|
- */
|
81
|
|
- public long getTimestamp() {
|
82
|
|
- return timestamp;
|
83
|
|
- }
|
84
|
|
-
|
85
|
|
- /**
|
86
|
|
- * Retrieves the nickname, ident and hostname of this invite's source.
|
|
65
|
+ * Retrieves the source of this invite.
|
87
|
66
|
*
|
88
|
67
|
* @return This invite's source
|
|
68
|
+ * @see Server#parseHostmask(java.lang.String)
|
89
|
69
|
*/
|
90
|
70
|
public String[] getSource() {
|
91
|
71
|
return server.parseHostmask(source);
|
|
@@ -98,7 +78,6 @@ public class Invite {
|
98
|
78
|
server.acceptInvites(this);
|
99
|
79
|
}
|
100
|
80
|
|
101
|
|
-
|
102
|
81
|
/**
|
103
|
82
|
* Decline this invite removing it from the invite list.
|
104
|
83
|
*/
|