jerklib.events.impl
Class CtcpEventImpl

java.lang.Object
  extended by jerklib.events.impl.CtcpEventImpl
All Implemented Interfaces:
CtcpEvent, IRCEvent, MessageEvent

public class CtcpEventImpl
extends Object
implements CtcpEvent

Author:
mohadib
See Also:
CtcpEvent

Nested Class Summary
 
Nested classes/interfaces inherited from interface jerklib.events.IRCEvent
IRCEvent.Type
 
Constructor Summary
CtcpEventImpl(String ctcpString, String hostName, String message, String nick, String userName, String rawEventData, Channel channel, Session session)
           
 
Method Summary
 Channel getChannel()
          returns IRCChannel object the PrivMsg occured in
 String getCtcpString()
          Returns the CTCP query
 String getHostName()
          getHostName() returns a string that represents the host of the creator of this event
 String getMessage()
          getMessage() returns the message part of the event
 String getNick()
          returns the nick of the person who created the PrivMsgIRCEvent
 String getRawEventData()
          Returns the raw IRC data that makes up this event
 Session getSession()
          Gets session for connection
 IRCEvent.Type getType()
          Used to find out the exact type of event the IRCEvent object is.
 String getUserName()
          This will return the username field of the user's hostmask nick!username@host
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CtcpEventImpl

public CtcpEventImpl(String ctcpString,
                     String hostName,
                     String message,
                     String nick,
                     String userName,
                     String rawEventData,
                     Channel channel,
                     Session session)
Method Detail

getCtcpString

public String getCtcpString()
Description copied from interface: CtcpEvent
Returns the CTCP query

Specified by:
getCtcpString in interface CtcpEvent
Returns:
ctcp query

getChannel

public Channel getChannel()
Description copied from interface: MessageEvent
returns IRCChannel object the PrivMsg occured in

Specified by:
getChannel in interface MessageEvent
Returns:
the Channel object

getHostName

public String getHostName()
Description copied from interface: MessageEvent
getHostName() returns a string that represents the host of the creator of this event

Specified by:
getHostName in interface MessageEvent
Returns:
the host name

getMessage

public String getMessage()
Description copied from interface: MessageEvent
getMessage() returns the message part of the event

Specified by:
getMessage in interface MessageEvent
Returns:
the message

getNick

public String getNick()
Description copied from interface: MessageEvent
returns the nick of the person who created the PrivMsgIRCEvent

Specified by:
getNick in interface MessageEvent
Returns:
the nick

getUserName

public String getUserName()
Description copied from interface: MessageEvent
This will return the username field of the user's hostmask nick!username@host

Specified by:
getUserName in interface MessageEvent
Returns:
the login field

getRawEventData

public String getRawEventData()
Description copied from interface: IRCEvent
Returns the raw IRC data that makes up this event

Specified by:
getRawEventData in interface IRCEvent
Returns:
Raw IRC event text.

getSession

public Session getSession()
Description copied from interface: IRCEvent
Gets session for connection

Specified by:
getSession in interface IRCEvent
Returns:
Session

getType

public IRCEvent.Type getType()
Description copied from interface: IRCEvent
Used to find out the exact type of event the IRCEvent object is. The IRCEvent object can be cast into a more specific event object to get access to convience methods for the specific event types.

Specified by:
getType in interface IRCEvent
Returns:
Type of event