Public Member Functions
Ea::ChatHandler Class Reference

#include <chathandler.h>

Inheritance diagram for Ea::ChatHandler:
Net::ChatHandler EAthena::ChatHandler TmwAthena::ChatHandler

Public Member Functions

 ChatHandler ()
 ~ChatHandler ()
void me (const std::string &text) const
void clear () const
- Public Member Functions inherited from Net::ChatHandler
 ChatHandler ()
virtual void talk (const std::string &text) const =0
virtual void talkPet (const std::string &text) const =0
virtual void talkRaw (const std::string &text) const =0
virtual void privateMessage (const std::string &recipient, const std::string &text) const =0
virtual void channelMessage (const std::string &channel, const std::string &text) const =0
virtual void joinChannel (const std::string &channel) const =0
virtual void partChannel (const std::string &channel) const =0
virtual void who () const =0
virtual void sendRaw (const std::string &args) const =0
virtual void ignoreAll () const =0
virtual void unIgnoreAll () const =0
virtual void ignore (const std::string &nick) const =0
virtual void unIgnore (const std::string &nick) const =0
virtual void requestIgnoreList () const =0
virtual void createChatRoom (const std::string &title, const std::string &password, const int limit, const bool isPublic) const =0
virtual void leaveChatRoom () const =0
virtual void battleTalk (const std::string &text) const =0
virtual void joinChat (const ChatObject *const chat, const std::string &password) const =0
virtual void setChatRoomOptions (const int limit, const bool isPublic, const std::string &password, const std::string &title) const =0
virtual void setChatRoomOwner (const std::string &nick) const =0
virtual void kickFromChatRoom (const std::string &nick) const =0

Detailed Description

Definition at line 36 of file chathandler.h.

Constructor & Destructor Documentation

◆ ChatHandler()

Ea::ChatHandler::ChatHandler ( )

Definition at line 35 of file chathandler.cpp.

36 {
40  ChatRecv::mShowAllLang = (serverConfig.getValue("showAllLang", 0) != 0);
42  ChatRecv::mSkipping = true;
43 }
std::string getValue(const std::string &key, const std::string &deflt) const
bool getBoolValue(const std::string &key) const
Configuration config
Configuration serverConfig
bool mShowAllLang
Definition: chatrecv.cpp:51
time_t mMotdTime
Definition: chatrecv.cpp:50
bool mShowMotd
Definition: chatrecv.cpp:52
bool mSkipping
Definition: chatrecv.cpp:53
WhisperQueue mSentWhispers
Definition: chatrecv.cpp:49
std::string empty
Definition: podict.cpp:26

References config, empty, Configuration::getBoolValue(), ConfigurationObject::getValue(), Ea::ChatRecv::mMotdTime, Ea::ChatRecv::mSentWhispers, Ea::ChatRecv::mShowAllLang, Ea::ChatRecv::mShowMotd, Ea::ChatRecv::mSkipping, and serverConfig.

◆ ~ChatHandler()

Ea::ChatHandler::~ChatHandler ( )

Reimplemented from Net::ChatHandler.

Reimplemented in TmwAthena::ChatHandler, and EAthena::ChatHandler.

Definition at line 45 of file chathandler.cpp.

46 {
47  clear();
48 }
void clear() const
Definition: chathandler.cpp:50

References clear().

Member Function Documentation

◆ clear()

void Ea::ChatHandler::clear ( ) const

Implements Net::ChatHandler.

Definition at line 50 of file chathandler.cpp.

51 {
53  ChatRecv::mSkipping = true;
54 }

References config, Configuration::getBoolValue(), Ea::ChatRecv::mShowMotd, and Ea::ChatRecv::mSkipping.

Referenced by ~ChatHandler().

◆ me()

void Ea::ChatHandler::me ( const std::string &  text) const

Implements Net::ChatHandler.

Definition at line 56 of file chathandler.cpp.

57 {
58  // here need string duplication
59  std::string action = strprintf("*%s*", text.c_str());
60  talk(action);
61 }
virtual void talk(const std::string &text) const =0
std::string strprintf(const char *const format,...)

References strprintf(), and Net::ChatHandler::talk().

The documentation for this class was generated from the following files: