Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.alicebot.server.net.listener
Class AliceIRC  view AliceIRC download AliceIRC.java

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

public class AliceIRC
extends AliceChatListener
implements org.alicebot.server.core.util.ShellCommandable


Field Summary
private  java.lang.String channel
           
private  byte clientStatus
           
private static byte CONNECTED
           
private static byte CONNECTING
           
private static boolean DEBUG
           
private static java.lang.String DEBUGPREFIX
           
private static byte DISCONNECTING
           
private  java.lang.String host
           
static java.lang.String label
           
private static int MAXARGC
           
private static java.lang.String MSG
           
private  java.lang.String nick
           
private static java.lang.String NONE
           
private static byte NOTCONNECTED
           
private  int port
           
private  java.io.BufferedReader reader
           
private static java.lang.String SERVERPREFIX
           
private static java.lang.String SIRCMESSAGE
           
private  java.net.Socket socket
           
private static java.lang.String VERDATE
           
private static java.lang.String VERSION
           
private  java.io.PrintWriter writer
           
 
Fields inherited from class org.alicebot.server.net.listener.AliceChatListener
bot, botID, parameters
 
Constructor Summary
AliceIRC(org.alicebot.server.core.Bot bot)
           
 
Method Summary
 boolean checkParameters()
           
private  void connect()
           
private  void disconnect()
           
 java.lang.String getShellCommands()
           
 java.lang.String getShellDescription()
           
 java.lang.String getShellID()
           
 java.lang.String getVersion()
           
private  java.lang.String helpExtractIRCString(java.lang.String s)
           
private  void listen()
           
private  void logMessage(java.lang.String s)
           
protected  void processMessage(java.lang.String s)
           
private  boolean processMessageCommand(java.lang.String s, java.lang.String s1)
           
private  boolean processMessageCommandClient(java.lang.String s, java.lang.String s1)
           
private  boolean processMessageCommandDebug(java.lang.String s, java.lang.String s1)
           
private  void processServerMessage(java.lang.String s)
           
 void processShellCommand(java.lang.String s)
           
 void run()
          This method will be called by whoever wishes to run your class implementing Runnable.
private  void sendMessage(java.lang.String s, java.lang.String s1)
           
private  void sendServerMessage(java.lang.String s)
           
 void shutdown()
           
 
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

VERSION

private static final java.lang.String VERSION
See Also:
Constant Field Values

VERDATE

private static final java.lang.String VERDATE
See Also:
Constant Field Values

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

MAXARGC

private static final int MAXARGC
See Also:
Constant Field Values

SERVERPREFIX

private static final java.lang.String SERVERPREFIX
See Also:
Constant Field Values

SIRCMESSAGE

private static final java.lang.String SIRCMESSAGE
See Also:
Constant Field Values

DEBUGPREFIX

private static final java.lang.String DEBUGPREFIX
See Also:
Constant Field Values

NONE

private static final java.lang.String NONE
See Also:
Constant Field Values

NOTCONNECTED

private static final byte NOTCONNECTED
See Also:
Constant Field Values

CONNECTING

private static final byte CONNECTING
See Also:
Constant Field Values

CONNECTED

private static final byte CONNECTED
See Also:
Constant Field Values

DISCONNECTING

private static final byte DISCONNECTING
See Also:
Constant Field Values

clientStatus

private byte clientStatus

socket

private java.net.Socket socket

reader

private java.io.BufferedReader reader

writer

private java.io.PrintWriter writer

host

private java.lang.String host

nick

private java.lang.String nick

channel

private java.lang.String channel

port

private int port

MSG

private static final java.lang.String MSG
See Also:
Constant Field Values

label

public static final java.lang.String label
See Also:
Constant Field Values
Constructor Detail

AliceIRC

public AliceIRC(org.alicebot.server.core.Bot bot)
Method Detail

checkParameters

public boolean checkParameters()
Specified by:
checkParameters in class AliceChatListener

shutdown

public void shutdown()
Specified by:
shutdown in interface org.alicebot.server.core.BotProcess

run

public void run()
Description copied from interface: java.lang.Runnable
This method will be called by whoever wishes to run your class implementing Runnable. Note that there are no restrictions on what you are allowed to do in the run method, except that you cannot throw a checked exception.

Specified by:
run in interface java.lang.Runnable

getShellID

public java.lang.String getShellID()
Specified by:
getShellID in interface org.alicebot.server.core.util.ShellCommandable

getShellDescription

public java.lang.String getShellDescription()
Specified by:
getShellDescription in interface org.alicebot.server.core.util.ShellCommandable

getShellCommands

public java.lang.String getShellCommands()
Specified by:
getShellCommands in interface org.alicebot.server.core.util.ShellCommandable

processShellCommand

public void processShellCommand(java.lang.String s)
Specified by:
processShellCommand in interface org.alicebot.server.core.util.ShellCommandable

getVersion

public java.lang.String getVersion()

connect

private void connect()

disconnect

private void disconnect()

processMessage

protected void processMessage(java.lang.String s)

processMessageCommand

private boolean processMessageCommand(java.lang.String s,
                                      java.lang.String s1)

processMessageCommandClient

private boolean processMessageCommandClient(java.lang.String s,
                                            java.lang.String s1)

processMessageCommandDebug

private boolean processMessageCommandDebug(java.lang.String s,
                                           java.lang.String s1)

processServerMessage

private void processServerMessage(java.lang.String s)

helpExtractIRCString

private java.lang.String helpExtractIRCString(java.lang.String s)

logMessage

private void logMessage(java.lang.String s)

sendMessage

private void sendMessage(java.lang.String s,
                         java.lang.String s1)

sendServerMessage

private void sendServerMessage(java.lang.String s)

listen

private void listen()