|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elite.jdcbot.framework.UserManager
public class UserManager
An user menager class.
This class holds all data about all users present on the hub like description, e-mail... You shoudn't use this class directly, idea is to have only ine instance and that one is in jDCBot class. You should rather add methods in jDCBot (example is GetRandomUser in jDCBot class)
Nested Class Summary | |
---|---|
private class |
UserManager.SendingAll
|
Field Summary | |
---|---|
private jDCBot |
_bot
|
private java.util.Vector<User> |
users
|
Constructor Summary | |
---|---|
UserManager(jDCBot bot)
|
Method Summary | |
---|---|
void |
addOps(java.lang.String user_list)
Sets the users (including the bot) in the list as operators. |
void |
addUsers(java.lang.String user_list)
Add all users from the user list (user nick are delimited with '$$') Note: When this methos is called then all pre-existing users will be lost. |
User[] |
getAllUsers()
|
User |
getRandomUser()
Gets random user from the hub |
User |
getUser(java.lang.String user)
Gets everything about user. |
private java.util.ArrayList<java.lang.String> |
parseDoubleDollarList(java.lang.String list)
Parses double dollar delimited list. |
void |
SendAll(java.lang.String pm,
long timeout)
Sends message to all user on the hub |
void |
SetInfo(java.lang.String info)
Sets user info (description, e-mail...) |
void |
updateUserIPs(java.lang.String list)
|
boolean |
userExist(java.lang.String user)
|
void |
userJoin(java.lang.String user)
Add user to our list since user joined hub |
void |
userQuit(java.lang.String user)
Throw out user from our list since he quited |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Vector<User> users
private jDCBot _bot
Constructor Detail |
---|
public UserManager(jDCBot bot)
Method Detail |
---|
public void addUsers(java.lang.String user_list)
user_list
- List of all users delimited with '$$'public void updateUserIPs(java.lang.String list)
public void addOps(java.lang.String user_list)
user_list
- private java.util.ArrayList<java.lang.String> parseDoubleDollarList(java.lang.String list)
list
- The list (only).
public void userQuit(java.lang.String user)
user
- Nick of the user who quitedpublic void userJoin(java.lang.String user)
user
- Nick of the user who joinedpublic boolean userExist(java.lang.String user)
user
- Nick of the user to find out is he on the hub
public User getUser(java.lang.String user)
user
- Nick of the user
public User getRandomUser()
public User[] getAllUsers()
public void SetInfo(java.lang.String info)
info
- Info from the user that will be parsedpublic void SendAll(java.lang.String pm, long timeout)
pm
- Message to be senttimeout
- Timeout inteval in milliseconds between to private
messages
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |