+ irc::modestacker modestack(false);
+ StringDeque stackresult;
+ const char* mode_junk[MAXMODES+1];
+ userrec* myhorriblefakeuser = new userrec(Srv);
+ myhorriblefakeuser->SetFd(FD_MAGIC_NUMBER);
+
+ mode_junk[0] = chan->name;
+
+ for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
+ {
+ modestack.Push('b', i->targetchan.insert(0, i->banmask));
+ }
+
+ for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
+ {
+ modestack.PushPlus();
+ modestack.Push('b', i->banmask);
+ }
+
+ while(modestack.GetStackedLine(stackresult))
+ {
+ for(StringDeque::size_type i = 0; i < stackresult.size(); i++)
+ {
+ mode_junk[i+1] = stackresult[i].c_str();
+ }
+
+ Srv->SendMode(mode_junk, stackresult.size() + 1, myhorriblefakeuser);
+ }
+
+ delete myhorriblefakeuser;