]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/chanservnetevents.c
CHANSERV: lastactive is now only updated for +o and above joins (changes how often...
[irc/quakenet/newserv.git] / chanserv / chanservnetevents.c
index 0320b00b86011732cdbcdcc9702115343602d677..7989f90664f690bc7e9aea5b973bc90163936931 100644 (file)
@@ -147,7 +147,7 @@ void cs_handlejoin(int hooknum, void *arg) {
   if (rup && (rup->status & QUSTAT_DEAD))
     rup=NULL;
   
-  if (rup && (rcup=findreguseronchannel(rcp,rup)) && CUKnown(rcup) && cp->users->totalusers >= 3)
+  if (rup && (rcup=findreguseronchannel(rcp,rup)) && CUHasOpPriv(rcup) && cp->users->totalusers >= 3)
     rcp->lastactive=time(NULL);
 
   /* Update last use time */
@@ -185,7 +185,7 @@ void cs_handlejoin(int hooknum, void *arg) {
     }
 
     /* Check for other ban lurking on channel which we are enforcing */
-    if (CIsEnforce(rcp) && nickbanned_visible(np,cp)) {
+    if (CIsEnforce(rcp) && nickbanned(np,cp,1)) {
       localkickuser(chanservnick,cp,np,"Banned.");
       return;
     }
@@ -409,7 +409,7 @@ void cs_handlenewban(int hooknum, void *arg) {
          Error("chanserv",ERR_WARNING,"Found user on channel %s who doesn't exist!",cp->index->name->content);
          continue;
        }
-       if (!IsService(np) && nickmatchban_visible(np,cbp)) {
+       if (!IsService(np) && nickmatchban(np,cbp,1)) {
          localkickuser(chanservnick,cp,np,"Banned.");
        }
       }
@@ -430,10 +430,8 @@ void cs_handletopicchange(int hooknum, void *arg) {
     return;
  
   if (CIsForceTopic(rcp)) {
-    if (rcp->topic) {
-      /* Forced topic: change it back */
-      localsettopic(chanservnick, cp, rcp->topic->content);
-    }
+    /* Forced topic: change it back even if blank */
+    localsettopic(chanservnick, cp, (rcp->topic)?rcp->topic->content:"");
   } else if (CIsTopicSave(rcp)) {
     if (rcp->topic) {
       freesstring(rcp->topic);