Browse Source

Add events for each CallbackInterface.

pull/42/head
Greg Holmes 9 years ago
parent
commit
1b5e00eabf
67 changed files with 3564 additions and 0 deletions
  1. 44
    0
      common/src/com/dmdirc/parser/events/AuthNoticeEvent.java
  2. 58
    0
      common/src/com/dmdirc/parser/events/AwayStateEvent.java
  3. 59
    0
      common/src/com/dmdirc/parser/events/ChannelActionEvent.java
  4. 65
    0
      common/src/com/dmdirc/parser/events/ChannelCTCPEvent.java
  5. 65
    0
      common/src/com/dmdirc/parser/events/ChannelCTCPReplyEvent.java
  6. 53
    0
      common/src/com/dmdirc/parser/events/ChannelJoinEvent.java
  7. 72
    0
      common/src/com/dmdirc/parser/events/ChannelKickEvent.java
  8. 52
    0
      common/src/com/dmdirc/parser/events/ChannelListModeEvent.java
  9. 65
    0
      common/src/com/dmdirc/parser/events/ChannelMessageEvent.java
  10. 65
    0
      common/src/com/dmdirc/parser/events/ChannelModeChangeEvent.java
  11. 72
    0
      common/src/com/dmdirc/parser/events/ChannelModeMessageEvent.java
  12. 72
    0
      common/src/com/dmdirc/parser/events/ChannelModeNoticeEvent.java
  13. 45
    0
      common/src/com/dmdirc/parser/events/ChannelNamesEvent.java
  14. 59
    0
      common/src/com/dmdirc/parser/events/ChannelNickChangeEvent.java
  15. 66
    0
      common/src/com/dmdirc/parser/events/ChannelNonUserModeChangeEvent.java
  16. 65
    0
      common/src/com/dmdirc/parser/events/ChannelNoticeEvent.java
  17. 67
    0
      common/src/com/dmdirc/parser/events/ChannelOtherAwayStateEvent.java
  18. 59
    0
      common/src/com/dmdirc/parser/events/ChannelPartEvent.java
  19. 59
    0
      common/src/com/dmdirc/parser/events/ChannelQuitEvent.java
  20. 45
    0
      common/src/com/dmdirc/parser/events/ChannelSelfJoinEvent.java
  21. 66
    0
      common/src/com/dmdirc/parser/events/ChannelSingleModeChangeEvent.java
  22. 52
    0
      common/src/com/dmdirc/parser/events/ChannelTopicEvent.java
  23. 72
    0
      common/src/com/dmdirc/parser/events/ChannelUserModeChangeEvent.java
  24. 52
    0
      common/src/com/dmdirc/parser/events/CompositionStateChangeEvent.java
  25. 45
    0
      common/src/com/dmdirc/parser/events/ConnectErrorEvent.java
  26. 44
    0
      common/src/com/dmdirc/parser/events/DataInEvent.java
  27. 44
    0
      common/src/com/dmdirc/parser/events/DataOutEvent.java
  28. 51
    0
      common/src/com/dmdirc/parser/events/DebugInfoEvent.java
  29. 45
    0
      common/src/com/dmdirc/parser/events/ErrorInfoEvent.java
  30. 37
    0
      common/src/com/dmdirc/parser/events/GroupListEndEvent.java
  31. 57
    0
      common/src/com/dmdirc/parser/events/GroupListEntryEvent.java
  32. 37
    0
      common/src/com/dmdirc/parser/events/GroupListStartEvent.java
  33. 51
    0
      common/src/com/dmdirc/parser/events/InviteEvent.java
  34. 51
    0
      common/src/com/dmdirc/parser/events/MOTDEndEvent.java
  35. 44
    0
      common/src/com/dmdirc/parser/events/MOTDLineEvent.java
  36. 44
    0
      common/src/com/dmdirc/parser/events/MOTDStartEvent.java
  37. 57
    0
      common/src/com/dmdirc/parser/events/NetworkDetectedEvent.java
  38. 52
    0
      common/src/com/dmdirc/parser/events/NickChangeEvent.java
  39. 44
    0
      common/src/com/dmdirc/parser/events/NickInUseEvent.java
  40. 51
    0
      common/src/com/dmdirc/parser/events/NumericEvent.java
  41. 59
    0
      common/src/com/dmdirc/parser/events/OtherAwayStateEvent.java
  42. 49
    0
      common/src/com/dmdirc/parser/events/ParserEvent.java
  43. 37
    0
      common/src/com/dmdirc/parser/events/PasswordRequiredEvent.java
  44. 37
    0
      common/src/com/dmdirc/parser/events/PingFailureEvent.java
  45. 37
    0
      common/src/com/dmdirc/parser/events/PingSentEvent.java
  46. 37
    0
      common/src/com/dmdirc/parser/events/PingSuccessEvent.java
  47. 51
    0
      common/src/com/dmdirc/parser/events/PrivateActionEvent.java
  48. 57
    0
      common/src/com/dmdirc/parser/events/PrivateCTCPEvent.java
  49. 57
    0
      common/src/com/dmdirc/parser/events/PrivateCTCPReplyEvent.java
  50. 51
    0
      common/src/com/dmdirc/parser/events/PrivateMessageEvent.java
  51. 51
    0
      common/src/com/dmdirc/parser/events/PrivateNoticeEvent.java
  52. 52
    0
      common/src/com/dmdirc/parser/events/QuitEvent.java
  53. 44
    0
      common/src/com/dmdirc/parser/events/ServerErrorEvent.java
  54. 51
    0
      common/src/com/dmdirc/parser/events/ServerNoticeEvent.java
  55. 37
    0
      common/src/com/dmdirc/parser/events/ServerReadyEvent.java
  56. 37
    0
      common/src/com/dmdirc/parser/events/SocketCloseEvent.java
  57. 57
    0
      common/src/com/dmdirc/parser/events/UnknownActionEvent.java
  58. 63
    0
      common/src/com/dmdirc/parser/events/UnknownCTCPEvent.java
  59. 63
    0
      common/src/com/dmdirc/parser/events/UnknownCTCPReplyEvent.java
  60. 57
    0
      common/src/com/dmdirc/parser/events/UnknownMessageEvent.java
  61. 57
    0
      common/src/com/dmdirc/parser/events/UnknownNoticeEvent.java
  62. 57
    0
      common/src/com/dmdirc/parser/events/UnknownServerNoticeEvent.java
  63. 58
    0
      common/src/com/dmdirc/parser/events/UserModeChangeEvent.java
  64. 52
    0
      common/src/com/dmdirc/parser/events/UserModeDiscoveryEvent.java
  65. 51
    0
      common/src/com/dmdirc/parser/events/WallDesyncEvent.java
  66. 51
    0
      common/src/com/dmdirc/parser/events/WallopEvent.java
  67. 51
    0
      common/src/com/dmdirc/parser/events/WalluserEvent.java

