Exemple #1
0
TEST(MessageTest, Kick) {
	CKickMessage msg;
	msg.Parse(":nick KICK #chan person :reason");
	EXPECT_EQ("nick", msg.GetNick().GetNick());
	EXPECT_EQ("KICK", msg.GetCommand());
	EXPECT_EQ("#chan", msg.GetTarget());
	EXPECT_EQ("person", msg.GetKickedNick());
	EXPECT_EQ("reason", msg.GetReason());
	EXPECT_EQ(CMessage::Type::Kick, msg.GetType());

	msg.SetKickedNick("noone");
	EXPECT_EQ("noone", msg.GetKickedNick());
	msg.SetReason("test");
	EXPECT_EQ("test", msg.GetReason());
	EXPECT_EQ(":nick KICK #chan noone :test", msg.ToString());
}
Exemple #2
0
	void OnKickMessage(CKickMessage& msg) override { vsHooks.push_back("OnKickMessage"); vsMessages.push_back(msg.ToString()); vNetworks.push_back(msg.GetNetwork()); vChannels.push_back(msg.GetChan()); }