|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.berlios.suzy.irc.IrcClient
public class IrcClient
This class is an IRC client. It will connect to the specified host and port.
The client will try to reconnect if it gets disconnected.
Plugins are used to handle commands that start with the COMMAND_MODIFIER.
Constructor Summary | |
---|---|
IrcClient(java.lang.String network,
java.lang.String server,
int port,
java.lang.String nickName,
java.lang.String adminChannel,
java.lang.String adminChannelPassword,
int timeout,
java.lang.String commandModifier)
Creates a new IrcClient which will cause plugins to be loaded. |
Method Summary | |
---|---|
void |
send(java.lang.String text)
Sends this text to the irc server. |
void |
sendMessageTo(java.lang.String target,
MessageTypes type,
java.lang.String text)
Sends this text to the target (user/channel) specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IrcClient(java.lang.String network, java.lang.String server, int port, java.lang.String nickName, java.lang.String adminChannel, java.lang.String adminChannelPassword, int timeout, java.lang.String commandModifier)
network
- name of the network (used for config files e.g.)server
- address of the irc serverport
- port of the irc servernickName
- the bot's name on ircadminChannel
- a channel which is used for determining administrator statusadminChannelPassword
- the password for the adminChanneltimeout
- timeout after which the bot will reconnect to the irc server in seconds (120 seconds should be a good value)commandModifier
- prefix the bot will look for when searching for commands from users (e.g. "!" if you want the bot to react to "!help")Method Detail |
---|
public void send(java.lang.String text)
send
in interface IrcSender
text
- text to sendpublic void sendMessageTo(java.lang.String target, MessageTypes type, java.lang.String text)
sendMessageTo
in interface IrcSender
target
- specifies where the text should be send totype
- type of the message to send (message or notice)text
- text to send
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |