PircBot Java IRC Bot

## org.jibble.pircbot
Class DccChat

    java.lang.Object
      org.jibble.pircbot.DccChat

public class DccChat
extends Object

This class is used to allow the bot to interact with a DCC Chat session.

Since:
  0.9c
Version:
  1.5.0 (Build time: Mon Dec 14 20:07:17 2009)
Author:
  Paul James Mutton, http://www.jibble.org/

Method Summary
`void` `accept()` Accept this DccChat connection.
`void` `close()` Closes the DCC Chat connection.
`BufferedReader` `getBufferedReader()` Returns the BufferedReader used by this DCC Chat.
`BufferedWriter` `getBufferedWriter()` Returns the BufferedReader used by this DCC Chat.
`String` `getHostname()` Returns the hostname of the DCC Chat initiator.
`String` `getLogin()` Returns the login of the DCC Chat initiator.
`String` `getNick()` Returns the nick of the other user taking part in this file transfer.
`long` `getNumericalAddress()` Returns the address of the sender as a long.
`Socket` `getSocket()` Returns the raw Socket used by this DCC Chat.
`String` `readLine()` Reads the next line of text from the client at the other end of our DCC Chat connection.
`void` `sendLine(String line)` Sends a line of text to the client at the other end of our DCC Chat connection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### accept

    public void accept()
                throws IOException

  Accept this DccChat connection.

  Throws:
    `IOException`
  Since:
    1.2.0

### readLine

    public String readLine()
                    throws IOException

  Reads the next line of text from the client at the other end of our DCC Chat connection. This method blocks until something can be returned. If the connection has closed, null is returned.

  Returns:
    The next line of text from the client. Returns null if the connection has closed normally.
  Throws:
    `IOException` - If an I/O error occurs.

### sendLine

    public void sendLine(String line)
                  throws IOException

  Sends a line of text to the client at the other end of our DCC Chat connection.

  Parameters:
    `line` - The line of text to be sent. This should not include linefeed characters.
  Throws:
    `IOException` - If an I/O error occurs.

### close

    public void close()
               throws IOException

  Closes the DCC Chat connection.

  Throws:
    `IOException` - If an I/O error occurs.

### getNick

    public String getNick()

  Returns the nick of the other user taking part in this file transfer.

  Returns:
    the nick of the other user.

### getLogin

    public String getLogin()

  Returns the login of the DCC Chat initiator.

  Returns:
    the login of the DCC Chat initiator. null if we sent it.

### getHostname

    public String getHostname()

  Returns the hostname of the DCC Chat initiator.

  Returns:
    the hostname of the DCC Chat initiator. null if we sent it.

### getBufferedReader

    public BufferedReader getBufferedReader()

  Returns the BufferedReader used by this DCC Chat.

  Returns:
    the BufferedReader used by this DCC Chat.

### getBufferedWriter

    public BufferedWriter getBufferedWriter()

  Returns the BufferedReader used by this DCC Chat.

  Returns:
    the BufferedReader used by this DCC Chat.

### getSocket

    public Socket getSocket()

  Returns the raw Socket used by this DCC Chat.

  Returns:
    the raw Socket used by this DCC Chat.

### getNumericalAddress

    public long getNumericalAddress()

  Returns the address of the sender as a long.

  Returns:
    the address of the sender as a long.

PircBot Java IRC Bot