|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levelonelabs.aimbot.BotModule
All Modules that wish to provide services to AIMBot should implement this. This base class acts as a facade to allow a extending module to be pretty much self-contained and just call methods here without needing to know about the AIMSender.
Field Summary | |
protected AIMBot |
bot
A handle to the hosting AIMBot |
Constructor Summary | |
BotModule(AIMBot bot)
Constructor for the BotModule object |
Method Summary | |
void |
addAIMListener(AIMListener listener)
Convenience method to call aimsender's addAIMListener |
void |
addBuddies(java.util.List aimbuddies)
Convience method to call aimsender's addBuddies |
void |
addBuddy(AIMBuddy buddy)
Convience method to call aimsender's addBuddy |
void |
denyBuddy(AIMBuddy buddy)
Deny a buddy |
AIMBuddy |
getBuddy(java.lang.String name)
Convience method to call aimsender's getBuddy |
java.util.Iterator |
getBuddyNames()
Convience method to call aimsender's getBuddyIterator |
abstract java.lang.String |
getName()
Gets the canonical name of the BotModule |
int |
getPermitMode()
Gets the permit mode that is set on the server. |
abstract java.util.ArrayList |
getServices()
Must implement this to return a list of Strings that represent the keywords the module wants to be called for |
abstract java.lang.String |
help()
A String to be presented to a client that descibes the services (keywords) this module provides. |
abstract void |
performService(AIMBuddy buddy,
java.lang.String query)
This will be called when the AIMBot gets a string starting with a keyword that this module advertised as a service. |
void |
permitBuddy(AIMBuddy buddy)
Permit a buddy |
void |
removeBuddies(java.util.List aimbuddies)
Convience method to call aimsender's removeBuddies |
void |
removeBuddy(AIMBuddy buddy)
Convience method to call aimsender's removeBuddy |
void |
sendMessage(AIMBuddy buddy,
java.lang.String text)
Convenience method to call aimsender's sendMessage |
void |
sendWarning(AIMBuddy buddy)
Convenience method to call aimsender's sendWarning |
void |
setAvailable()
Clear unvailable message |
void |
setPermitMode(int mode)
Sets the permit mode on the server. |
void |
setUnavailable(java.lang.String reason)
Set unvailable message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AIMBot bot
Constructor Detail |
public BotModule(AIMBot bot)
bot
- A handle to the hosting AIMBotMethod Detail |
public abstract java.lang.String getName()
public AIMBuddy getBuddy(java.lang.String name)
name
-
public java.util.Iterator getBuddyNames()
public abstract java.util.ArrayList getServices()
public void addBuddy(AIMBuddy buddy)
buddy
- The feature to be added to the Buddy attributepublic void addBuddies(java.util.List aimbuddies)
aimbuddies
- List of AIMBuddyspublic void removeBuddy(AIMBuddy buddy)
buddy
- remove the specified buddypublic void removeBuddies(java.util.List aimbuddies)
aimbuddies
- List of AIMBuddyspublic void denyBuddy(AIMBuddy buddy)
buddy
- public void permitBuddy(AIMBuddy buddy)
buddy
- public void setPermitMode(int mode)
mode
- public int getPermitMode()
public void sendMessage(AIMBuddy buddy, java.lang.String text)
buddy
- buddy to messagetext
- text to send buddypublic void sendWarning(AIMBuddy buddy)
buddy
- buddy to warnpublic void setAvailable()
public void setUnavailable(java.lang.String reason)
reason
- public void addAIMListener(AIMListener listener)
listener
- The listenerpublic abstract java.lang.String help()
public abstract void performService(AIMBuddy buddy, java.lang.String query)
buddy
- query
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |