]> jfr.im git - irc/quakenet/newserv.git/blobdiff - request/sqrequest.c
Remove test #ifs around the GL commands.
[irc/quakenet/newserv.git] / request / sqrequest.c
index 75dbae7b5287ba0b3440045c679b448898c56f52..1857b575a3c36b9c24a4658b27f77a5c9b87b004 100644 (file)
@@ -14,7 +14,9 @@
 #include "../lib/irc_string.h"
 #include "../core/schedule.h"
 #include "../core/config.h"
+/*
 #include "../spamscan2/spamscan2.h"
+*/
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -168,9 +170,10 @@ static void qr_result(requestrec *req, int outcome, char failcode, char *message
 
     strftime(now, sizeof(now), "%c", localtime(&now_ts));
     fprintf(rq_logfd, "%s: request (%s) for %s (%d unique users, "
-            "%d total users) from %s: Request was %s (%c).\n", now,
+            "%d total users) from %s!%s@%s%s%s: Request was %s (%c).\n", now,
             (req->what == QR_CSERVE) ? RQ_QNICK : RQ_SNICK,
-            req->cip->name->content, unique, total, tnp->nick,
+            req->cip->name->content, unique, total,
+            tnp->nick, tnp->ident, tnp->host->name->content, IsAccount(tnp)?"/":"", IsAccount(tnp)?tnp->authname:"",
             (outcome == QR_OK) ? "accepted" : "denied", failcode);
     fflush(rq_logfd);
   }
@@ -181,16 +184,16 @@ static void qr_result(requestrec *req, int outcome, char failcode, char *message
 
       if (!(snp=getnickbynick(RQ_SNICK))) {
         sendnoticetouser(rqnick, tnp,
-                         "Error: Cannot find %s on the network. "
-                         "Please request again later.", RQ_SNICK);
+                         "Cannot find %s on the network. "
+                         "Please try your request again later.", RQ_SNICK);
 
         free(req);
         return;
       }
 
-      sendnoticetouser(rqnick, tnp, "Requirements met, %s should be added. "
-                        "Contact #help should further assistance be required.",
-                        RQ_SNICK);
+      sendnoticetouser(rqnick, tnp, "Success! %s has been added to '%s' "
+                        "(contact #help if you require further assistance).",
+                        RQ_SNICK, req->cip->name->content);
 
       /* auth */
       user = (sstring *)getcopyconfigitem("request", "user", "R", 30);
@@ -200,8 +203,9 @@ static void qr_result(requestrec *req, int outcome, char failcode, char *message
       freesstring(password);
 
       /* /msg S addchan <channel> default */
-      //sendmessagetouser(rqnick, snp, "ADDCHAN %s default +op", req->cip->name->content);
+      sendmessagetouser(rqnick, snp, "ADDCHAN %s default +o", req->cip->name->content);
 
+/*
 {
     spamscan_channelprofile *cp;
     spamscan_channelsettings *cs;
@@ -239,6 +243,7 @@ static void qr_result(requestrec *req, int outcome, char failcode, char *message
         }
     }
 }
+*/
 
       /* we do not put the request into another queue, so free it here */
       free(req);
@@ -725,21 +730,10 @@ int qr_instantrequestq(nick *sender, channel *cp) {
 
 int qr_requests(nick *rqnick, nick *sender, channel *cp, nick *qnick) {
   chanindex *cip = cp->index;
-  int who = 0;
   requestrec *nextreq, *lastreq;
 
-  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;
-  }
-
   /* check which service is on the channel */
   if (getnumerichandlefromchanhash(cp->users, qnick->numeric) != NULL) {
-    /* we've found Q */
-    who = QR_Q;
-
     /* Request stats from Q */
     sendmessagetouser(rqnick, qnick, "CHANLEV %s", cip->name->content);
 
@@ -767,9 +761,9 @@ int qr_requests(nick *rqnick, nick *sender, channel *cp, nick *qnick) {
   lastreqq = lastreq;
 
   sendnoticetouser(rqnick, sender,
-                   "Checking your %s access. "
+                   "Checking your %s access in '%s'. "
                    "This may take a while, please be patient...",
-                   RQ_QNICK);
+                   RQ_QNICK, cip->name->content);
 
   return RQ_UNKNOWN;
 }
@@ -804,10 +798,10 @@ void qr_finirequest(void) {
 
 void qr_requeststats(nick *rqnick, nick *np) {
   sendnoticetouser(rqnick, np, "- Suspended (S):                  %d", qr_suspended);
-  sendnoticetouser(rqnick, np, "- No chanstats (S):             %d", qr_nohist);
-  sendnoticetouser(rqnick, np, "- Too small (S):                %d", qr_toosmall);
-  sendnoticetouser(rqnick, np, "- User was not on chanlev (S):  %d", qr_nochanlev);
-  sendnoticetouser(rqnick, np, "- User was not the owner (S):   %d", qr_notowner);
+  sendnoticetouser(rqnick, np, "- No chanstats (S):               %d", qr_nohist);
+  sendnoticetouser(rqnick, np, "- Too small (S):                  %d", qr_toosmall);
+  sendnoticetouser(rqnick, np, "- User was not on chanlev (S):    %d", qr_nochanlev);
+  sendnoticetouser(rqnick, np, "- User was not the owner (S):     %d", qr_notowner);
   sendnoticetouser(rqnick, np, "- A:                              %d", qr_a);
   sendnoticetouser(rqnick, np, "- B:                              %d", qr_b);
   sendnoticetouser(rqnick, np, "- C:                              %d", qr_c);