]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
Halfop priv bug + Oo version flags + LEAST_IDLE
authorluke <redacted>
Tue, 20 Aug 2002 18:47:37 +0000 (18:47 +0000)
committerluke <redacted>
Tue, 20 Aug 2002 18:47:37 +0000 (18:47 +0000)
Changes
include/config.h
src/channel.c
src/s_debug.c

diff --git a/Changes b/Changes
index f7a5b65dbdfb05e1fdb3a83363d71785ac6b4308..8171e658ba32793d484e0d62c75482f953e06d9b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -639,3 +639,18 @@ Fixed userhost displaying * all the time
 Fixed broken m_invite, thanks to codemastr
 --Luke
 ===================================
+
+Fixed halfop kick priv bug thanks to JK
+--Luke
+===================================
+
+Added Oo flags in version response if
+OPEROVERRIDE is enabled, and OPEROVERRIDE_VERIFY
+enabled.
+--Luke
+===================================
+
+Removed LEAST_IDLE, served no useful purpose
+really.
+--Luke
+===================================
index 41d40816c121dec4a736d1fa8881cbef21be72cd..a285755c49cf570b6feff7fb588da016691ecbfd 100644 (file)
  *   channels, preventing them from "accidentally" joining random
  *   channels
  */
+#ifndef NO_OPEROVERRIDE
+#define OPEROVERRIDE_VERIFY 1
+#else
 #undef OPEROVERRIDE_VERIFY
+#endif
 
 /*
  * Disable /sethost, /setident, /chgname, /chghost, /chgident 
@@ -615,8 +619,6 @@ extern void debug();
 # endif
 #endif
 
-#  undef LEAST_IDLE
-
 #if defined(mips) || defined(PCS)
 #undef SYSV
 #endif
index 09243e297e1ff3bbc3906f0bc07783ae624b0a17..44d7e0ef5265982d4ceb4f2190248436fca413d0 100644 (file)
@@ -3436,6 +3436,18 @@ int  m_kick(cptr, sptr, parc, parv)
                                            me.name, sptr->name, chptr->chname);
                                        goto deny;
                                }
+
+                               /* I pondered adding && !is_chan_op(who,chptr) in with is_half_op, but that's redundant
+                                * since the previous check would already have sent you to deny.
+                                */
+                               if (is_half_op(who,chptr) && is_halfop(sptr,chptr)
+                                   && !is_chan_op(sptr,chptr))
+                               {
+                                       sendto_one(sptr,
+                                           ":%s NOTICE %s :*** You cannot kick halfops on %s if you are only a halfop",
+                                           me.name, sptr->name, chptr->chname);
+                                       goto deny;
+                               }
                                
                                /* Protected users, Owners, and Services can't get nailed unless they're nailing themselves
                                 * However, owners CAN nail protected users, as they're higher.
@@ -3829,37 +3841,42 @@ int  m_invite(cptr, sptr, parc, parv)
        if (over) {
                if (is_banned(acptr, sptr, chptr))
                {
-                               sendto_umode(UMODE_EYES,
-                                 "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +b).",
-                                 sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +b).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
                }
                else if (chptr->mode.mode & MODE_INVITEONLY)
                {
-                               sendto_umode(UMODE_EYES,
-                                 "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +i).",
-                                 sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +i).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
                }
                else if (chptr->mode.limit)
                {
-                               sendto_umode(UMODE_EYES,
-                                 "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +l).",
-                                 sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +l).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
                }
                else if (chptr->mode.mode & MODE_RGSTRONLY)
                {
-                               sendto_umode(UMODE_EYES,
-                                 "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +R).",
-                                 sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +R).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
                }
                else if (*chptr->mode.key)
                {
-                               sendto_umode(UMODE_EYES,
-                                 "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +k).",
-                                 sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +k).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
                }
 #ifdef OPEROVERRIDE_VERIFY
                else if (chptr->mode.mode & MODE_SECRET || chptr->mode.mode & MODE_PRIVATE)
-                      over = -1;       
+               {
+                       sendto_umode(UMODE_EYES,
+                         "*** OperOverride -- %s (%s@%s) invited him/herself into %s (potentially overriding +s or +p).",
+                         sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+                       over = -1;
+               }
 #endif
                else
                        return 0;
index 84c8f2076be459da450afe378ccb55a3a4313932..cbf1a03bca814b8b5ac4dcba0fe2ad8175210abb 100644 (file)
@@ -54,9 +54,6 @@ char serveropts[] = {
 #ifndef        NO_DEFAULT_INVISIBLE
        'I',
 #endif
-#ifdef LEAST_IDLE
-       'L',
-#endif
 #ifdef CRYPT_OPER_PASSWORD
        'p',
 #endif
@@ -87,6 +84,12 @@ char serveropts[] = {
 #ifdef ENABLE_INVISOPER
        'R',
 #endif
+#ifndef NO_OPEROVERRIDE
+       'O',
+#endif
+#ifdef OPEROVERRIDE_VERIFY
+       'o',
+#endif
 #ifdef NO_IDENT_CHECKING
        'K',
 #endif