summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/InspIRCd.layout30
-rw-r--r--src/mode.cpp5
-rw-r--r--src/xline.cpp4
3 files changed, 24 insertions, 15 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout
index 26ab5cd17..7149e45a4 100644
--- a/src/InspIRCd.layout
+++ b/src/InspIRCd.layout
@@ -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
diff --git a/src/mode.cpp b/src/mode.cpp
index b4b494340..f23546d75 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -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");
diff --git a/src/xline.cpp b/src/xline.cpp
index 1ef612ff1..152ca6e82 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -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);