- if (huser_get_level(husr) == H_LAMER)
- while (husr->hchannels)
- helpmod_kick(husr->hchannels->hchan, husr, "Your presence on channel %s is not wanted", hchannel_get_name(husr->hchannels->hchan));
+ if (huser_get_level(husr) == H_LAMER) {
+ for (huserchan = husr->hchannels; huserchan; huserchan = huserchannext) {
+ huserchannext = huserchan->next;
+ helpmod_kick(huserchan->hchan, husr, "Your presence on channel %s is not wanted", hchannel_get_name(huserchan->hchan));
+ }
+ }