|
@@ -140,14 +140,14 @@ public class CallbackObjectSpecific extends CallbackObject {
|
140
|
140
|
|
141
|
141
|
for (CallbackInterface iface : new ArrayList<>(callbackInfo)) {
|
142
|
142
|
if (type.isAnnotationPresent(SpecificCallback.class)
|
143
|
|
- && ((args[0] instanceof ClientInfo
|
144
|
|
- && !isValidUser(iface, ((ClientInfo) args[0]).getHostname()))
|
145
|
|
- || (args[0] instanceof ChannelInfo
|
146
|
|
- && !isValidChan(iface, (ChannelInfo) args[0]))
|
147
|
|
- || (!(args[0] instanceof ClientInfo
|
148
|
|
- || args[0] instanceof ChannelInfo)
|
|
143
|
+ && (args[2] instanceof ClientInfo
|
|
144
|
+ && !isValidUser(iface, ((ClientInfo) args[2]).getHostname())
|
|
145
|
+ || args[2] instanceof ChannelInfo
|
|
146
|
+ && !isValidChan(iface, (ChannelInfo) args[2])
|
|
147
|
+ || !(args[2] instanceof ClientInfo
|
|
148
|
+ || args[2] instanceof ChannelInfo)
|
149
|
149
|
&& args[args.length - 1] instanceof String
|
150
|
|
- && !isValidUser(iface, (String) args[args.length - 1])))) {
|
|
150
|
+ && !isValidUser(iface, (String) args[args.length - 1]))) {
|
151
|
151
|
continue;
|
152
|
152
|
}
|
153
|
153
|
|
|
@@ -155,7 +155,7 @@ public class CallbackObjectSpecific extends CallbackObject {
|
155
|
155
|
type.getMethods()[0].invoke(iface, args);
|
156
|
156
|
} catch (ReflectiveOperationException e) {
|
157
|
157
|
final ParserError ei = new ParserError(ParserError.ERROR_ERROR,
|
158
|
|
- "Exception in callback (" + e.getMessage() + ")",
|
|
158
|
+ "Exception in callback (" + e.getMessage() + ')',
|
159
|
159
|
myParser.getLastLine());
|
160
|
160
|
ei.setException(e);
|
161
|
161
|
callErrorInfo(ei);
|