瀏覽代碼

Add channel notice event.

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

+ 58
- 0
src/com/dmdirc/events/ChannelNoticeEvent.java 查看文件

@@ -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.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 ChannelNoticeEvent extends ChannelDisplayableEvent {
32
+
33
+    private final ChannelClientInfo client;
34
+    private final String message;
35
+
36
+    public ChannelNoticeEvent(final long timestamp, final Channel channel,
37
+            final ChannelClientInfo client, final String message) {
38
+        super(timestamp, channel);
39
+        this.client = client;
40
+        this.message = message;
41
+    }
42
+
43
+    public ChannelNoticeEvent(final Channel channel, final ChannelClientInfo client,
44
+            final String message) {
45
+        super(channel);
46
+        this.client = client;
47
+        this.message = message;
48
+    }
49
+
50
+    public ChannelClientInfo getClient() {
51
+        return client;
52
+    }
53
+
54
+    public String getMessage() {
55
+        return message;
56
+    }
57
+
58
+}

Loading…
取消
儲存