+ 44
- 0
common/src/com/dmdirc/parser/events/AuthNoticeEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Used on every incomming line before 001.
31
+ */
32
+public class AuthNoticeEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+
36
+    public AuthNoticeEvent(final Parser parser, final Date date, final String message) {
37
+        super(parser, date);
38
+        this.message = message;
39
+    }
40
+
41
+    public String getMessage() {
42
+        return message;
43
+    }
44
+}

+ 58
- 0
common/src/com/dmdirc/parser/events/AwayStateEvent.java View File

@@ -0,0 +1,58 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.AwayState;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when we go away, or come back.
32
+ */
33
+public class AwayStateEvent extends ParserEvent {
34
+
35
+    private final AwayState oldState;
36
+    private final AwayState newState;
37
+    private final String reason;
38
+
39
+    public AwayStateEvent(final Parser parser, final Date date, final AwayState oldState,
40
+            final AwayState newState, final String reason) {
41
+        super(parser, date);
42
+        this.oldState = oldState;
43
+        this.newState = newState;
44
+        this.reason = reason;
45
+    }
46
+
47
+    public AwayState getOldState() {
48
+        return oldState;
49
+    }
50
+
51
+    public AwayState getNewState() {
52
+        return newState;
53
+    }
54
+
55
+    public String getReason() {
56
+        return reason;
57
+    }
58
+}

+ 59
- 0
common/src/com/dmdirc/parser/events/ChannelActionEvent.java View File

@@ -0,0 +1,59 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person does an action in a channel.
33
+ */
34
+public class ChannelActionEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String message;
39
+
40
+    public ChannelActionEvent(final Parser parser, final Date date, final ChannelInfo channel,
41
+            final ChannelClientInfo client, final String message) {
42
+        super(parser, date);
43
+        this.channel = channel;
44
+        this.client = client;
45
+        this.message = message;
46
+    }
47
+
48
+    public ChannelInfo getChannel() {
49
+        return channel;
50
+    }
51
+
52
+    public ChannelClientInfo getClient() {
53
+        return client;
54
+    }
55
+
56
+    public String getMessage() {
57
+        return message;
58
+    }
59
+}

+ 65
- 0
common/src/com/dmdirc/parser/events/ChannelCTCPEvent.java View File

@@ -0,0 +1,65 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a CTCP to a channel.
33
+ */
34
+public class ChannelCTCPEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String type;
39
+    private final String message;
40
+
41
+    public ChannelCTCPEvent(final Parser parser, final Date date, final ChannelInfo channel,
42
+            final ChannelClientInfo client, final String type, final String message) {
43
+        super(parser, date);
44
+        this.channel = channel;
45
+        this.client = client;
46
+        this.type = type;
47
+        this.message = message;
48
+    }
49
+
50
+    public ChannelInfo getChannel() {
51
+        return channel;
52
+    }
53
+
54
+    public ChannelClientInfo getClient() {
55
+        return client;
56
+    }
57
+
58
+    public String getType() {
59
+        return type;
60
+    }
61
+
62
+    public String getMessage() {
63
+        return message;
64
+    }
65
+}

+ 65
- 0
common/src/com/dmdirc/parser/events/ChannelCTCPReplyEvent.java View File

@@ -0,0 +1,65 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a CTCPRReply to a channel.
33
+ */
34
+public class ChannelCTCPReplyEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String type;
39
+    private final String message;
40
+
41
+    public ChannelCTCPReplyEvent(final Parser parser, final Date date, final ChannelInfo channel,
42
+            final ChannelClientInfo client, final String type, final String message) {
43
+        super(parser, date);
44
+        this.channel = channel;
45
+        this.client = client;
46
+        this.type = type;
47
+        this.message = message;
48
+    }
49
+
50
+    public ChannelInfo getChannel() {
51
+        return channel;
52
+    }
53
+
54
+    public ChannelClientInfo getClient() {
55
+        return client;
56
+    }
57
+
58
+    public String getType() {
59
+        return type;
60
+    }
61
+
62
+    public String getMessage() {
63
+        return message;
64
+    }
65
+}

+ 53
- 0
common/src/com/dmdirc/parser/events/ChannelJoinEvent.java View File

@@ -0,0 +1,53 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called When we, or another client joins a channel.
33
+ */
34
+public class ChannelJoinEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+
39
+    public ChannelJoinEvent(final Parser parser, final Date date, final ChannelInfo channel,
40
+            final ChannelClientInfo client) {
41
+        super(parser, date);
42
+        this.channel = channel;
43
+        this.client = client;
44
+    }
45
+
46
+    public ChannelInfo getChannel() {
47
+        return channel;
48
+    }
49
+
50
+    public ChannelClientInfo getClient() {
51
+        return client;
52
+    }
53
+}

+ 72
- 0
common/src/com/dmdirc/parser/events/ChannelKickEvent.java View File

