Browse Source

Make events user User.

pull/199/head
Greg Holmes 9 years ago
parent
commit
7e911ad902
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      dcc/src/com/dmdirc/addons/dcc/DCCManager.java

+ 7
- 6
dcc/src/com/dmdirc/addons/dcc/DCCManager.java View File

45
 import com.dmdirc.events.UserErrorEvent;
45
 import com.dmdirc.events.UserErrorEvent;
46
 import com.dmdirc.interfaces.CommandController;
46
 import com.dmdirc.interfaces.CommandController;
47
 import com.dmdirc.interfaces.Connection;
47
 import com.dmdirc.interfaces.Connection;
48
+import com.dmdirc.interfaces.User;
48
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
49
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
49
 import com.dmdirc.interfaces.config.ConfigProvider;
50
 import com.dmdirc.interfaces.config.ConfigProvider;
50
 import com.dmdirc.interfaces.config.IdentityController;
51
 import com.dmdirc.interfaces.config.IdentityController;
363
         switch (event.getType().toLowerCase()) {
364
         switch (event.getType().toLowerCase()) {
364
             case "chat":
365
             case "chat":
365
                 if (ctcpData.length > 3) {
366
                 if (ctcpData.length > 3) {
366
-                    handleChat(autoAccept, ctcpData, event.getClient(), event.getConnection());
367
+                    handleChat(autoAccept, ctcpData, event.getUser(), event.getConnection());
367
                 }
368
                 }
368
                 break;
369
                 break;
369
             case "send":
370
             case "send":
370
                 if (ctcpData.length > 3) {
371
                 if (ctcpData.length > 3) {
371
-                    handleSend(autoAccept, ctcpData, event.getClient(), event.getConnection());
372
+                    handleSend(autoAccept, ctcpData, event.getUser(), event.getConnection());
372
                 }
373
                 }
373
                 break;
374
                 break;
374
             case "resume":
375
             case "resume":
375
             //Fallthrough
376
             //Fallthrough
376
             case "accept":
377
             case "accept":
377
                 if (ctcpData.length > 2) {
378
                 if (ctcpData.length > 2) {
378
-                    handleReceive(ctcpData, event.getClient(), event.getConnection());
379
+                    handleReceive(ctcpData, event.getUser(), event.getConnection());
379
                 }
380
                 }
380
                 break;
381
                 break;
381
             default:
382
             default:
392
      * @param connection Connection DCC received on
393
      * @param connection Connection DCC received on
393
      */
394
      */
394
     private void handleChat(final boolean dontAsk, final String[] ctcpData,
395
     private void handleChat(final boolean dontAsk, final String[] ctcpData,
395
-            final ClientInfo client, final Connection connection) {
396
+            final User client, final Connection connection) {
396
         final String nickname = client.getNickname();
397
         final String nickname = client.getNickname();
397
         if (dontAsk) {
398
         if (dontAsk) {
398
             handleDCCChat(connection.getParser().get(), nickname, ctcpData);
399
             handleDCCChat(connection.getParser().get(), nickname, ctcpData);
443
      * @param client     Client that received the DCC
444
      * @param client     Client that received the DCC
444
      * @param connection Connection the DCC was received on
445
      * @param connection Connection the DCC was received on
445
      */
446
      */
446
-    private void handleSend(final boolean dontAsk, final String[] ctcpData, final ClientInfo client,
447
+    private void handleSend(final boolean dontAsk, final String[] ctcpData, final User client,
447
             final Connection connection) {
448
             final Connection connection) {
448
         final String nickname = client.getNickname();
449
         final String nickname = client.getNickname();
449
         String tmpFilename;
450
         String tmpFilename;
545
      * @param client     Client receiving the DCC
546
      * @param client     Client receiving the DCC
546
      * @param connection Connection the DCC was received on
547
      * @param connection Connection the DCC was received on
547
      */
548
      */
548
-    private void handleReceive(final String[] ctcpData, final ClientInfo client,
549
+    private void handleReceive(final String[] ctcpData, final User client,
549
             final Connection connection) {
550
             final Connection connection) {
550
         final String filename;
551
         final String filename;
551
         // Clients tend to put files with spaces in the name in ""
552
         // Clients tend to put files with spaces in the name in ""

Loading…
Cancel
Save