Exemple #1
0
TEST(MessageTest, Topic) {
	CTopicMessage msg;
	msg.Parse(":nick TOPIC #chan :topic");
	EXPECT_EQ("nick", msg.GetNick().GetNick());
	EXPECT_EQ("TOPIC", msg.GetCommand());
	EXPECT_EQ("#chan", msg.GetTarget());
	EXPECT_EQ("topic", msg.GetTopic());
	EXPECT_EQ(CMessage::Type::Topic, msg.GetType());

	msg.SetTopic("test");
	EXPECT_EQ("test", msg.GetTopic());
	EXPECT_EQ(":nick TOPIC #chan :test", msg.ToString());
}
Exemple #2
0
	EModRet OnTopicMessage(CTopicMessage& msg) override { vsHooks.push_back("OnTopicMessage"); vsMessages.push_back(msg.ToString()); vNetworks.push_back(msg.GetNetwork()); vChannels.push_back(msg.GetChan()); return eAction; }