Kaynağa Gözat

Improve the way specific callbacks are done

tags/0.6.3m1rc1
Chris Smith 15 yıl önce
ebeveyn
işleme
35f0d89806
30 değiştirilmiş dosya ile 103 ekleme ve 15 silme
  1. 3
    10
      src/com/dmdirc/parser/irc/callbacks/CallbackManager.java
  2. 8
    5
      src/com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.java
  3. 38
    0
      src/com/dmdirc/parser/irc/callbacks/SpecificCallback.java
  4. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IAwayStateOther.java
  5. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelAction.java
  6. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelAwayStateOther.java
  7. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelCTCP.java
  8. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelCTCPReply.java
  9. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelGotListModes.java
  10. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelGotNames.java
  11. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelJoin.java
  12. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelKick.java
  13. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelMessage.java
  14. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelModeChanged.java
  15. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNickChanged.java
  16. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNonUserModeChanged.java
  17. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNotice.java
  18. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelPart.java
  19. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelQuit.java
  20. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelSingleModeChanged.java
  21. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelTopic.java
  22. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelUserModeChanged.java
  23. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateAction.java
  24. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateCTCP.java
  25. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateCTCPReply.java
  26. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateMessage.java
  27. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateNotice.java
  28. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IWallDesync.java
  29. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IWallop.java
  30. 2
    0
      src/com/dmdirc/parser/irc/callbacks/interfaces/IWalluser.java

+ 3
- 10
src/com/dmdirc/parser/irc/callbacks/CallbackManager.java Dosyayı Görüntüle

@@ -22,13 +22,10 @@
22 22
 
23 23
 package com.dmdirc.parser.irc.callbacks;
24 24
 
25
-import java.util.Hashtable;
26
-
27
-import com.dmdirc.parser.irc.ChannelInfo;
28
-import com.dmdirc.parser.irc.ClientInfo;
29 25
 import com.dmdirc.parser.irc.IRCParser;
30 26
 import com.dmdirc.parser.irc.callbacks.interfaces.*;
31
-import java.lang.reflect.Method;
27
+
28
+import java.util.Hashtable;
32 29
 import java.util.Map;
33 30
 
34 31
 /**
@@ -76,11 +73,7 @@ public final class CallbackManager {
76 73
 		myParser = parser;
77 74
 		
78 75
         for (Class<?> type : CLASSES) {
79
-            final Method method = type.getMethods()[0];
80
-
81
-            if (method.getParameterTypes().length > 1 &&
82
-                    (type.getMethods()[0].getParameterTypes()[1].equals(ClientInfo.class)
83
-                    || type.getMethods()[0].getParameterTypes()[1].equals(ChannelInfo.class))) {
76
+            if (type.isAnnotationPresent(SpecificCallback.class)) {
84 77
                 addCallbackType(new CallbackObjectSpecific(myParser, this,
85 78
                         type.asSubclass(ICallbackInterface.class)));
86 79
             } else {

+ 8
- 5
src/com/dmdirc/parser/irc/callbacks/CallbackObjectSpecific.java Dosyayı Görüntüle

@@ -137,11 +137,14 @@ public class CallbackObjectSpecific extends CallbackObject {
137 137
         newArgs[0] = myParser;
138 138
 
139 139
 		for (ICallbackInterface iface :new ArrayList<ICallbackInterface>(callbackInfo)) {
140
-            if (args[0] instanceof ClientInfo
141
-                    && !isValidUser(iface, ((ClientInfo) args[0]).getHost())) {
142
-                continue;
143
-            } else if (args[0] instanceof ChannelInfo
144
-                    && !isValidChan(iface, (ChannelInfo) args[0])) {
140
+            if (type.isAnnotationPresent(SpecificCallback.class) &&
141
+                    ((args[0] instanceof ClientInfo
142
+                        && !isValidUser(iface, ((ClientInfo) args[0]).getHost()))
143
+                        || (args[0] instanceof ChannelInfo
144
+                        && !isValidChan(iface, (ChannelInfo) args[0]))
145
+                        || (!(args[0] instanceof ClientInfo || args[0] instanceof ChannelInfo) &&
146
+                        args[args.length - 1] instanceof String
147
+                        && !isValidUser(iface, (String) args[args.length - 1])))) {
145 148
                 continue;
146 149
             }
147 150
 

+ 38
- 0
src/com/dmdirc/parser/irc/callbacks/SpecificCallback.java Dosyayı Görüntüle

@@ -0,0 +1,38 @@
1
+/*
2
+ * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
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.irc.callbacks;
24
+
25
+import java.lang.annotation.Retention;
26
+import java.lang.annotation.RetentionPolicy;
27
+
28
+/**
29
+ * Used to indicate that a callback interface can be called for specified
30
+ * objects (hosts/channels/etc).
31
+ *
32
+ * @since 0.6.3
33
+ * @author chris
34
+ */
35
+@Retention(RetentionPolicy.RUNTIME)
36
+public @interface SpecificCallback {
37
+
38
+}

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IAwayStateOther.java Dosyayı Görüntüle

@@ -24,10 +24,12 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26 26
 import com.dmdirc.parser.irc.ClientInfo;