@@ -0,0 +1,72 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person is kicked.
33
+ */
34
+public class ChannelKickEvent extends ParserEvent {
35
+
36
+    final ChannelInfo channel;
37
+    final ChannelClientInfo kickedClient;
38
+    final ChannelClientInfo client;
39
+    final String reason;
40
+    final String host;
41
+
42
+    public ChannelKickEvent(final Parser parser, final Date date, final ChannelInfo channel,
43
+            final ChannelClientInfo kickedClient, final ChannelClientInfo client,
44
+            final String reason, final String host) {
45
+        super(parser, date);
46
+        this.channel = channel;
47
+        this.kickedClient = kickedClient;
48
+        this.client = client;
49
+        this.reason = reason;
50
+        this.host = host;
51
+    }
52
+
53
+    public ChannelInfo getChannel() {
54
+        return channel;
55
+    }
56
+
57
+    public ChannelClientInfo getKickedClient() {
58
+        return kickedClient;
59
+    }
60
+
61
+    public ChannelClientInfo getClient() {
62
+        return client;
63
+    }
64
+
65
+    public String getReason() {
66
+        return reason;
67
+    }
68
+
69
+    public String getHost() {
70
+        return host;
71
+    }
72
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/ChannelListModeEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when all requested ListModes have been sent.
32
+ */
33
+public class ChannelListModeEvent extends ParserEvent {
34
+
35
+    private final ChannelInfo channel;
36
+    private final char mode;
37
+
38
+    public ChannelListModeEvent(final Parser parser, final Date date, final ChannelInfo channel,
39
+            final char mode) {
40
+        super(parser, date);
41
+        this.channel = channel;
42
+        this.mode = mode;
43
+    }
44
+
45
+    public ChannelInfo getChannel() {
46
+        return channel;
47
+    }
48
+
49
+    public char getMode() {
50
+        return mode;
51
+    }
52
+}

+ 65
- 0
common/src/com/dmdirc/parser/events/ChannelMessageEvent.java View File

@@ -0,0 +1,65 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a message to a channel.
33
+ */
34
+public class ChannelMessageEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String message;
39
+    private final String host;
40
+
41
+    public ChannelMessageEvent(final Parser parser, final Date date, final ChannelInfo channel,
42
+            final ChannelClientInfo client, final String message, final String host) {
43
+        super(parser, date);
44
+        this.channel = channel;
45
+        this.client = client;
46
+        this.message = message;
47
+        this.host = host;
48
+    }
49
+
50
+    public ChannelInfo getChannel() {
51
+        return channel;
52
+    }
53
+
54
+    public ChannelClientInfo getClient() {
55
+        return client;
56
+    }
57
+
58
+    public String getMessage() {
59
+        return message;
60
+    }
61
+
62
+    public String getHost() {
63
+        return host;
64
+    }
65
+}

+ 65
- 0
common/src/com/dmdirc/parser/events/ChannelModeChangeEvent.java View File

@@ -0,0 +1,65 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when the channel modes are changed or discovered.
33
+ */
34
+public class ChannelModeChangeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String host;
39
+    private final String modes;
40
+
41
+    public ChannelModeChangeEvent(final Parser parser, final Date date, final ChannelInfo channel,
42
+            final ChannelClientInfo client, final String host, final String modes) {
43
+        super(parser, date);
44
+        this.channel = channel;
45
+        this.client = client;
46
+        this.host = host;
47
+        this.modes = modes;
48
+    }
49
+
50
+    public ChannelInfo getChannel() {
51
+        return channel;
52
+    }
53
+
54
+    public ChannelClientInfo getClient() {
55
+        return client;
56
+    }
57
+
58
+    public String getHost() {
59
+        return host;
60
+    }
61
+
62
+    public String getModes() {
63
+        return modes;
64
+    }
65
+}

+ 72
- 0
common/src/com/dmdirc/parser/events/ChannelModeMessageEvent.java View File

@@ -0,0 +1,72 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a Message to a channel with a mode prefix.
33
+ */
34
+public class ChannelModeMessageEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final char prefix;
38
+    private final ChannelClientInfo client;
39
+    private final String message;
40
+    private final String host;
41
+
42
+    public ChannelModeMessageEvent(final Parser parser, final Date date, final ChannelInfo channel,
43
+            final char prefix, final ChannelClientInfo client, final String message,
44
+            final String host) {
45
+        super(parser, date);
46
+        this.channel = channel;
47
+        this.prefix = prefix;
48
+        this.client = client;
49
+        this.message = message;
50
+        this.host = host;
51
+    }
52
+
53
+    public ChannelInfo getChannel() {
54
+        return channel;
55
+    }
56
+
57
+    public char getPrefix() {
58
+        return prefix;
59
+    }
60
+
61
+    public ChannelClientInfo getClient() {
62
+        return client;
63
+    }
64
+
65
+    public String getMessage() {
66
+        return message;
67
+    }
68
+
69
+    public String getHost() {
70
+        return host;
71
+    }
72
+}

+ 72
- 0
common/src/com/dmdirc/parser/events/ChannelModeNoticeEvent.java View File

@@ -0,0 +1,72 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a notice to a channel with a mode prefix.
33
+ */
34
+public class ChannelModeNoticeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final char prefix;
38
+    private final ChannelClientInfo client;
39
+    private final String message;
40
+    private final String host;
41
+
42
+    public ChannelModeNoticeEvent(final Parser parser, final Date date, final ChannelInfo channel,
43
+            final char prefix, final ChannelClientInfo client, final String message,
44
+            final String host) {
45
+        super(parser, date);
46
+        this.channel = channel;
47
+        this.prefix = prefix;
48
+        this.client = client;
49
+        this.message = message;
50
+        this.host = host;
51
+    }
52
+
53
+    public ChannelInfo getChannel() {
54
+        return channel;
55
+    }
56
+
57
+    public char getPrefix() {
58
+        return prefix;
59
+    }
60
+
61
+    public ChannelClientInfo getClient() {
62
+        return client;
63
+    }
64
+
65
+    public String getMessage() {
66
+        return message;
67
+    }
68
+
69
+    public String getHost() {
70
+        return host;
71
+    }
72
+}

+ 45
- 0
common/src/com/dmdirc/parser/events/ChannelNamesEvent.java View File

@@ -0,0 +1,45 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when a names reply is parsed.
32
+ */
33
+public class ChannelNamesEvent extends ParserEvent {
34
+
35
+    private final ChannelInfo channel;
36
+
37
+    public ChannelNamesEvent(final Parser parser, final Date date, final ChannelInfo channel) {
38
+        super(parser, date);
39
+        this.channel = channel;
40
+    }
41
+
42
+    public ChannelInfo getChannel() {
43
+        return channel;
44
+    }
45
+}

+ 59
- 0
common/src/com/dmdirc/parser/events/ChannelNickChangeEvent.java View File

