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