Communi: Log Identify try and NOTICE messages in log
This commit is contained in:
parent
fd686f55a0
commit
5c2d081a31
2 changed files with 10 additions and 0 deletions
|
@ -78,6 +78,7 @@ void MyIrcSession::on_connected() {
|
|||
if (getIdentify().find(" ") != std::string::npos) {
|
||||
std::string to = getIdentify().substr(0, getIdentify().find(" "));
|
||||
std::string what = getIdentify().substr(getIdentify().find(" ") + 1);
|
||||
LOG4CXX_INFO(logger, user << ": Sending IDENTIFY message to " << to);
|
||||
sendCommand(IrcCommand::createMessage(FROM_UTF8(to), FROM_UTF8(what)));
|
||||
}
|
||||
}
|
||||
|
@ -387,6 +388,11 @@ void MyIrcSession::awayTimeout() {
|
|||
}
|
||||
}
|
||||
|
||||
void MyIrcSession::on_noticeMessageReceived(IrcMessage *message) {
|
||||
IrcNoticeMessage *m = (IrcNoticeMessage *) message;
|
||||
LOG4CXX_INFO(logger, user << ": NOTICE " << TO_UTF8(m->message()));
|
||||
}
|
||||
|
||||
void MyIrcSession::onMessageReceived(IrcMessage *message) {
|
||||
// LOG4CXX_INFO(logger, user << ": " << TO_UTF8(message->toString()));
|
||||
switch (message->type()) {
|
||||
|
@ -414,6 +420,9 @@ void MyIrcSession::onMessageReceived(IrcMessage *message) {
|
|||
case IrcMessage::Numeric:
|
||||
on_numericMessageReceived(message);
|
||||
break;
|
||||
case IrcMessage::Notice:
|
||||
on_noticeMessageReceived(message);
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,6 +131,7 @@ public:
|
|||
void on_topicChanged(IrcMessage *message);
|
||||
void on_messageReceived(IrcMessage *message);
|
||||
void on_numericMessageReceived(IrcMessage *message);
|
||||
void on_noticeMessageReceived(IrcMessage *message);
|
||||
|
||||
std::string suffix;
|
||||
int rooms;
|
||||
|
|
Loading…
Add table
Reference in a new issue