summaryrefslogtreecommitdiff
path: root/src/news.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/news.c')
-rw-r--r--src/news.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/news.c b/src/news.c
index 0b5ab796b..44195a985 100644
--- a/src/news.c
+++ b/src/news.c
@@ -1,4 +1,4 @@
-
+/* News functions.
/* News functions.
*
* (C) 2003 Anope Team
@@ -496,8 +496,10 @@ static void do_news_del(User * u, int16 type, int *msgs,
if (num > 0 && del_newsitem(num, type)) {
notice_lang(s_OperServ, u, msgs[MSG_DELETED], num);
/* Reset the order - #0000397 */
- for (i = 0; i < nnews; i++)
- news[i].num = i + 1;
+ for (i = 0; i < nnews; i++) {
+ if ((news[i].type == type) && (news[i].num > num))
+ news[i].num--;
+ }
} else
notice_lang(s_OperServ, u, msgs[MSG_DEL_NOT_FOUND], num);
} else {
@@ -537,3 +539,4 @@ static int del_newsitem(int num, short type)
/*************************************************************************/
+