@@ -0,0 +1,59 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when we or another user change nickname (Called once per channel the user is on).
33
+ */
34
+public class ChannelNickChangeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String oldNick;
39
+
40
+    public ChannelNickChangeEvent(final Parser parser, final Date date, final ChannelInfo channel,
41
+            final ChannelClientInfo client, final String oldNick) {
42
+        super(parser, date);
43
+        this.channel = channel;
44
+        this.client = client;
45
+        this.oldNick = oldNick;
46
+    }
47
+
48
+    public ChannelInfo getChannel() {
49
+        return channel;
50
+    }
51
+
52
+    public ChannelClientInfo getClient() {
53
+        return client;
54
+    }
55
+
56
+    public String getOldNick() {
57
+        return oldNick;
58
+    }
59
+}

+ 66
- 0
common/src/com/dmdirc/parser/events/ChannelNonUserModeChangeEvent.java View File

@@ -0,0 +1,66 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when the channel modes are changed or discovered.
33
+ */
34
+public class ChannelNonUserModeChangeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String host;
39
+    private final String modes;
40
+
41
+    public ChannelNonUserModeChangeEvent(final Parser parser, final Date date,
42
+            final ChannelInfo channel, final ChannelClientInfo client, final String host,
43
+            final String modes) {
44
+        super(parser, date);
45
+        this.channel = channel;
46
+        this.client = client;
47
+        this.host = host;
48
+        this.modes = modes;
49
+    }
50
+
51
+    public ChannelInfo getChannel() {
52
+        return channel;
53
+    }
54
+
55
+    public ChannelClientInfo getClient() {
56
+        return client;
57
+    }
58
+
59
+    public String getHost() {
60
+        return host;
61
+    }
62
+
63
+    public String getModes() {
64
+        return modes;
65
+    }
66
+}

+ 65
- 0
common/src/com/dmdirc/parser/events/ChannelNoticeEvent.java View File

@@ -0,0 +1,65 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when a person sends a notice to a channel.
33
+ */
34
+public class ChannelNoticeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String message;
39
+    private final String host;
40
+
41
+    public ChannelNoticeEvent(final Parser parser, final Date date, final ChannelInfo channel,
42
+            final ChannelClientInfo client, final String message, final String host) {
43
+        super(parser, date);
44
+        this.channel = channel;
45
+        this.client = client;
46
+        this.message = message;
47
+        this.host = host;
48
+    }
49
+
50
+    public ChannelInfo getChannel() {
51
+        return channel;
52
+    }
53
+
54
+    public ChannelClientInfo getClient() {
55
+        return client;
56
+    }
57
+
58
+    public String getMessage() {
59
+        return message;
60
+    }
61
+
62
+    public String getHost() {
63
+        return host;
64
+    }
65
+}

+ 67
- 0
common/src/com/dmdirc/parser/events/ChannelOtherAwayStateEvent.java View File

@@ -0,0 +1,67 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.AwayState;
26
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
27
+import com.dmdirc.parser.interfaces.ChannelInfo;
28
+import com.dmdirc.parser.interfaces.Parser;
29
+
30
+import java.util.Date;
31
+
32
+/**
33
+ * Called when we go away, or come back.
34
+ */
35
+public class ChannelOtherAwayStateEvent extends ParserEvent {
36
+
37
+    private final ChannelInfo channel;
38
+    private final ChannelClientInfo client;
39
+    private final AwayState oldState;
40
+    private final AwayState newState;
41
+
42
+    public ChannelOtherAwayStateEvent(final Parser parser, final Date date,
43
+            final ChannelInfo channel, final ChannelClientInfo client, final AwayState oldState,
44
+            final AwayState newState) {
45
+        super(parser, date);
46
+        this.channel = channel;
47
+        this.client = client;
48
+        this.oldState = oldState;
49
+        this.newState = newState;
50
+    }
51
+
52
+    public ChannelInfo getChannel() {
53
+        return channel;
54
+    }
55
+
56
+    public ChannelClientInfo getClient() {
57
+        return client;
58
+    }
59
+
60
+    public AwayState getOldState() {
61
+        return oldState;
62
+    }
63
+
64
+    public AwayState getNewState() {
65
+        return newState;
66
+    }
67
+}

+ 59
- 0
common/src/com/dmdirc/parser/events/ChannelPartEvent.java View File

@@ -0,0 +1,59 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called When we, or another client parts a channel.
33
+ */
34
+public class ChannelPartEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String reason;
39
+
40
+    public ChannelPartEvent(final Parser parser, final Date date, final ChannelInfo channel,
41
+            final ChannelClientInfo client, final String reason) {
42
+        super(parser, date);
43
+        this.channel = channel;
44
+        this.client = client;
45
+        this.reason = reason;
46
+    }
47
+
48
+    public ChannelInfo getChannel() {
49
+        return channel;
50
+    }
51
+
52
+    public ChannelClientInfo getClient() {
53
+        return client;
54
+    }
55
+
56
+    public String getReason() {
57
+        return reason;
58
+    }
59
+}

+ 59
- 0
common/src/com/dmdirc/parser/events/ChannelQuitEvent.java View File

@@ -0,0 +1,59 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called When we, or another client quits IRC (Called once per channel the user was on).
33
+ */
34
+public class ChannelQuitEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String reason;
39
+
40
+    public ChannelQuitEvent(final Parser parser, final Date date, final ChannelInfo channel,
41
+            final ChannelClientInfo client, final String reason) {
42
+        super(parser, date);
43
+        this.channel = channel;
44
+        this.client = client;
45
+        this.reason = reason;
46
+    }
47
+
48
+    public ChannelInfo getChannel() {
49
+        return channel;
50
+    }
51
+
52
+    public ChannelClientInfo getClient() {
53
+        return client;
54
+    }
55
+
56
+    public String getReason() {
57
+        return reason;
58
+    }
59
+}

+ 45
- 0
common/src/com/dmdirc/parser/events/ChannelSelfJoinEvent.java View File

@@ -0,0 +1,45 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when we join a channel.
32
+ */
33
+public class ChannelSelfJoinEvent extends ParserEvent {
34
+
35
+    private final ChannelInfo channel;
36
+
37
+    public ChannelSelfJoinEvent(final Parser parser, final Date date, final ChannelInfo channel) {
38
+        super(parser, date);
39
+        this.channel = channel;
40
+    }
41
+
42
+    public ChannelInfo getChannel() {
43
+        return channel;
44
+    }
45
+}

