public class InputParser extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Marker |
INPUT_MARKER |
Constructor and Description |
---|
InputParser(Configuration configuration,
PircBotX bot) |
InputParser(PircBotX bot) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Clear out builders.
|
User |
createUserIfNull(User otherUser,
UserHostmask hostmask) |
void |
handleLine(String rawLine)
This method handles events when any line of text arrives from the server,
then dispatching the appropriate event.
|
boolean |
isChannelListRunning() |
void |
processCommand(String target,
UserHostmask source,
String command,
String line,
List<String> parsedLine,
com.google.common.collect.ImmutableMap<String,String> tags) |
void |
processConnect(String rawLine,
String code,
String target,
List<String> parsedLine)
Process any lines relevant to connect.
|
void |
processMode(UserHostmask userHostmask,
User user,
String target,
String mode)
Called when the mode of a channel is set.
|
void |
processServerResponse(int code,
String rawResponse,
List<String> parsedResponseOrig)
This method is called by the PircBotX when a numeric response is received
from the IRC server.
|
void |
processUserStatus(Channel chan,
User user,
String prefix) |
public InputParser(PircBotX bot)
@ConstructorProperties(value={"configuration","bot"}) @Generated(value="lombok") public InputParser(Configuration configuration, PircBotX bot)
public void handleLine(@NonNull String rawLine) throws IOException, IrcException
rawLine
- The raw line of text from the server.IOException
IrcException
public void processConnect(String rawLine, String code, String target, List<String> parsedLine) throws IrcException, IOException
rawLine
- Raw, unprocessed line from the servercode
- target
- parsedLine
- Processed lineIrcException
- If the server rejects the bot (nick already in use
or a 4** or 5** codeIOException
- If an error occurs during upgrading to SSLpublic void processCommand(String target, UserHostmask source, String command, String line, List<String> parsedLine, com.google.common.collect.ImmutableMap<String,String> tags) throws IOException
IOException
public void processServerResponse(int code, String rawResponse, List<String> parsedResponseOrig)
Note that this method is private and should not appear in any of the javadoc generated documentation.
code
- The three-digit numerical code for the response.public void processMode(UserHostmask userHostmask, User user, String target, String mode)
Note that this method is private and is not intended to appear in the javadoc generated documentation.
target
- The channel or nick that the mode operation applies to.mode
- The mode that has been set.public User createUserIfNull(User otherUser, @NonNull UserHostmask hostmask)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
@Generated(value="lombok") public boolean isChannelListRunning()
Copyright © 2010–2020 Leon Blakey. All rights reserved.