|
||||||||||
| 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.SodexHo
Includes methods for retirieving information about Sodex Ho restaurants from the WWW.
| Field Summary | |
private ServerConnection |
caller
|
private Host |
host
|
private static java.lang.String |
moduleInfo
|
private java.lang.String |
source
|
| Fields inherited from class irssibot.modules.AbstractModule |
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
SodexHo()
Default constructor |
|
| Method Summary | |
private void |
commandList(Host host,
User user,
java.lang.String[] args,
Channel channel)
Handles command 'list' |
private void |
commandSodexho(Host host,
User user,
java.lang.String[] args,
Channel channel)
Handles command 'sodexho' |
private void |
doPrivmsg(IrcMessage message)
Handles PRIVMSGs |
private java.util.Vector |
getLocations()
Retrieves list of all SodexHo restaurants |
java.lang.String |
getModuleInfo()
returns a module info string |
java.util.Properties |
getState()
Gets module's state as a Properties object. |
boolean |
onLoad(java.util.Properties state,
Core core)
Called upon loading the module. |
void |
onUnload()
Called upon unloading the module. |
private void |
processCmdMsg(Host host,
java.lang.String cmd,
Channel channel,
java.lang.String[] args)
Process command message. |
protected void |
processMessage(IrcMessage message,
ServerConnection serverConnection)
Processes incoming IrcMessages from a ServerConnection |
private boolean |
showMenu(LocationDescriptor location,
java.lang.String date)
Displays menu for given Sodex Ho restaurant |
private void |
write(java.lang.String message)
Sends message to source (channel/user) |
| Methods inherited from class irssibot.modules.AbstractModule |
addMessage, 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 java.lang.String moduleInfo
private Host host
private java.lang.String source
private ServerConnection caller
| Constructor Detail |
public SodexHo()
| Method Detail |
public java.util.Properties getState()
AbstractModule
getState in class AbstractModulepublic java.lang.String getModuleInfo()
getModuleInfo in class AbstractModule
public boolean onLoad(java.util.Properties state,
Core core)
AbstractModule
onLoad in class AbstractModulestate - the initial state of module as an Properties object, or
null if no state was saved for module.core - a Core instance. this can be used to initialize module if
no state was retrieved.
Corepublic void onUnload()
AbstractModule
onUnload in class AbstractModule
private boolean showMenu(LocationDescriptor location,
java.lang.String date)
throws java.net.MalformedURLException,
java.io.IOException
location - LocationDescriptor for the locationdate - desired date in the form of DD.MM.
java.net.MalformedURLException
java.io.IOException
private void commandSodexho(Host host,
User user,
java.lang.String[] args,
Channel channel)
host - Host of invokerargs - command argumentschannel - Channel where command takes place *
private java.util.Vector getLocations()
throws java.net.MalformedURLException,
java.io.IOException
Vector. The
elements are of type LocationDescriptor.
java.net.MalformedURLException
java.io.IOException
private void commandList(Host host,
User user,
java.lang.String[] args,
Channel channel)
host - Host of invokerargs - command argumentschannel - Channel where command takes place *
private void processCmdMsg(Host host,
java.lang.String cmd,
Channel channel,
java.lang.String[] args)
channel - valid channel nameprivate void doPrivmsg(IrcMessage message)
message - PRIVMSG IrcMessage to process
protected void processMessage(IrcMessage message,
ServerConnection serverConnection)
processMessage in class AbstractModulemessage - IrcMessage to processserverConnection - invoking ServerConnectionprivate void write(java.lang.String message)
message - message to send
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||