|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--irssibot.modules.AbstractModule
|
+--irssibot.modules.Alko
Includes methods for retrieving infomation from www.alko.fi.
| Field Summary | |
private static java.lang.String |
moduleInfo
Module info string. |
| Fields inherited from class irssibot.modules.AbstractModule |
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Alko()
Constructs. |
|
| Method Summary | |
private void |
displayPunkkuInfo(java.lang.String name,
java.lang.String url,
java.lang.String source,
ServerConnection serverConnection)
Displays info about a red wine. |
private void |
doPrivmsg(IrcMessage message,
ServerConnection serverConnection)
Handles PRIVMSGs. |
private void |
doPunkku(java.lang.String name,
java.lang.String source,
ServerConnection serverConnection)
Retrieves info about a named red wine. |
java.lang.String |
getModuleInfo()
Returns a module info string. |
java.util.Properties |
getProperties()
Returns module properties. |
boolean |
onLoad(java.util.Properties state,
Core core)
Called upon loading the module. |
void |
onUnload()
Called upon unloading the module. |
protected void |
processMessage(IrcMessage message,
ServerConnection serverConnection)
Processes incoming IrcMessages from a ServerConnection. |
static java.lang.String |
readURL(java.lang.String url)
Reads contents of an URL as a string. |
private void |
searchPunkkuList(java.lang.String search,
java.lang.String list,
java.lang.String source,
ServerConnection serverConnection)
Looks through the red wine list for matches. |
| Methods inherited from class irssibot.modules.AbstractModule |
addMessage, getState, killModule, run |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final java.lang.String moduleInfo
| Constructor Detail |
public Alko()
| Method Detail |
public java.lang.String getModuleInfo()
getModuleInfo in class AbstractModule
public boolean onLoad(java.util.Properties state,
Core core)
@param state initial module state
onLoad in class AbstractModulecore - reference to corestate - the initial state of module as an Properties object, or
null if no state was saved for module.
Corepublic void onUnload()
onUnload in class AbstractModulepublic java.util.Properties getProperties()
public static java.lang.String readURL(java.lang.String url)
throws java.io.IOException
##TODO## move to an util class!
url - url of the form http://host/querystring
java.io.IOException - if problems reading url
private void displayPunkkuInfo(java.lang.String name,
java.lang.String url,
java.lang.String source,
ServerConnection serverConnection)
name - wine name or part of nameurl - url to the winesource - source (nick or channel) or the messageserverConnection - calling server connection
private void searchPunkkuList(java.lang.String search,
java.lang.String list,
java.lang.String source,
ServerConnection serverConnection)
search - name of wine to look forlist - string containing the wine list htmlsource - source (nick or channel) or the messageserverConnection - calling server connection
private void doPunkku(java.lang.String name,
java.lang.String source,
ServerConnection serverConnection)
name - wine name or part of namesource - source (nick or channel) or the messageserverConnection - calling server connection
private void doPrivmsg(IrcMessage message,
ServerConnection serverConnection)
message - PRIVMSG IrcMessage to processserverConnection - calling server connection
protected void processMessage(IrcMessage message,
ServerConnection serverConnection)
processMessage in class AbstractModulemessage - IrcMessage to processserverConnection - invoking ServerConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||