+ 66
- 0
common/src/com/dmdirc/parser/events/ChannelSingleModeChangeEvent.java View File

@@ -0,0 +1,66 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when the channel modes are changed or discovered.
33
+ */
34
+public class ChannelSingleModeChangeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo client;
38
+    private final String host;
39
+    private final String modes;
40
+
41
+    public ChannelSingleModeChangeEvent(final Parser parser, final Date date,
42
+            final ChannelInfo channel, final ChannelClientInfo client, final String host,
43
+            final String modes) {
44
+        super(parser, date);
45
+        this.channel = channel;
46
+        this.client = client;
47
+        this.host = host;
48
+        this.modes = modes;
49
+    }
50
+
51
+    public ChannelInfo getChannel() {
52
+        return channel;
53
+    }
54
+
55
+    public ChannelClientInfo getClient() {
56
+        return client;
57
+    }
58
+
59
+    public String getHost() {
60
+        return host;
61
+    }
62
+
63
+    public String getModes() {
64
+        return modes;
65
+    }
66
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/ChannelTopicEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when the topic is changed or discovered for the first time.
32
+ */
33
+public class ChannelTopicEvent extends ParserEvent {
34
+
35
+    private final ChannelInfo channel;
36
+    private final boolean isJoinTopic;
37
+
38
+    public ChannelTopicEvent(final Parser parser, final Date date, final ChannelInfo channel,
39
+            final boolean isJoinTopic) {
40
+        super(parser, date);
41
+        this.channel = channel;
42
+        this.isJoinTopic = isJoinTopic;
43
+    }
44
+
45
+    public ChannelInfo getChannel() {
46
+        return channel;
47
+    }
48
+
49
+    public boolean isJoinTopic() {
50
+        return isJoinTopic;
51
+    }
52
+}

+ 72
- 0
common/src/com/dmdirc/parser/events/ChannelUserModeChangeEvent.java View File

