From: Michael Poole Date: Mon, 31 Oct 2011 04:12:34 +0000 (-0400) Subject: Fix which userData is checked for deny-nonchannel memo sending. X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=ffcb5269fdd500f1f7b1603fa9442115d8df3d4b Fix which userData is checked for deny-nonchannel memo sending. Fixes SourceForge bug #3308832. src/mod-memoserv.c (memoserv_can_send): Require the recipient to have joined a channel for their membership there to count as common with the sender. (This was the original intent.) --- diff --git a/src/mod-memoserv.c b/src/mod-memoserv.c index 6b26050..78c7887 100644 --- a/src/mod-memoserv.c +++ b/src/mod-memoserv.c @@ -230,8 +230,7 @@ memoserv_can_send(struct userNode *bot, struct userNode *user, struct memo_accou if (!(account->flags & MEMO_DENY_NONCHANNEL)) return 1; for (dest = account->handle->channels; dest; dest = dest->u_next) { - struct userData *recip = _GetChannelUser(dest->channel, user->handle_info, 1, 0); - if (recip != NULL && recip->seen != 0) + if (dest->seen && _GetChannelUser(dest->channel, user->handle_info, 1, 0)) return 1; } send_message(user, bot, "MSMSG_CANNOT_SEND", account->handle->handle);