1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 08:33:13 +02:00

Fixed the /list showing only 64 channels bug

This commit is contained in:
codemastr
2000-10-29 18:02:59 +00:00
parent d0404fd0e8
commit c2de53cf85
4 changed files with 16 additions and 35 deletions
+2 -1
View File
@@ -670,4 +670,5 @@
- Fixed a linking bug (where did that come from)
- Fixed bug where duplicate numerics could occur
- Fixed the hashing bug (thank you ROXnet ...)
- Fixed a wierd channel message bug ||
- Fixed a wierd channel message bug ||
- Fixed a bug where non-NS servers would crash when linking
+1 -1
View File
@@ -272,7 +272,7 @@ extern void free_ban PROTO((Ban *));
extern void free_conf PROTO((aConfItem *));
extern void free_class PROTO((aClass *));
extern void free_user PROTO((anUser *, aClient *));
extern int find_str_match_link PROTO((Link **, char *));
extern int find_str_match_link PROTO((Link *, char *));
extern void free_str_list PROTO((Link *));
extern Link *make_link PROTO(());
extern Ban *make_ban PROTO(());
+8 -8
View File
@@ -3747,18 +3747,18 @@ char mode_buf[MODEBUFLEN], parabuf[MODEBUFLEN];
continue;
if (lopt->nolist &&
(find_str_match_link(&
(lopt->nolist), chptr->chname)
(find_str_match_link(lopt->nolist,
chptr->chname)
|| (chptr->topic ?
find_str_match_link(&(lopt->nolist),
find_str_match_link(lopt->nolist,
chptr->topic) : 0)))
continue;
if (lopt->yeslist &&
(!find_str_match_link(&
(lopt->yeslist), chptr->chname)
(!find_str_match_link(
lopt->yeslist, chptr->chname)
&&
!find_str_match_link(&
(lopt->yeslist), chptr->topic)))
!find_str_match_link(
lopt->yeslist, chptr->topic)))
continue;
#ifdef LIST_SHOW_MODES
mode_buf[0] = '[';
@@ -3798,7 +3798,7 @@ char mode_buf[MODEBUFLEN], parabuf[MODEBUFLEN];
}
/* All done */
if (hashnum == CH_MAX);
if (hashnum == CH_MAX)
{
Link *lp, *next;
sendto_one(cptr, rpl_str(RPL_LISTEND), me.name, cptr->name);
+5 -25
View File
@@ -375,34 +375,14 @@ Link *find_channel_link(lp, ptr)
return NULL;
}
/*
* Look for a match in a list of strings. Go through the list, and run
* match() on it. Side effect: if found, this link is moved to the top of
* the list.
*/
int find_str_match_link(lp, str)
Link **lp; /* Two **'s, since we might modify the original *lp */
char *str;
/* Based on find_str_link() from bahamut -- codemastr */
int find_str_match_link(Link *lp, char *charptr)
{
Link **head = lp;
if (!str || !lp)
if (!charptr)
return 0;
if (lp && *lp)
{
if (!match((*lp)->value.cp, str))
for (; lp; lp = lp->next) {
if(!match(lp->value.cp, charptr))
return 1;
for (; (*lp)->next; *lp = (*lp)->next)
if (!match((*lp)->next->value.cp, str))
{
Link *temp = (*lp)->next;
*lp = (*lp)->next->next;
temp->next = *head;
*head = temp;
return 1;
}
return 0;
}
return 0;
}