Changeset - 5c2d081a315c
[Not reviewed]
0 2 0
HanzZ - 12 years ago 2013-02-27 14:17:15
hanzz.k@gmail.com
Communi: Log Identify try and NOTICE messages in log
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libcommuni/session.cpp
Show inline comments
 
@@ -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;
 
	}
 
}
backends/libcommuni/session.h
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)