]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
XLine fixes and fix to +l with large limits
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 25 Apr 2004 00:37:31 +0000 (00:37 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 25 Apr 2004 00:37:31 +0000 (00:37 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@721 e03df62e-2008-0410-955e-edbf42e46eb7

src/InspIRCd.layout
src/mode.cpp
src/xline.cpp

index 26ab5cd17041c5df6d2fcb48b99314cb586c7e34..7149e45a41bc2fbb3f063317827f8268976f2703 100644 (file)
@@ -1,5 +1,5 @@
 [Editors]
-Focused=43
+Focused=42
 Order=2,4,6,3,7,25,5,24,39,42,43,-1,1,46,0
 
 [Editor_0]
@@ -13,9 +13,9 @@ LeftChar=1
 [Editor_1]
 Open=1
 Top=0
-CursorCol=2
-CursorRow=2245
-TopLine=2204
+CursorCol=31
+CursorRow=2154
+TopLine=2110
 LeftChar=1
 
 [Editor_2]
@@ -141,9 +141,9 @@ LeftChar=1
 [Editor_17]
 Open=1
 Top=0
-CursorCol=21
-CursorRow=38
-TopLine=105
+CursorCol=22
+CursorRow=117
+TopLine=1
 LeftChar=1
 
 [Editor_18]
@@ -322,17 +322,17 @@ TopLine=1
 LeftChar=1
 [Editor_42]
 Open=1
-Top=0
-CursorCol=19
-CursorRow=36
-TopLine=10
+Top=1
+CursorCol=33
+CursorRow=660
+TopLine=618
 LeftChar=1
 [Editor_43]
 Open=1
-Top=1
-CursorCol=14
-CursorRow=1776
-TopLine=1743
+Top=0
+CursorCol=1
+CursorRow=2083
+TopLine=2066
 LeftChar=1
 [Editor_44]
 Open=1
index b4b494340626a712356511f479fab099cb8d4eb2..f23546d75ef9d2a1da081ba431905c3105bf09c8 100644 (file)
@@ -656,6 +656,11 @@ void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int
                                                        break;
                                                
                                                chan->limit = atoi(parameters[param]);
+                                               
+                                               // reported by mech: large values cause underflow
+                                               if (chan->limit < 0)
+                                                       chan->limit = MAXINT;
+                                                       
                                                if (chan->limit)
                                                {
                                                        strcat(outlist,"l");
index 1ef612ff114090a662c126d7092705cbc76bb415..152ca6e822b2f649e3466c0621e438d4581d8b5c 100644 (file)
@@ -205,6 +205,7 @@ void read_xline_defaults()
 
 void add_gline(long duration, char* source, char* reason, char* hostmask)
 {
+       del_gline(hostmask);
        GLine item;
        item.duration = duration;
        strncpy(item.hostmask,hostmask,MAXBUF);
@@ -219,6 +220,7 @@ void add_gline(long duration, char* source, char* reason, char* hostmask)
 
 void add_qline(long duration, char* source, char* reason, char* nickname)
 {
+       del_qline(nickname);
        QLine item;
        item.duration = duration;
        strncpy(item.nick,nickname,MAXBUF);
@@ -233,6 +235,7 @@ void add_qline(long duration, char* source, char* reason, char* nickname)
 
 void add_zline(long duration, char* source, char* reason, char* ipaddr)
 {
+       del_zline(ipaddr);
        ZLine item;
        item.duration = duration;
        strncpy(item.ipaddr,ipaddr,MAXBUF);
@@ -247,6 +250,7 @@ void add_zline(long duration, char* source, char* reason, char* ipaddr)
 
 void add_kline(long duration, char* source, char* reason, char* hostmask)
 {
+       del_kline(hostmask);
        KLine item;
        item.duration = duration;
        strncpy(item.hostmask,hostmask,MAXBUF);