- chanindex *cip = cp->index;
-
- /* Check:
- * - we have some form of channel stats for the channel
- *
- * Note that the actual channel stats will not be checked
- * until we're sure the user has +n on the channel.
- */
-
- if (rq_isspam(sender)) {
- sendnoticetouser(rqnick, sender, "Error: Do not flood the request system."
- " Try again in %s.", rq_longtoduration(rq_blocktime(sender)));
-
- return RQ_ERROR;
- }
-
- if (!cip->exts[csext]) {
- sendnoticetouser(rqnick, sender,
- "Error: No historical record exists for %s.",
- cip->name->content);
-
- qr_nohist++;
-
- return RQ_ERROR;
- }
-
- /* Request stats from L */
- sendmessagetouser(rqnick, lnick, "CHANLEV %s", cip->name->content);
-
- /* Sort out a request record */
- if (lastreql) {
- lastreql->next = (requestrec *)malloc(sizeof(requestrec));
- lastreql=lastreql->next;
- } else {
- lastreql=nextreql=(requestrec *)malloc(sizeof(requestrec));
- }
-
- lastreql->next = NULL;
- lastreql->cip = cip;
- lastreql->what = QR_CSERVE;
- lastreql->who = QR_L;
- lastreql->reqnumeric = sender->numeric;
-
- if (rlstate == QRLstate_IDLE)
- rlstate = QRLstate_AWAITINGCHAN;
-
- sendnoticetouser(rqnick, sender,
- "Checking your %s access. "
- "This may take a while, please be patient...", RQ_LNICK);
-
- /* we don't know yet whether the request was successful */