public class IRC extends BasicSense
Modifier and Type | Field and Description |
---|---|
static int |
LAST_USERS |
static int |
MAX_SPAM |
static int |
SLEEP |
conversations, DAY, DEFAULT_SPEAKER, engaged, HOUR, MAX_FILE_SIZE, MINUTE, RETRY
Constructor and Description |
---|
IRC() |
Modifier and Type | Method and Description |
---|---|
void |
addLastUser(java.lang.String user) |
void |
addUser(java.lang.String user) |
boolean |
checkSpam(java.lang.String user,
java.lang.String text)
Ignore users that spam the same message repeatedly.
|
void |
connect() |
void |
disconnect() |
org.relayirc.chatengine.Channel |
getChannel() |
java.util.List<org.relayirc.chatengine.ChannelListener> |
getChannelListeners() |
java.lang.String |
getChannelName() |
Vertex |
getConversation(Network network)
Return the current conversation.
|
java.lang.String |
getNick() |
java.lang.String |
getNickAlt() |
int |
getPort() |
java.lang.String |
getRealName() |
org.relayirc.chatengine.Server |
getServer() |
java.lang.String |
getServerName() |
java.lang.String |
getUserName() |
java.util.Map<java.lang.String,java.lang.String> |
getUserNicks() |
java.util.Set<java.lang.String> |
getUsers() |
void |
initialize() |
void |
input(java.lang.Object inputText,
Network network)
Process the input chat event.
|
void |
inputSentence(java.lang.String text,
java.lang.String userName,
java.util.List<java.lang.String> targetUserNames,
Network network)
Process the text sentence.
|
boolean |
isConnected() |
void |
output(Vertex output)
Output the vertex to text.
|
void |
pool()
Reset state when instance is pooled.
|
void |
removeUser(java.lang.String user) |
void |
setChannel(org.relayirc.chatengine.Channel channel) |
void |
setChannelListeners(java.util.List<org.relayirc.chatengine.ChannelListener> channelListeners) |
void |
setChannelName(java.lang.String channelName) |
void |
setConnected(boolean isConnected) |
void |
setConversation(Vertex conversation)
Set the current conversation.
|
void |
setNick(java.lang.String nick) |
void |
setNickAlt(java.lang.String nickAlt) |
void |
setPort(int port) |
void |
setRealName(java.lang.String realName) |
void |
setServer(org.relayirc.chatengine.Server server) |
void |
setServerName(java.lang.String serverName) |
void |
setUserName(java.lang.String userName) |
void |
setUserNicks(java.util.Map<java.lang.String,java.lang.String> userNicks) |
void |
setUsers(java.util.Set<java.lang.String> users) |
void |
shutdown()
Stop sensing.
|
java.lang.String |
trimSpecialChars(java.lang.String text)
Trim special IRC command chars from the text.
|
java.lang.String |
trimUserName(java.lang.String text)
Trim non-letters and lower case.
|
addListener, awake, checkEngaged, checkSentence, discover, discoverSentence, getAction, getBot, getEmotionalState, getLanguageState, getListeners, getName, getPrimitive, getResponseListener, getShortTermMemory, initialize, input, isEnabled, log, log, log, migrateProperties, notifyExceptionListeners, notifyResponseListener, printInput, removeListener, saveProperties, setAction, setBot, setEmotionalState, setIsEnabled, setLanguageState, setName, setResponseListener, toString
public static int SLEEP
public static int MAX_SPAM
public static int LAST_USERS
public void initialize()
public void connect()
public void shutdown()
shutdown
in interface Sense
shutdown
in class BasicSense
public void pool()
pool
in interface Sense
pool
in class BasicSense
public void disconnect()
public java.lang.String trimSpecialChars(java.lang.String text)
public java.lang.String trimUserName(java.lang.String text)
public void input(java.lang.Object inputText, Network network)
input
in interface Sense
input
in class BasicSense
public boolean checkSpam(java.lang.String user, java.lang.String text)
public void inputSentence(java.lang.String text, java.lang.String userName, java.util.List<java.lang.String> targetUserNames, Network network)
public void output(Vertex output)
output
in interface Sense
output
in class BasicSense
public void addLastUser(java.lang.String user)
public java.lang.String getServerName()
public void setServerName(java.lang.String serverName)
public int getPort()
public void setPort(int port)
public java.lang.String getNick()
public void setNick(java.lang.String nick)
public java.lang.String getNickAlt()
public void setNickAlt(java.lang.String nickAlt)
public java.lang.String getUserName()
public void setUserName(java.lang.String userName)
public java.lang.String getRealName()
public void setRealName(java.lang.String realName)
public org.relayirc.chatengine.Server getServer()
public void setServer(org.relayirc.chatengine.Server server)
public org.relayirc.chatengine.Channel getChannel()
public void setChannel(org.relayirc.chatengine.Channel channel)
public java.lang.String getChannelName()
public void setChannelName(java.lang.String channelName)
public java.util.List<org.relayirc.chatengine.ChannelListener> getChannelListeners()
public void setChannelListeners(java.util.List<org.relayirc.chatengine.ChannelListener> channelListeners)
public void addUser(java.lang.String user)
public void removeUser(java.lang.String user)
public java.util.Set<java.lang.String> getUsers()
public void setUsers(java.util.Set<java.lang.String> users)
public boolean isConnected()
public void setConnected(boolean isConnected)
public java.util.Map<java.lang.String,java.lang.String> getUserNicks()
public void setUserNicks(java.util.Map<java.lang.String,java.lang.String> userNicks)
public void setConversation(Vertex conversation)