Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void relay_private_notice(struct Client* sptr, const char* name, const char* text)
- {
- struct Client* acptr;
- struct Membership* chansrc;
- struct Membership* chandst;
- const struct User* usersrc = cli_user(sptr);
- const struct User* userdst = cli_user(acptr);
- int chanfound=0;
- ...
- /* ScaryNet
- * +C check, if target is in a common channel with the destination
- * allow, otherwise reject
- */
- if (IsInchanOnly(acptr) && !IsOper(sptr) && !IsChannelService(sptr)) {
- for (chansrc = usersrc->channel; chansrc; chansrc = chansrc->next_channel) {
- for (chandst = userdst->channel; chandst; chandst = chandst->next_channel) {
- if (chandst->channel == chansrc->channel) {
- chanfound = 1;
- break;
- }
- }
- if (chanfound == 1)
- break;
- }
- MyFree(chansrc);
- MyFree(chandst);
- if (chanfound == 0) {
- return;
- }
- }
- /*
- * deliver the message
- */
- if (MyUser(acptr))
- add_target(acptr, sptr);
- sendcmdto_one(sptr, CMD_NOTICE, acptr, "%C :%s", acptr, text);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement