org.jibble.pircbot
Class IdentServer
java.lang.Object
|
+--java.lang.Thread
|
+--org.jibble.pircbot.IdentServer
- All Implemented Interfaces:
- Runnable
- public class IdentServer
- extends Thread
A simple IdentServer (also know as "The Identification Protocol").
An ident server provides a means to determine the identity of a
user of a particular TCP connection.
Most IRC servers attempt to contact the ident server on connecting
hosts in order to determine the user's identity. A few IRC servers
will not allow you to connect unless this information is provided.
So when a PircBot is run on a machine that does not run an ident server,
it may be necessary to provide a "faked" response by starting up its
own ident server and sending out apparently correct responses.
An instance of this class can be used to start up an ident server
only if it is possible to do so. Reasons for not being able to do
so are if there is already an ident server running on port 113, or
if you are running as an unprivileged user who is unable to create
a server socket on that port number.
- Since:
- 0.9c
- Version:
- 1.0.5 (Build time: Sat Apr 26 23:11:37 2003)
- Author:
- Paul James Mutton,
http://www.jibble.org/
Constructor Summary |
IdentServer(PircBot bot,
String login)
Constructs and starts an instance of an IdentServer that will
respond to a client with the provided login. |
Method Summary |
void |
run()
Waits for a client to connect to the ident server before making an
appropriate response. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
IdentServer
public IdentServer(PircBot bot,
String login)
- Constructs and starts an instance of an IdentServer that will
respond to a client with the provided login. Rather than calling
this constructor explicitly from your code, it is recommended that
you use the startIdentServer method in the PircBot class.
The ident server will wait for up to 60 seconds before shutting
down. Otherwise, it will shut down as soon as it has responded
to an ident request.
- Parameters:
bot
- The PircBot instance that will be used to log to.login
- The login that the ident server will respond with.
run
public void run()
- Waits for a client to connect to the ident server before making an
appropriate response. Note that this method is started by the class
constructor.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread