瀏覽代碼

Add channel mode notice event.

Change-Id: I7d48905e7038c01962d4eb925f49ef1827bbc67d
Reviewed-on: http://gerrit.dmdirc.com/3477
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
pull/1/head
Greg Holmes 10 年之前
父節點
當前提交
5ab7408d0c
共有 1 個檔案被更改,包括 65 行新增0 行删除
  1. 65
    0
      src/com/dmdirc/events/ChannelModeNoticeEvent.java

+ 65
- 0
src/com/dmdirc/events/ChannelModeNoticeEvent.java 查看文件

@@ -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.events;
24
+
25
+import com.dmdirc.Channel;
26
+import com.dmdirc.parser.interfaces.ChannelClientInfo;
27
+
28
+/**
29
+ * Fired when a channel mode is received.
30
+ */
31
+public class ChannelModeNoticeEvent extends ChannelDisplayableEvent {
32
+
33
+    private final ChannelClientInfo client;
34
+    private final String prefix;
35
+    private final String message;
36
+
37
+    public ChannelModeNoticeEvent(final long timestamp, final Channel channel,
38
+            final ChannelClientInfo client, final String prefix, final String message) {
39
+        super(timestamp, channel);
40
+        this.client = client;
41
+        this.prefix = prefix;
42
+        this.message = message;
43
+    }
44
+
45
+    public ChannelModeNoticeEvent(final Channel channel, final ChannelClientInfo client,
46
+            final String prefix, final String message) {
47
+        super(channel);
48
+        this.client = client;
49
+        this.prefix = prefix;
50
+        this.message = message;
51
+    }
52
+
53
+    public ChannelClientInfo getClient() {
54
+        return client;
55
+    }
56
+
57
+    public String getPrefix() {
58
+        return prefix;
59
+    }
60
+
61
+    public String getMessage() {
62
+        return message;
63
+    }
64
+
65
+}

Loading…
取消
儲存