|
@@ -1,63 +0,0 @@
|
1
|
|
-/*
|
2
|
|
- *
|
3
|
|
- * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
|
4
|
|
- *
|
5
|
|
- * Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
|
- * of this software and associated documentation files (the "Software"), to deal
|
7
|
|
- * in the Software without restriction, including without limitation the rights
|
8
|
|
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
|
- * copies of the Software, and to permit persons to whom the Software is
|
10
|
|
- * furnished to do so, subject to the following conditions:
|
11
|
|
- *
|
12
|
|
- * The above copyright notice and this permission notice shall be included in
|
13
|
|
- * all copies or substantial portions of the Software.
|
14
|
|
- *
|
15
|
|
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
|
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
|
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
|
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
|
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
|
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
|
- * SOFTWARE.
|
22
|
|
- */
|
23
|
|
-
|
24
|
|
-package com.dmdirc.commandparser.parsers;
|
25
|
|
-
|
26
|
|
-import com.dmdirc.FrameContainer;
|
27
|
|
-import com.dmdirc.Server;
|
28
|
|
-
|
29
|
|
-/**
|
30
|
|
- * Command parser for raw windows, sends lines directly to the parser.
|
31
|
|
- */
|
32
|
|
-public class RawCommandParser extends ServerCommandParser {
|
33
|
|
-
|
34
|
|
- /**
|
35
|
|
- * A version number for this class. It should be changed whenever the class
|
36
|
|
- * structure is changed (or anything else that would prevent serialized
|
37
|
|
- * objects being unserialized with the new class).
|
38
|
|
- */
|
39
|
|
- private static final long serialVersionUID = 1;
|
40
|
|
-
|
41
|
|
- /** The container that owns this parser. */
|
42
|
|
- private FrameContainer<?> owner;
|
43
|
|
-
|
44
|
|
- /**
|
45
|
|
- * Creates a new raw command parser for the specified server.
|
46
|
|
- */
|
47
|
|
- public RawCommandParser() {
|
48
|
|
- super();
|
49
|
|
- }
|
50
|
|
-
|
51
|
|
- /** {@inheritDoc} */
|
52
|
|
- @Override
|
53
|
|
- public void setOwner(final FrameContainer<?> owner) {
|
54
|
|
- this.owner = owner;
|
55
|
|
- }
|
56
|
|
-
|
57
|
|
- /** {@inheritDoc} */
|
58
|
|
- @Override
|
59
|
|
- protected void handleNonCommand(final FrameContainer<?> origin, final String line) {
|
60
|
|
- owner.getServer().getParser().sendRawMessage(line);
|
61
|
|
- }
|
62
|
|
-
|
63
|
|
-}
|