-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.java
More file actions
38 lines (34 loc) · 1 KB
/
Module.java
File metadata and controls
38 lines (34 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Interface for IrcBot modules
*
*
* How modules work:
*
* The module does not need to have a constructor.
*
* Modules are given a Message and a boolean to say if the sender is an admin.
* This is done with Module.parse(message, isadmin).
*
* Then the IrcBot will request all outputs from the module.
* This is done with Module.outputs().
* If the module does not have any outputs (i.e, if the bot command returned by Message.getBotCommand()
* was not the same as the module's bot command) then it will return null.
*
* Right now, all modules need to me manually constructed and added to the modules set in IrcBot.
* A feature to eliminate this will be added later.
*
*
* @author wiiam
*
*/
public interface Module {
/**
* Returns all outputs that are to be sent as a string array
*/
public String[] outputs();
/**
* Takes the string that is send from the server, and parses it.
*/
public void parse(Message message, boolean isadmin);
//public HashSet<String> getSet();
}