org.alicebot.server.net.listener
Class AliceIRC

java.lang.Object
  extended by org.alicebot.server.net.listener.AliceChatListener
      extended by org.alicebot.server.net.listener.AliceIRC
All Implemented Interfaces:
java.lang.Runnable, BotProcess, ShellCommandable

public class AliceIRC
extends AliceChatListener
implements ShellCommandable

This code is from the sIRC project and was written by Chris Knight http://www.chrisknight.com/sirc/ and modified to work with an Alicebot server.

Version:
4.1.4
Author:
Chris Knight, Jon Baer
See Also:
http://www.chrisknight.com/sirc/

Field Summary
static java.lang.String label
          Please document.
 
Fields inherited from class org.alicebot.server.net.listener.AliceChatListener
bot, botID, parameters
 
Constructor Summary
AliceIRC(Bot bot)
          Creates a new AliceIRC chat listener for a given bot.
 
Method Summary
 boolean checkParameters()
          Checks that the parameters that have been set for the listener are okay.
 java.lang.String getShellCommands()
          Returns a list of shell commands that are available.
 java.lang.String getShellDescription()
          Returns a string that describes the listener when getting a listener list in the interactive shell.
 java.lang.String getShellID()
          Returns a string that can be used to send commands to the listener from the interactive shell.
 java.lang.String getVersion()
          Returns the version string.
protected  void processMessage(java.lang.String message)
          Please document this.
 void processShellCommand(java.lang.String command)
          Sends a command to the shell.
 void run()
          Connects to the given host and begins listening.
 void shutdown()
          Shuts down the process.
 
Methods inherited from class org.alicebot.server.net.listener.AliceChatListener
setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

public static final java.lang.String label
Please document.

See Also:
Constant Field Values
Constructor Detail

AliceIRC

public AliceIRC(Bot bot)
Creates a new AliceIRC chat listener for a given bot.

Parameters:
bot - the bot for whom to listen
Method Detail

checkParameters

public boolean checkParameters()
Description copied from class: AliceChatListener
Checks that the parameters that have been set for the listener are okay.

Specified by:
checkParameters in class AliceChatListener
Returns:
true if parameters are okay, false if not

shutdown

public void shutdown()
Description copied from interface: BotProcess
Shuts down the process.

Specified by:
shutdown in interface BotProcess

run

public void run()
Connects to the given host and begins listening.

Specified by:
run in interface java.lang.Runnable

getShellID

public java.lang.String getShellID()
Description copied from interface: ShellCommandable
Returns a string that can be used to send commands to the listener from the interactive shell.

Specified by:
getShellID in interface ShellCommandable
Returns:
a string that can be used to send commands to the listener from the interactive shell

getShellDescription

public java.lang.String getShellDescription()
Description copied from interface: ShellCommandable
Returns a string that describes the listener when getting a listener list in the interactive shell.

Specified by:
getShellDescription in interface ShellCommandable
Returns:
a string that describes the listener

getShellCommands

public java.lang.String getShellCommands()
Description copied from interface: ShellCommandable
Returns a list of shell commands that are available.

Specified by:
getShellCommands in interface ShellCommandable
Returns:
a list of shell commands that are available

processShellCommand

public void processShellCommand(java.lang.String command)
Description copied from interface: ShellCommandable
Sends a command to the shell. The ShellCommandable itself is responsible for putting back any output to the shell.

Specified by:
processShellCommand in interface ShellCommandable
Parameters:
command - the command to send to the shell

getVersion

public java.lang.String getVersion()
Returns the version string.

Returns:
the version string

processMessage

protected void processMessage(java.lang.String message)
Please document this.