@@ -0,0 +1,72 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
26
+import com.dmdirc.parser.interfaces.ChannelInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ *  Called when a users channel mode is changed.
33
+ */
34
+public class ChannelUserModeChangeEvent extends ParserEvent {
35
+
36
+    private final ChannelInfo channel;
37
+    private final ChannelClientInfo targetClient;
38
+    private final ChannelClientInfo client;
39
+    private final String host;
40
+    private final String mode;
41
+
42
+    public ChannelUserModeChangeEvent(final Parser parser, final Date date,
43
+            final ChannelInfo channel, final ChannelClientInfo targetClient,
44
+            final ChannelClientInfo client, final String host, final String mode) {
45
+        super(parser, date);
46
+        this.channel = channel;
47
+        this.targetClient = targetClient;
48
+        this.client = client;
49
+        this.host = host;
50
+        this.mode = mode;
51
+    }
52
+
53
+    public ChannelInfo getChannel() {
54
+        return channel;
55
+    }
56
+
57
+    public ChannelClientInfo getTargetClient() {
58
+        return targetClient;
59
+    }
60
+
61
+    public ChannelClientInfo getClient() {
62
+        return client;
63
+    }
64
+
65
+    public String getHost() {
66
+        return host;
67
+    }
68
+
69
+    public String getMode() {
70
+        return mode;
71
+    }
72
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/CompositionStateChangeEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.CompositionState;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when a person's composition state changes.
32
+ */
33
+public class CompositionStateChangeEvent extends ParserEvent {
34
+
35
+    private final CompositionState state;
36
+    private final String host;
37
+
38
+    public CompositionStateChangeEvent(final Parser parser, final Date date,
39
+            final CompositionState state, final String host) {
40
+        super(parser, date);
41
+        this.state = state;
42
+        this.host = host;
43
+    }
44
+
45
+    public CompositionState getState() {
46
+        return state;
47
+    }
48
+
49
+    public String getHost() {
50
+        return host;
51
+    }
52
+}

+ 45
- 0
common/src/com/dmdirc/parser/events/ConnectErrorEvent.java View File

@@ -0,0 +1,45 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.ParserError;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called to give Error Information related to a connection attempt.
32
+ */
33
+public class ConnectErrorEvent extends ParserEvent {
34
+
35
+    private final ParserError errorInfo;
36
+
37
+    public ConnectErrorEvent(final Parser parser, final Date date, final ParserError errorInfo) {
38
+        super(parser, date);
39
+        this.errorInfo = errorInfo;
40
+    }
41
+
42
+    public ParserError getErrorInfo() {
43
+        return errorInfo;
44
+    }
45
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/DataInEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used on every incoming line BEFORE parsing.
31
+ */
32
+public class DataInEvent extends ParserEvent {
33
+
34
+    private final String data;
35
+
36
+    public DataInEvent(final Parser parser, final Date date, final String data) {
37
+        super(parser, date);
38
+        this.data = data;
39
+    }
40
+
41
+    public String getData() {
42
+        return data;
43
+    }
44
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/DataOutEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called on every incoming line BEFORE being sent.
31
+ */
32
+public class DataOutEvent extends ParserEvent {
33
+
34
+    private final String data;
35
+
36
+    public DataOutEvent(final Parser parser, final Date date, final String data) {
37
+        super(parser, date);
38
+        this.data = data;
39
+    }
40
+
41
+    public String getData() {
42
+        return data;
43
+    }
44
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/DebugInfoEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used to give Debug Information.
31
+ */
32
+public class DebugInfoEvent extends ParserEvent {
33
+
34
+    private final int level;
35
+    private final String data;
36
+
37
+    public DebugInfoEvent(final Parser parser, final Date date, final int level,
38
+            final String data) {
39
+        super(parser, date);
40
+        this.level = level;
41
+        this.data = data;
42
+    }
43
+
44
+    public int getLevel() {
45
+        return level;
46
+    }
47
+
48
+    public String getData() {
49
+        return data;
50
+    }
51
+}

+ 45
- 0
common/src/com/dmdirc/parser/events/ErrorInfoEvent.java View File

@@ -0,0 +1,45 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.ParserError;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called to give Error Information.
32
+ */
33
+public class ErrorInfoEvent extends ParserEvent {
34
+
35
+    private final ParserError errorInfo;
36
+
37
+    public ErrorInfoEvent(final Parser parser, final Date date, final ParserError errorInfo) {
38
+        super(parser, date);
39
+        this.errorInfo = errorInfo;
40
+    }
41
+
42
+    public ParserError getErrorInfo() {
43
+        return errorInfo;
44
+    }
45
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/GroupListEndEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Callback interface for when the parser receives the end of a group list response.
31
+ */
32
+public class GroupListEndEvent extends ParserEvent {
33
+
34
+    public GroupListEndEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/GroupListEntryEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Callback interface for when the parser receives an entry during a group list response.
31
+ */
32
+public class GroupListEntryEvent extends ParserEvent {
33
+
34
+    private final String name;
35
+    private final int users;
36
+    private final String topic;
37
+
38
+    public GroupListEntryEvent(final Parser parser, final Date date, final String name,
39
+            final int users, final String topic) {
40
+        super(parser, date);
41
+        this.name = name;
42
+        this.users = users;
43
+        this.topic = topic;
44
+    }
45
+
46
+    public String getName() {
47
+        return name;
48
+    }
49
+
50
+    public int getUsers() {
51
+        return users;
52
+    }
53
+
54
+    public String getTopic() {
55
+        return topic;
56
+    }
57
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/GroupListStartEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Callback interface for when the parser receives the start of a group list response.
31
+ */
32
+public class GroupListStartEvent extends ParserEvent {
33
+
34
+    public GroupListStartEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/InviteEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when we are invited to a channel.
31
+ */
32
+public class InviteEvent extends ParserEvent {
33
+
34
+    private final String userHost;
35
+    private final String channel;
36
+
37
+    public InviteEvent(final Parser parser, final Date date, final String userHost,
38
+            final String channel) {
39
+        super(parser, date);
40
+        this.userHost = userHost;
41
+        this.channel = channel;
42
+    }
43
+
44
+    public String getUserHost() {
45
+        return userHost;
46
+    }
47
+
48
+    public String getChannel() {
49
+        return channel;
50
+    }
51
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/MOTDEndEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when "End of MOTD" or "No MOTD" is received.
31
+ */
32
+public class MOTDEndEvent extends ParserEvent {
33
+
34
+    private final boolean noMOTD;
35
+    private final String data;
36
+
37
+    public MOTDEndEvent(final Parser parser, final Date date, final boolean noMOTD,
38
+            final String data) {
39
+        super(parser, date);
40
+        this.noMOTD = noMOTD;
41
+        this.data = data;
42
+    }
43
+
44
+    public boolean isNoMOTD() {
45
+        return noMOTD;
46
+    }
47
+
48
+    public String getData() {
49
+        return data;
50
+    }
51
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/MOTDLineEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used to give MOTD Information.
31
+ */
32
+public class MOTDLineEvent extends ParserEvent {
33
+
34
+    private final String data;
35
+
36
+    public MOTDLineEvent(final Parser parser, final Date date, final String data) {
37
+        super(parser, date);
38
+        this.data = data;
39
+    }
40
+
41
+    public String getData() {
42
+        return data;
43
+    }
44
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/MOTDStartEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used when the MOTD Starts.
31
+ */
32
+public class MOTDStartEvent extends ParserEvent {
33
+
34
+    private final String data;
35
+
36
+    public MOTDStartEvent(final Parser parser, final Date date, final String data) {
37
+        super(parser, date);
38
+        this.data = data;
39
+    }
40
+
41
+    public String getData() {
42
+        return data;
43
+    }
44
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/NetworkDetectedEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used when the Network=blah 005 token is recieved.
31
+ */
32
+public class NetworkDetectedEvent extends ParserEvent {
33
+
34
+    private final String networkName;
35
+    private final String ircdVersion;
36
+    private final String ircdType;
37
+
38
+    public NetworkDetectedEvent(final Parser parser, final Date date, final String networkName,
39
+            final String ircdVersion, final String ircdType) {
40
+        super(parser, date);
41
+        this.networkName = networkName;
42
+        this.ircdVersion = ircdVersion;
43
+        this.ircdType = ircdType;
44
+    }
45
+
46
+    public String getNetworkName() {
47
+        return networkName;
48
+    }
49
+
50
+    public String getIrcdVersion() {
51
+        return ircdVersion;
52
+    }
53
+
54
+    public String getIrcdType() {
55
+        return ircdType;
56
+    }
57
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/NickChangeEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ClientInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when we or another user change nickname.
32
+ */
33
+public class NickChangeEvent extends ParserEvent {
34
+
35
+    private final ClientInfo client;
36
+    private final String oldNick;
37
+
38
+    public NickChangeEvent(final Parser parser, final Date date, final ClientInfo client,
39
+            final String oldNick) {
40
+        super(parser, date);
41
+        this.client = client;
42
+        this.oldNick = oldNick;
43
+    }
44
+
45
+    public ClientInfo getClient() {
46
+        return client;
47
+    }
48
+
49
+    public String getOldNick() {
50
+        return oldNick;
51
+    }
52
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/NickInUseEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when requested nickname is in use.
31
+ */
32
+public class NickInUseEvent extends ParserEvent {
33
+
34
+    private final String nickname;
35
+
36
+    public NickInUseEvent(final Parser parser, final Date date, final String nickname) {
37
+        super(parser, date);
38
+        this.nickname = nickname;
39
+    }
40
+
41
+    public String getNickname() {
42
+        return nickname;
43
+    }
44
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/NumericEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used to give numeric Information.
31
+ */
32
+public class NumericEvent extends ParserEvent {
33
+
34
+    private final int numeric;
35
+    private final String[] token;
36
+
37
+    public NumericEvent(final Parser parser, final Date date, final int numeric,
38
+            final String[] token) {
39
+        super(parser, date);
40
+        this.numeric = numeric;
41
+        this.token = token;
42
+    }
43
+
44
+    public int getNumeric() {
45
+        return numeric;
46
+    }
47
+
48
+    public String[] getToken() {
49
+        return token;
50
+    }
51
+}

+ 59
- 0
common/src/com/dmdirc/parser/events/OtherAwayStateEvent.java View File

@@ -0,0 +1,59 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.common.AwayState;
26
+import com.dmdirc.parser.interfaces.ClientInfo;
27
+import com.dmdirc.parser.interfaces.Parser;
28
+
29
+import java.util.Date;
30
+
31
+/**
32
+ * Called when we go away, or come back.
33
+ */
34
+public class OtherAwayStateEvent extends ParserEvent {
35
+
36
+    private final ClientInfo client;
37
+    private final AwayState oldState;
38
+    private final AwayState newState;
39
+
40
+    public OtherAwayStateEvent(final Parser parser, final Date date, final ClientInfo client,
41
+            final AwayState oldState, final AwayState newState) {
42
+        super(parser, date);
43
+        this.client = client;
44
+        this.oldState = oldState;
45
+        this.newState = newState;
46
+    }
47
+
48
+    public ClientInfo getClient() {
49
+        return client;
50
+    }
51
+
52
+    public AwayState getOldState() {
53
+        return oldState;
54
+    }
55
+
56
+    public AwayState getNewState() {
57
+        return newState;
58
+    }
59
+}

+ 49
- 0
common/src/com/dmdirc/parser/events/ParserEvent.java View File

@@ -0,0 +1,49 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ *
31
+ */
32
+public class ParserEvent {
33
+
34
+    private final Parser parser;
35
+    private final Date date;
36
+
37
+    public ParserEvent(final Parser parser, final Date date) {
38
+        this.parser = parser;
39
+        this.date = date;
40
+    }
41
+
42
+    public Parser getParser() {
43
+        return parser;
44
+    }
45
+
46
+    public Date getDate() {
47
+        return date;
48
+    }
49
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/PasswordRequiredEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used when a raw 464 is recieved.
31
+ */
32
+public class PasswordRequiredEvent extends ParserEvent {
33
+
34
+    public PasswordRequiredEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/PingFailureEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a Ping Failed.
31
+ */
32
+public class PingFailureEvent extends ParserEvent {
33
+
34
+    public PingFailureEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/PingSentEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a Ping was Sent.
31
+ */
32
+public class PingSentEvent extends ParserEvent {
33
+
34
+    public PingSentEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/PingSuccessEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a Ping was a Success.
31
+ */
32
+public class PingSuccessEvent extends ParserEvent {
33
+
34
+    public PingSuccessEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/PrivateActionEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person does an action to you (PM).
31
+ */
32
+public class PrivateActionEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public PrivateActionEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/PrivateCTCPEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a CTCP to you directly.
31
+ */
32
+public class PrivateCTCPEvent extends ParserEvent {
33
+
34
+    private final String type;
35
+    private final String message;
36
+    private final String host;
37
+
38
+    public PrivateCTCPEvent(final Parser parser, final Date date, final String type,
39
+            final String message, final String host) {
40
+        super(parser, date);
41
+        this.type = type;
42
+        this.message = message;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getType() {
47
+        return type;
48
+    }
49
+
50
+    public String getMessage() {
51
+        return message;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/PrivateCTCPReplyEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a CTCPRReply to you directly.
31
+ */
32
+public class PrivateCTCPReplyEvent extends ParserEvent {
33
+
34
+    private final String type;
35
+    private final String message;
36
+    private final String host;
37
+
38
+    public PrivateCTCPReplyEvent(final Parser parser, final Date date, final String type,
39
+            final String message, final String host) {
40
+        super(parser, date);
41
+        this.type = type;
42
+        this.message = message;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getType() {
47
+        return type;
48
+    }
49
+
50
+    public String getMessage() {
51
+        return message;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/PrivateMessageEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a message to you directly (PM).
31
+ */
32
+public class PrivateMessageEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public PrivateMessageEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/PrivateNoticeEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a notice to you.
31
+ */
32
+public class PrivateNoticeEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public PrivateNoticeEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/QuitEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ClientInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called When we, or another client quits IRC (Called once in total).
32
+ */
33
+public class QuitEvent extends ParserEvent {
34
+
35
+    private final ClientInfo client;
36
+    private final String reason;
37
+
38
+    public QuitEvent(final Parser parser, final Date date, final ClientInfo client,
39
+            final String reason) {
40
+        super(parser, date);
41
+        this.client = client;
42
+        this.reason = reason;
43
+    }
44
+
45
+    public ClientInfo getClient() {
46
+        return client;
47
+    }
48
+
49
+    public String getReason() {
50
+        return reason;
51
+    }
52
+}

+ 44
- 0
common/src/com/dmdirc/parser/events/ServerErrorEvent.java View File

@@ -0,0 +1,44 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Interface Used to give ServerError.
31
+ */
32
+public class ServerErrorEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+
36
+    public ServerErrorEvent(final Parser parser, final Date date, final String message) {
37
+        super(parser, date);
38
+        this.message = message;
39
+    }
40
+
41
+    public String getMessage() {
42
+        return message;
43
+    }
44
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/ServerNoticeEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a server sends a notice to you.
31
+ */
32
+public class ServerNoticeEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public ServerNoticeEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/ServerReadyEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called after 001.
31
+ */
32
+public class ServerReadyEvent extends ParserEvent {
33
+
34
+    public ServerReadyEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 37
- 0
common/src/com/dmdirc/parser/events/SocketCloseEvent.java View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when the socket is closed.
31
+ */
32
+public class SocketCloseEvent extends ParserEvent {
33
+
34
+    public SocketCloseEvent(final Parser parser, final Date date) {
35
+        super(parser, date);
36
+    }
37
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/UnknownActionEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends an action not aimed specifically at you or a channel (ie $*).
31
+ */
32
+public class UnknownActionEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String target;
36
+    private final String host;
37
+
38
+    public UnknownActionEvent(final Parser parser, final Date date, final String message,
39
+            final String target, final String host) {
40
+        super(parser, date);
41
+        this.message = message;
42
+        this.target = target;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getMessage() {
47
+        return message;
48
+    }
49
+
50
+    public String getTarget() {
51
+        return target;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 63
- 0
common/src/com/dmdirc/parser/events/UnknownCTCPEvent.java View File

@@ -0,0 +1,63 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a CTCP not aimed at you or a channel (ie $*).
31
+ */
32
+public class UnknownCTCPEvent extends ParserEvent {
33
+
34
+    private final String type;
35
+    private final String message;
36
+    private final String target;
37
+    private final String host;
38
+
39
+    public UnknownCTCPEvent(final Parser parser, final Date date, final String type,
40
+            final String message, final String target, final String host) {
41
+        super(parser, date);
42
+        this.type = type;
43
+        this.message = message;
44
+        this.target = target;
45
+        this.host = host;
46
+    }
47
+
48
+    public String getType() {
49
+        return type;
50
+    }
51
+
52
+    public String getMessage() {
53
+        return message;
54
+    }
55
+
56
+    public String getTarget() {
57
+        return target;
58
+    }
59
+
60
+    public String getHost() {
61
+        return host;
62
+    }
63
+}

+ 63
- 0
common/src/com/dmdirc/parser/events/UnknownCTCPReplyEvent.java View File

@@ -0,0 +1,63 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a CTCP not aimed at you or a channel (ie $*).
31
+ */
32
+public class UnknownCTCPReplyEvent extends ParserEvent {
33
+
34
+    private final String type;
35
+    private final String message;
36
+    private final String target;
37
+    private final String host;
38
+
39
+    public UnknownCTCPReplyEvent(final Parser parser, final Date date, final String type,
40
+            final String message, final String target, final String host) {
41
+        super(parser, date);
42
+        this.type = type;
43
+        this.message = message;
44
+        this.target = target;
45
+        this.host = host;
46
+    }
47
+
48
+    public String getType() {
49
+        return type;
50
+    }
51
+
52
+    public String getMessage() {
53
+        return message;
54
+    }
55
+
56
+    public String getTarget() {
57
+        return target;
58
+    }
59
+
60
+    public String getHost() {
61
+        return host;
62
+    }
63
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/UnknownMessageEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a message not aimed specifically at you or a channel (ie $*).
31
+ */
32
+public class UnknownMessageEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String target;
36
+    private final String host;
37
+
38
+    public UnknownMessageEvent(final Parser parser, final Date date, final String type,
39
+            final String message, final String target, final String host) {
40
+        super(parser, date);
41
+        this.message = message;
42
+        this.target = target;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getMessage() {
47
+        return message;
48
+    }
49
+
50
+    public String getTarget() {
51
+        return target;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/UnknownNoticeEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a person sends a notice not aimed specifically at you or a channel (ie $*).
31
+ */
32
+public class UnknownNoticeEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String target;
36
+    private final String host;
37
+
38
+    public UnknownNoticeEvent(final Parser parser, final Date date, final String type,
39
+            final String message, final String target, final String host) {
40
+        super(parser, date);
41
+        this.message = message;
42
+        this.target = target;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getMessage() {
47
+        return message;
48
+    }
49
+
50
+    public String getTarget() {
51
+        return target;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 57
- 0
common/src/com/dmdirc/parser/events/UnknownServerNoticeEvent.java View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a server sends a notice not aimed specifically at you or a channel (ie $*).
31
+ */
32
+public class UnknownServerNoticeEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String target;
36
+    private final String host;
37
+
38
+    public UnknownServerNoticeEvent(final Parser parser, final Date date, final String message,
39
+            final String target, final String host) {
40
+        super(parser, date);
41
+        this.message = message;
42
+        this.target = target;
43
+        this.host = host;
44
+    }
45
+
46
+    public String getMessage() {
47
+        return message;
48
+    }
49
+
50
+    public String getTarget() {
51
+        return target;
52
+    }
53
+
54
+    public String getHost() {
55
+        return host;
56
+    }
57
+}

+ 58
- 0
common/src/com/dmdirc/parser/events/UserModeChangeEvent.java View File

@@ -0,0 +1,58 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ClientInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when user modes are changed.
32
+ */
33
+public class UserModeChangeEvent extends ParserEvent {
34
+
35
+    private final ClientInfo client;
36
+    private final String host;
37
+    private final String modes;
38
+
39
+    public UserModeChangeEvent(final Parser parser, final Date date, final ClientInfo client,
40
+            final String host, final String modes) {
41
+        super(parser, date);
42
+        this.client = client;
43
+        this.host = host;
44
+        this.modes = modes;
45
+    }
46
+
47
+    public ClientInfo getClient() {
48
+        return client;
49
+    }
50
+
51
+    public String getHost() {
52
+        return host;
53
+    }
54
+
55
+    public String getModes() {
56
+        return modes;
57
+    }
58
+}

+ 52
- 0
common/src/com/dmdirc/parser/events/UserModeDiscoveryEvent.java View File

@@ -0,0 +1,52 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.ClientInfo;
26
+import com.dmdirc.parser.interfaces.Parser;
27
+
28
+import java.util.Date;
29
+
30
+/**
31
+ * Called when user modes are Discovered.
32
+ */
33
+public class UserModeDiscoveryEvent extends ParserEvent {
34
+
35
+    private final ClientInfo client;
36
+    private final String modes;
37
+
38
+    public UserModeDiscoveryEvent(final Parser parser, final Date date, final ClientInfo client,
39
+            final String modes) {
40
+        super(parser, date);
41
+        this.client = client;
42
+        this.modes = modes;
43
+    }
44
+
45
+    public ClientInfo getClient() {
46
+        return client;
47
+    }
48
+
49
+    public String getModes() {
50
+        return modes;
51
+    }
52
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/WallDesyncEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when a Desync message is recieved over wallops.
31
+ */
32
+public class WallDesyncEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public WallDesyncEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/WallopEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when an oper-only message is recieved over wallops.
31
+ */
32
+public class WallopEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public WallopEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

+ 51
- 0
common/src/com/dmdirc/parser/events/WalluserEvent.java View File

@@ -0,0 +1,51 @@
1
+/*
2
+ * Copyright (c) 2006-2014 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.events;
24
+
25
+import com.dmdirc.parser.interfaces.Parser;
26
+
27
+import java.util.Date;
28
+
29
+/**
30
+ * Called when an all-users message is recieved over wallops.
31
+ */
32
+public class WalluserEvent extends ParserEvent {
33
+
34
+    private final String message;
35
+    private final String host;
36
+
37
+    public WalluserEvent(final Parser parser, final Date date, final String message,
38
+            final String host) {
39
+        super(parser, date);
40
+        this.message = message;
41
+        this.host = host;
42
+    }
43
+
44
+    public String getMessage() {
45
+        return message;
46
+    }
47
+
48
+    public String getHost() {
49
+        return host;
50
+    }
51
+}

Loading…
Cancel
Save