27
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
27 28
 
28 29
 /**
29 30
  * Called when we go away, or come back.
30 31
  */
32
+@SpecificCallback
31 33
 public interface IAwayStateOther extends ICallbackInterface { 
32 34
 	/**
33 35
 	 * Called when we go away, or come back.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelAction.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person does an action in a channel.
31 32
  * sHost is the hostname of the person sending the action. (Can be a server or a person)<br>
32 33
  * cChannelClient is null if user is a server, or not on the channel.
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelAction extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when a person does an action in a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelAwayStateOther.java Dosyayı Görüntüle

@@ -25,10 +25,12 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.IRCParser;
26 26
 import com.dmdirc.parser.irc.ChannelClientInfo;
27 27
 import com.dmdirc.parser.irc.ChannelInfo;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when we go away, or come back.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IChannelAwayStateOther extends ICallbackInterface { 
33 35
 	/**
34 36
 	 * Called when we go away, or come back.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelCTCP.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person sends a CTCP to a channel.
31 32
  * sHost is the hostname of the person sending the CTCP. (Can be a server or a person)<br>
32 33
  * cChannelClient is null if user is a server.
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelCTCP extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when a person sends a CTCP to a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelCTCPReply.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person sends a CTCPRReply to a channel.
31 32
  * sHost is the hostname of the person sending the CTCPReply. (Can be a server or a person)<br>
32 33
  * cChannelClient is null if user is a server.
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelCTCPReply extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when a person sends a CTCPRReply to a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelGotListModes.java Dosyayı Görüntüle

@@ -24,12 +24,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.ChannelInfo;
26 26
 import com.dmdirc.parser.irc.IRCParser;
27
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
27 28
 
28 29
 /**
29 30
  * Called when all requested ListModes have been sent.
30 31
  * This is decided by ProcessListModes, and is called when an "end of list"
31 32
  * reply is sent, and the listModeQueue is empty (or non-existant).
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelGotListModes extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called when a ListModes reply is parsed.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelGotNames.java Dosyayı Görüntüle

@@ -24,10 +24,12 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.ChannelInfo;
26 26
 import com.dmdirc.parser.irc.IRCParser;
27
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
27 28
 
28 29
 /**
29 30
  * Called when a names reply is parsed.
30 31
  */
32
+@SpecificCallback
31 33
 public interface IChannelGotNames extends ICallbackInterface {
32 34
 	/**
33 35
 	 * Called when a names reply is parsed.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelJoin.java Dosyayı Görüntüle

@@ -25,11 +25,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called When we, or another client joins a channel.
31 32
  * This is called AFTER client has been added to channel as a ChannelClientInfo
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelJoin extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called When another client joins a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelKick.java Dosyayı Görüntüle

@@ -25,11 +25,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person is kicked.
31 32
  * cKickedByClient can be null if kicked by a server. sKickedByHost is the hostname of the person/server doing the kicking.
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelKick extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called when a person is kicked.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelMessage.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person sends a message to a channel.
31 32
  * sHost is the hostname of the person sending the message. (Can be a server or a person)<br>
32 33
  * cChannelClient is null if user is a server, or not on the channel.
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelMessage extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when a person sends a message to a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelModeChanged.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called when the channel modes are changed or discovered.
31 32
  * cChannelClient is null if the modes were found from raw 324 (/MODE #Chan reply) or if a server set the mode.<br>
32 33
  * If a Server set the mode, sHost is the servers name, else it is the full host of the user who set it
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelModeChanged extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when the channel modes are changed or discovered.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNickChanged.java Dosyayı Görüntüle

@@ -25,11 +25,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called when we or another user change nickname (Called once per channel the user is on).
31 32
  * This is called after the nickname change has been done internally
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelNickChanged extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called when we or another user change nickname (Called once per channel the user is on).

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNonUserModeChanged.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called when the channel modes are changed or discovered.
31 32
  * cChannelClient is null if the modes were found from raw 324 (/MODE #Chan reply) or if a server set the mode.<br>
32 33
  * If a Server set the mode, sHost is the servers name, else it is the full host of the user who set it
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelNonUserModeChanged extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when the channel modes are changed or discovered.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelNotice.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /**
30 31
  * Called when a person sends a notice to a channel.
31 32
  * sHost is the hostname of the person sending the notice. (Can be a server or a person)<br>
32 33
  * cChannelClient is null if user is a server, or not on the channel.
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelNotice extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when a person sends a notice to a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelPart.java Dosyayı Görüntüle

@@ -25,11 +25,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called When we, or another client parts a channel.
31 32
  * This is called BEFORE client has been removed from the channel.
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelPart extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called When we, or another client parts a channel.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelQuit.java Dosyayı Görüntüle

@@ -25,11 +25,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called When we, or another client quits IRC (Called once per channel the user was on).
31 32
  * This is called BEFORE client has been removed from the channel.
32 33
  */
34
+@SpecificCallback
33 35
 public interface IChannelQuit extends ICallbackInterface {
34 36
 	/**
35 37
 	 * Called When we, or another client quits IRC (Called once per channel the user was on).

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelSingleModeChanged.java Dosyayı Görüntüle

@@ -25,12 +25,14 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called when the channel modes are changed or discovered.
31 32
  * cChannelClient is null if the modes were found from raw 324 (/MODE #Chan reply) or if a server set the mode.<br>
32 33
  * If a Server set the mode, sHost is the servers name, else it is the full host of the user who set it
33 34
  */
35
+@SpecificCallback
34 36
 public interface IChannelSingleModeChanged extends ICallbackInterface {
35 37
 	/**
36 38
 	 * Called when the channel modes are changed or discovered.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelTopic.java Dosyayı Görüntüle

@@ -24,11 +24,13 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.ChannelInfo;
26 26
 import com.dmdirc.parser.irc.IRCParser;
27
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
27 28
 
28 29
 /** 
29 30
  * Called when the topic is changed or discovered for the first time.
30 31
  * bIsNewTopic is true if someone sets the topic, false if the topic is discovered on join
31 32
  */
33
+@SpecificCallback
32 34
 public interface IChannelTopic extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when the topic is changed or discovered for the first time.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IChannelUserModeChanged.java Dosyayı Görüntüle

@@ -25,10 +25,12 @@ package com.dmdirc.parser.irc.callbacks.interfaces;
25 25
 import com.dmdirc.parser.irc.ChannelClientInfo;
26 26
 import com.dmdirc.parser.irc.ChannelInfo;
27 27
 import com.dmdirc.parser.irc.IRCParser;
28
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
28 29
 
29 30
 /** 
30 31
  * Called when a users channel mode is changed.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IChannelUserModeChanged extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a users channel mode is changed.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateAction.java Dosyayı Görüntüle

@@ -23,12 +23,14 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a person does an action to you (PM).
29 30
  * sHost is the hostname of the person sending the action. (Can be a server or a person)<br>
30 31
  * cClient is null if user is a server, or not on any common channel.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IPrivateAction extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a person does an action to you (PM).

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateCTCP.java Dosyayı Görüntüle

@@ -23,12 +23,14 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a person sends a CTCP to you directly.
29 30
  * sHost is the hostname of the person sending the CTCP. (Can be a server or a person)<br>
30 31
  * cClient is null if user is a server, or not on any common channels.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IPrivateCTCP extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a person sends a CTCP to you directly.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateCTCPReply.java Dosyayı Görüntüle

@@ -23,12 +23,14 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a person sends a CTCPRReply to you directly.
29 30
  * sHost is the hostname of the person sending the CTCPRReply. (Can be a server or a person)<br>
30 31
  * cClient is null if user is a server, or not on any common channels.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IPrivateCTCPReply extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a person sends a CTCPRReply to you directly.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateMessage.java Dosyayı Görüntüle

@@ -23,12 +23,14 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a person sends a message to you directly (PM). 
29 30
  * sHost is the hostname of the person sending the message. (Can be a server or a person)<br>
30 31
  * cClient is null if user is a server, or not on any common channel.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IPrivateMessage extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a person sends a message to you directly (PM). 

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IPrivateNotice.java Dosyayı Görüntüle

@@ -23,12 +23,14 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a person sends a notice to you.
29 30
  * sHost is the hostname of the person sending the notice. (Can be a server or a person)<br>
30 31
  * cClient is null if user is a server, or not on any common channel.
31 32
  */
33
+@SpecificCallback
32 34
 public interface IPrivateNotice extends ICallbackInterface {
33 35
 	/**
34 36
 	 * Called when a person sends a notice to you.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IWallDesync.java Dosyayı Görüntüle

@@ -23,11 +23,13 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when a Desync message is recieved over wallops.
29 30
  * sHost is the hostname of the person sending the message. (Can be a server or a person)<br>
30 31
  */
32
+@SpecificCallback
31 33
 public interface IWallDesync extends ICallbackInterface {
32 34
 	/**
33 35
 	 * Called when a Desync message is recieved over wallops.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IWallop.java Dosyayı Görüntüle

@@ -23,11 +23,13 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when an oper-only message is recieved over wallops.
29 30
  * sHost is the hostname of the person sending the message. (Can be a server or a person)<br>
30 31
  */
32
+@SpecificCallback
31 33
 public interface IWallop extends ICallbackInterface {
32 34
 	/**
33 35
 	 * Called when an oper-only message is recieved over wallops.

+ 2
- 0
src/com/dmdirc/parser/irc/callbacks/interfaces/IWalluser.java Dosyayı Görüntüle

@@ -23,11 +23,13 @@
23 23
 package com.dmdirc.parser.irc.callbacks.interfaces;
24 24
 
25 25
 import com.dmdirc.parser.irc.IRCParser;
26
+import com.dmdirc.parser.irc.callbacks.SpecificCallback;
26 27
 
27 28
 /**
28 29
  * Called when an all-users message is recieved over wallops.
29 30
  * sHost is the hostname of the person sending the message. (Can be a server or a person)<br>
30 31
  */
32
+@SpecificCallback
31 33
 public interface IWalluser extends ICallbackInterface {
32 34
 	/**
33 35
 	 * Called when an all-users message is recieved over wallops.

Loading…
İptal
Kaydet