+- Fixed one of codemastr's wonderful coding bugs. *slap slap slap*

This commit is contained in:
stskeeps 2001-02-27 11:42:55 +00:00
parent 98477e867e
commit 09fc76ed53
2 changed files with 8 additions and 2 deletions

View file

@ -261,3 +261,4 @@
removed inittoken, made command initalization happen in init_CommandHash
- Adapted /stats M to it. Removed /helpop ?commands temporary. Confirming
hashtable works.
- Fixed one of codemastr's wonderful coding bugs. *slap slap slap*

View file

@ -1584,13 +1584,18 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param, u_
retval = 1;
if (!(who = find_chasing(cptr, param, &chasing)))
break;
if (!(member = find_channel_link(who->user->channel, chptr)))
/* if (!(member = find_user_link(chptr->members, who)))*/
/* codemastr: your patch is a good idea here, but look at the
member->flags stuff longer down. this caused segfaults */
if (!(member = find_channel_link(who->user->channel, chptr)))
{
sendto_one(cptr, err_str(ERR_USERNOTINCHANNEL),
me.name, cptr->name, who->name, chptr->chname);
break;
}
member = find_user_link(chptr->members, who);
if (!member)
/* should never happen */
break;
/* we make the rules, we bend the rules */
if (IsServer(cptr) || IsULine(cptr))
goto breaktherules;