mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-06 20:03:13 +02:00
+- When IRCOps are breaking into chans with invite only (+i) or
+ key-protection (+k) a eyes-notice is sent like it is on banwalk. -NiQuiL +
This commit is contained in:
@@ -411,3 +411,6 @@
|
||||
- Added a new Win32 GUI does it work, no one knows
|
||||
- Rewrote the ircd_log function a bit to fix the FD bug better, not sure wtf I was smoking
|
||||
when I wrote the last one :P
|
||||
- When IRCOps are breaking into chans with invite only (+i) or
|
||||
key-protection (+k) a eyes-notice is sent like it is on banwalk. -NiQuiL
|
||||
|
||||
|
||||
+27
-7
@@ -71,6 +71,7 @@ extern char *StripColors(char *);
|
||||
extern int lifesux;
|
||||
#endif
|
||||
|
||||
void over_notice PROTO((aClient *, aClient *, aChannel *, char *));
|
||||
static void add_invite PROTO((aClient *, aChannel *));
|
||||
static int add_banid PROTO((aClient *, aChannel *, char *));
|
||||
static int can_join PROTO((aClient *, aClient *, aChannel *, char *, char *,
|
||||
@@ -2371,6 +2372,31 @@ static int can_join(aClient *cptr, aClient *sptr, aChannel *chptr, char *key, ch
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sends notices to +e's about opers possibly abusing priv's
|
||||
* By NiQuiL (niquil@programmer.net)
|
||||
* suggestion by -ins4ne-
|
||||
*/
|
||||
|
||||
void over_notice(aClient *cptr, aClient *sptr, aChannel *chptr, char *key)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
for (lp = sptr->user->invited; lp; lp = lp->next)
|
||||
if (lp->value.chptr == chptr)
|
||||
break;
|
||||
|
||||
if (is_banned(cptr, sptr, chptr) && IsOper(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES, "*** Banwalk, [IRCop: %s] [Channel: %s]",sptr->name,chptr->chname);
|
||||
} else if (*chptr->mode.key && (BadPtr(key) || mycmp(chptr->mode.key, key))) {
|
||||
sendto_umode(UMODE_EYES, "*** Keywalk [IRCop: %s] [Channel: %s]",sptr->name,chptr->chname);
|
||||
} else if ((chptr->mode.mode & MODE_INVITEONLY) && !lp) {
|
||||
sendto_umode(UMODE_EYES, "*** Invitewalk [IRCop: %s] [Channel: %s]",sptr->name,chptr->chname);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Remove bells and commas from channel name
|
||||
@@ -2730,7 +2756,6 @@ int channel_link(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
** Complete user entry to the new channel (if any)
|
||||
*/
|
||||
@@ -2967,15 +2992,10 @@ int m_join(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
continue;
|
||||
|
||||
}
|
||||
if (is_banned(cptr, sptr, chptr) && IsOper(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES,
|
||||
"*** Banwalk [IRCop: %s] [Channel: %s]",
|
||||
sptr->name, chptr->chname);
|
||||
}
|
||||
/*
|
||||
** Complete user entry to the new channel (if any)
|
||||
*/
|
||||
(void)over_notice(cptr, sptr, chptr, key);
|
||||
add_user_to_channel(chptr, sptr, flags);
|
||||
/*
|
||||
** notify all other users on the new channel
|
||||
|
||||
Reference in New Issue
Block a user