1
0
Эх сурвалжийг харах

* Don't auto-op users returning from split

svn: 1184
Bryan Drewery 22 жил өмнө
parent
commit
3d0261e1c0

+ 1 - 0
doc/UPDATES

@@ -18,6 +18,7 @@ This is a summary of ChangeLog basically.
   If a user has a SECPASS set (default: random), auth hashing will occur.
   If a user has a SECPASS set (default: random), auth hashing will occur.
   If either of the above two things are empty, auth hashing will NOT occur.
   If either of the above two things are empty, auth hashing will NOT occur.
 * CLOAK_MIRC now randomly will add a SECOND version reply; some lame mIRC script.
 * CLOAK_MIRC now randomly will add a SECOND version reply; some lame mIRC script.
+* Users are no longer auto-opped on netsplit rejoin.
 
 
 1.1.9
 1.1.9
 
 

+ 4 - 1
src/mod/irc.mod/chan.c

@@ -2126,6 +2126,8 @@ static int gotjoin(char *from, char *chname)
       chan->status &= ~CHAN_PEND;
       chan->status &= ~CHAN_PEND;
       reset_chan_info(chan);
       reset_chan_info(chan);
     } else {
     } else {
+      int splitjoin = 0;
+
       m = ismember(chan, nick);
       m = ismember(chan, nick);
       if (m && m->split && !egg_strcasecmp(m->userhost, uhost)) {
       if (m && m->split && !egg_strcasecmp(m->userhost, uhost)) {
 	chan = findchan(chname);
 	chan = findchan(chname);
@@ -2141,6 +2143,7 @@ static int gotjoin(char *from, char *chname)
 
 
 	/* The tcl binding might have deleted the current user. Recheck. */
 	/* The tcl binding might have deleted the current user. Recheck. */
 	u = get_user_by_host(from);
 	u = get_user_by_host(from);
+        splitjoin++;
 	m->split = 0;
 	m->split = 0;
 	m->last = now;
 	m->last = now;
 	m->delay = 0L;
 	m->delay = 0L;
@@ -2245,7 +2248,7 @@ static int gotjoin(char *from, char *chname)
 	    m->flags |= SENTKICK;
 	    m->flags |= SENTKICK;
 	  }
 	  }
 	}
 	}
-        if (!chan_hasop(m) && dovoice(chan) && chk_autoop(fr, chan)) {
+        if (!splitjoin && !chan_hasop(m) && dovoice(chan) && chk_autoop(fr, chan)) {
           do_op(m->nick, chan, 1, 0);
           do_op(m->nick, chan, 1, 0);
         }
         }
       }
       }