Package org.schwering.irc.lib
Class IRCUser
- java.lang.Object
-
- org.schwering.irc.lib.IRCUser
-
public class IRCUser extends java.lang.Object
Holds variables for the nick, username and host of a user.It's used to pack these information in one object.
- See Also:
IRCEventListener
,IRCParser
-
-
Constructor Summary
Constructors Constructor Description IRCUser(java.lang.String nick, java.lang.String username, java.lang.String host)
Creates a newIRCUser
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHost()
Returns the host of the person who sent the line.java.lang.String
getNick()
Returns the nickname of the person who sent the line or the servername of the server which sent the line.java.lang.String
getServername()
Returns the servername of the server which sent the line or the nickname of the person who sent the line.java.lang.String
getUsername()
Returns the username of the person who sent the line.java.lang.String
toString()
Returns the nickname.
-
-
-
Method Detail
-
getNick
public java.lang.String getNick()
Returns the nickname of the person who sent the line or the servername of the server which sent the line.
If no nickname is given,null
is returned.
Note: This method is totally equal togetServername
!- Returns:
- The nickname or the servername of the line. If no nick is given,
null
is returned. - See Also:
getServername()
,getUsername()
,getHost()
-
getServername
public java.lang.String getServername()
Returns the servername of the server which sent the line or the nickname of the person who sent the line.
If no nickname is given,null
is returned.
Note: This method is totally equal togetNick
!- Returns:
- The servername or the nickname of the line. If no server is given,
null
is returned. - See Also:
getNick()
-
getUsername
public java.lang.String getUsername()
Returns the username of the person who sent the line.
If the username is not specified, this method returnsnull
.
-
getHost
public java.lang.String getHost()
Returns the host of the person who sent the line.
If the host is not specified, this method returnsnull
.- Returns:
- The host of the line;
null
if it's not given. - See Also:
getNick()
,getUsername()
-
toString
public java.lang.String toString()
Returns the nickname.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The nickname.
-
-