|
@@ -23,7 +23,6 @@
|
23
|
23
|
package com.dmdirc;
|
24
|
24
|
|
25
|
25
|
import com.dmdirc.commandparser.CommandType;
|
26
|
|
-import com.dmdirc.events.AppErrorEvent;
|
27
|
26
|
import com.dmdirc.events.CommandErrorEvent;
|
28
|
27
|
import com.dmdirc.events.QueryActionEvent;
|
29
|
28
|
import com.dmdirc.events.QueryClosedEvent;
|
|
@@ -36,9 +35,7 @@ import com.dmdirc.interfaces.Connection;
|
36
|
35
|
import com.dmdirc.interfaces.PrivateChat;
|
37
|
36
|
import com.dmdirc.interfaces.User;
|
38
|
37
|
import com.dmdirc.interfaces.WindowModel;
|
39
|
|
-import com.dmdirc.logger.ErrorLevel;
|
40
|
38
|
import com.dmdirc.parser.common.CallbackManager;
|
41
|
|
-import com.dmdirc.parser.common.CallbackNotFoundException;
|
42
|
39
|
import com.dmdirc.parser.common.CompositionState;
|
43
|
40
|
import com.dmdirc.parser.events.CompositionStateChangeEvent;
|
44
|
41
|
import com.dmdirc.parser.events.NickChangeEvent;
|
|
@@ -187,14 +184,7 @@ public class Query extends FrameContainer implements PrivateChat {
|
187
|
184
|
*/
|
188
|
185
|
public void reregister() {
|
189
|
186
|
final CallbackManager callbackManager = connection.getParser().get().getCallbackManager();
|
190
|
|
- final String nick = getNickname();
|
191
|
|
-
|
192
|
|
- try {
|
193
|
|
- callbackManager.subscribe(this);
|
194
|
|
- } catch (CallbackNotFoundException ex) {
|
195
|
|
- getEventBus().publishAsync(new AppErrorEvent(ErrorLevel.HIGH, ex,
|
196
|
|
- "Unable to get query events", ex.getMessage()));
|
197
|
|
- }
|
|
187
|
+ callbackManager.subscribe(this);
|
198
|
188
|
}
|
199
|
189
|
|
200
|
190
|
@Handler
|
|
@@ -205,17 +195,6 @@ public class Query extends FrameContainer implements PrivateChat {
|
205
|
195
|
final ClientInfo client = event.getClient();
|
206
|
196
|
final String oldNick = event.getOldNick();
|
207
|
197
|
if (client.getNickname().equals(getNickname())) {
|
208
|
|
- final CallbackManager callbackManager = connection.getParser().get().getCallbackManager();
|
209
|
|
-
|
210
|
|
- // TODO: Not specific now.
|
211
|
|
- try {
|
212
|
|
- callbackManager.subscribe(this);
|
213
|
|
- } catch (CallbackNotFoundException ex) {
|
214
|
|
- getEventBus().publishAsync(
|
215
|
|
- new AppErrorEvent(ErrorLevel.HIGH, ex, "Unable to get query events",
|
216
|
|
- ex.getMessage()));
|
217
|
|
- }
|
218
|
|
-
|
219
|
198
|
connection.updateQuery(this, oldNick, client.getNickname());
|
220
|
199
|
|
221
|
200
|
getEventBus().publish(new QueryNickChangeEvent(this, oldNick, client.getNickname()));
|