|
@@ -80,8 +80,19 @@ public final class DCCCommand extends ServerCommand implements IntelligentComman
|
80
|
80
|
if (args.length > 1) {
|
81
|
81
|
final String type = args[0];
|
82
|
82
|
final String target = args[1];
|
|
83
|
+ final IRCParser parser = server.getParser();
|
|
84
|
+ if (parser.isValidChannelName(target)) {
|
|
85
|
+ final Thread errorThread = new Thread(new Runnable() {
|
|
86
|
+ /** {@inheritDoc} */
|
|
87
|
+ @Override
|
|
88
|
+ public void run() {
|
|
89
|
+ JOptionPane.showMessageDialog(null, "You can't DCC a channel.", "DCC Error", JOptionPane.ERROR_MESSAGE);
|
|
90
|
+ }
|
|
91
|
+ });
|
|
92
|
+ errorThread.start();
|
|
93
|
+ return;
|
|
94
|
+ }
|
83
|
95
|
if (type.equalsIgnoreCase("chat")) {
|
84
|
|
- final IRCParser parser = server.getParser();
|
85
|
96
|
final String myNickname = parser.getMyNickname();
|
86
|
97
|
final DCCChat chat = new DCCChat();
|
87
|
98
|
if (myPlugin.listen(chat)) {
|