|
@@ -32,10 +32,7 @@ import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
32
|
32
|
/**
|
33
|
33
|
* DCC CommandParser.
|
34
|
34
|
*/
|
35
|
|
-public final class DCCCommandParser extends GlobalCommandParser {
|
36
|
|
-
|
37
|
|
- /** The singleton instance of the DCC command parser. */
|
38
|
|
- private static DCCCommandParser me;
|
|
35
|
+public class DCCCommandParser extends GlobalCommandParser {
|
39
|
36
|
|
40
|
37
|
/** A version number for this class. */
|
41
|
38
|
private static final long serialVersionUID = 2009290901;
|
|
@@ -45,23 +42,10 @@ public final class DCCCommandParser extends GlobalCommandParser {
|
45
|
42
|
*
|
46
|
43
|
* @param configManager Config manager
|
47
|
44
|
*/
|
48
|
|
- private DCCCommandParser(final AggregateConfigProvider configManager) {
|
|
45
|
+ public DCCCommandParser(final AggregateConfigProvider configManager) {
|
49
|
46
|
super(configManager, CommandManager.getCommandManager());
|
50
|
47
|
}
|
51
|
48
|
|
52
|
|
- /**
|
53
|
|
- * Retrieves the singleton dcc command parser.
|
54
|
|
- *
|
55
|
|
- * @return The singleton DCCCommandParser
|
56
|
|
- */
|
57
|
|
- public static synchronized DCCCommandParser getDCCCommandParser(final AggregateConfigProvider configManager) {
|
58
|
|
- if (me == null) {
|
59
|
|
- me = new DCCCommandParser(configManager);
|
60
|
|
- }
|
61
|
|
-
|
62
|
|
- return me;
|
63
|
|
- }
|
64
|
|
-
|
65
|
49
|
/** Loads the relevant commands into the parser. */
|
66
|
50
|
@Override
|
67
|
51
|
protected void loadCommands() {
|
|
@@ -77,8 +61,7 @@ public final class DCCCommandParser extends GlobalCommandParser {
|
77
|
61
|
* @param line The line input by the user
|
78
|
62
|
*/
|
79
|
63
|
@Override
|
80
|
|
- protected void handleNonCommand(final FrameContainer origin,
|
81
|
|
- final String line) {
|
|
64
|
+ protected void handleNonCommand(final FrameContainer origin, final String line) {
|
82
|
65
|
((WritableFrameContainer) origin).sendLine(line);
|
83
|
66
|
}
|
84
|
67
|
|