ircbot

Class Person

Implemented Interfaces:
Comparable, Serializable

public class Person
extends java.lang.Object
implements Serializable, Comparable

Field Summary

static long
serialVersionUID

Constructor Summary

Person(String nick)
Create a new person.

Method Summary

void
addAlias(String alias)
Add an alias to this person.
int
compareTo(Person p)
void
decScore()
void
decScore(int s)
Collection
getAliases()
Get a collection of nicks used by this person.
String
getDescription()
Get a short description about this person.
Date
getFirstSeen()
String
getGreeting()
Get the greeting phrase used to greet this person.
Language
getLanguage()
Get this persons preferred language.
Date
getLastActive()
Date
getLastLeave(IRCChannel channel)
long
getMessages()
Get the number of messages this person has sent in total.
String
getNick()
Get the nick of this person.
String
getPicture()
Get a url to an image showing this user.
long
getSadies()
long
getScore()
Get this persons score.
double
getShoutFrequency()
long
getSmilies()
PersonalStats
getStatistics(IRCChannel channel)
Get this persons statistics for the given channel.
Collection
getWarnings()
long
getWords()
Get the number of words this person has sent in total.
void
incScore()
void
incScore(long s)
boolean
isAuthorized(Modules.CommandType ct, IRCChannel channel)
boolean
isIgnored()
boolean
isOnline(IRCChannel channel)
boolean
isOperator()
boolean
isTrustee()
void
mergeWith(Person p2)
void
notice(IRCChannel channel, People.NoticeType type)
void
registerMessage(IRCMessage message)
void
removeAlias(String alias)
void
setDescription(String desc)
void
setGreeting(String text)
void
setIgnored(boolean val)
void
setLanguage(Language l)
void
setNick(String newNick)
Set the nick of this person.
void
setOperator(boolean val)
void
setPicture(String url)
void
setScore(int score)
void
setTrustee(boolean val)
String
toString()

Field Details

serialVersionUID

public static final long serialVersionUID
Field Value:
6L

Constructor Details

Person

public Person(String nick)
Create a new person.
Parameters:
nick -

Method Details

addAlias

public void addAlias(String alias)
Add an alias to this person. Will not add the alias if it is equal to this persons nick.
Parameters:
alias -

compareTo

public int compareTo(Person p)

decScore

public void decScore()

decScore

public void decScore(int s)

getAliases

public Collection getAliases()
Get a collection of nicks used by this person. The default nick as returned by getNick() is not included in this collection.

getDescription

public String getDescription()
Get a short description about this person. User editable.

getFirstSeen

public Date getFirstSeen()

getGreeting

public String getGreeting()
Get the greeting phrase used to greet this person. User editable.

getLanguage

public Language getLanguage()
Get this persons preferred language.

getLastActive

public Date getLastActive()

getLastLeave

public Date getLastLeave(IRCChannel channel)

getMessages

public long getMessages()
Get the number of messages this person has sent in total. (All channels.)

getNick

public String getNick()
Get the nick of this person.

getPicture

public String getPicture()
Get a url to an image showing this user. User editable.

getSadies

public long getSadies()

getScore

public long getScore()
Get this persons score. A person can earn score by playing games or saying nice things in the channels.

getShoutFrequency

public double getShoutFrequency()

getSmilies

public long getSmilies()

getStatistics

public PersonalStats getStatistics(IRCChannel channel)
Get this persons statistics for the given channel.
Parameters:
channel -

getWarnings

public Collection getWarnings()

getWords

public long getWords()
Get the number of words this person has sent in total. (All channels.)

incScore

public void incScore()

incScore

public void incScore(long s)

isAuthorized

public boolean isAuthorized(Modules.CommandType ct,
                            IRCChannel channel)

isIgnored

public boolean isIgnored()

isOnline

public boolean isOnline(IRCChannel channel)

isOperator

public boolean isOperator()

isTrustee

public boolean isTrustee()

mergeWith

public void mergeWith(Person p2)

notice

public void notice(IRCChannel channel,
                   People.NoticeType type)

registerMessage

public void registerMessage(IRCMessage message)

removeAlias

public void removeAlias(String alias)

setDescription

public void setDescription(String desc)

setGreeting

public void setGreeting(String text)

setIgnored

public void setIgnored(boolean val)

setLanguage

public void setLanguage(Language l)

setNick

public void setNick(String newNick)
Set the nick of this person. If the nick exists as an alias, it is removed from the alias list. The old nick is thrown away.
Parameters:
newNick -

setOperator

public void setOperator(boolean val)

setPicture

public void setPicture(String url)

setScore

public void setScore(int score)

setTrustee

public void setTrustee(boolean val)

toString

public String toString()