void test_irc_kick() { char msg[READ_BUF]; irc_kick("#circus", "circus", "Foo"); read_mock(msg); mu_assert(s_eq(msg, "KICK #circus circus :Foo\r\n"), "test_irc_kick: msg should be 'KICK #circus circus :Foo\\r\\n'"); }
void KickChannelUser(struct userNode* target, struct chanNode* channel, struct userNode *kicker, const char *why) { unsigned int n; if (!target || !channel || IsService(target) || !GetUserMode(channel, target)) return; /* This may break things, but lets see.. -Rubin */ for (n=0; n<kf_used; n++) kf_list[n](kicker, target, channel, kf_list_extra[n]); /* don't remove them from the channel, since the server will send a PART */ irc_kick(kicker, target, channel, why); if (IsLocal(target)) { /* NULL reason because we don't want a PART message to be sent by DelChannelUser. */ DelChannelUser(target, channel, NULL, 0); } }