Browse Source

m_fixhop: Lil cleanup

Wazakindjes 3 years ago
parent
commit
6cbd035782
1 changed files with 8 additions and 21 deletions
  1. 8 21
      uncommon/m_fixhop.c

+ 8 - 21
uncommon/m_fixhop.c

@@ -242,7 +242,7 @@ static int fixhop_inviteoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr,
 		return -1;
 	}
 
-	if(!(acptr = find_person(parv[1], (aClient *)NULL))) {
+	if(!(acptr = find_person(parv[1], NULL))) {
 		sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name, sptr->name, parv[1]);
 		return -1;
 	}
@@ -267,7 +267,7 @@ static int fixhop_inviteoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr,
 	}
 
 	if(i == HOOK_DENY && !IsULine(sptr)) {
-		if(ValidatePermissionsForPath("override:invite:nopermissions",sptr, NULL, chptr, NULL) && sptr == acptr) {
+		if(ValidatePermissionsForPath("override:invite:nopermissions", sptr, NULL, chptr, NULL) && sptr == acptr) {
 			over = 1;
 		}
 		else {
@@ -277,7 +277,7 @@ static int fixhop_inviteoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr,
 	}
 
 	if(!IsMember(sptr, chptr) && !IsULine(sptr)) {
-		if(ValidatePermissionsForPath("override:invite:notinchannel",sptr, NULL, chptr, NULL) && sptr == acptr) {
+		if(ValidatePermissionsForPath("override:invite:notinchannel", sptr, NULL, chptr, NULL) && sptr == acptr) {
 			over = 1;
 		}
 		else {
@@ -336,30 +336,19 @@ static int fixhop_inviteoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr,
 	if(over && MyConnect(acptr)) {
 		if(is_banned(sptr, chptr, BANCHK_JOIN)) {
 			sendto_snomask_global(SNO_EYES, "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +b).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
-			/* Logging implementation added by XeRXeS */
-			ircd_log(LOG_OVERRIDE,"OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Ban).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
+			ircd_log(LOG_OVERRIDE, "OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Ban).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
 		}
 		else if(chptr->mode.mode & MODE_INVITEONLY) {
 			sendto_snomask_global(SNO_EYES, "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +i).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
-			/* Logging implementation added by XeRXeS */
-			ircd_log(LOG_OVERRIDE,"OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Invite Only)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
+			ircd_log(LOG_OVERRIDE, "OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Invite Only)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
 		}
 		else if(chptr->mode.limit) {
 			sendto_snomask_global(SNO_EYES, "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +l).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
-			/* Logging implementation added by XeRXeS */
-			ircd_log(LOG_OVERRIDE,"OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Limit)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
+			ircd_log(LOG_OVERRIDE, "OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Limit)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
 		}
 		else if(*chptr->mode.key) {
 			sendto_snomask_global(SNO_EYES, "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +k).", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
-
-			/* Logging implementation added by XeRXeS */
-			ircd_log(LOG_OVERRIDE,"OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Key)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
+			ircd_log(LOG_OVERRIDE, "OVERRIDE: %s (%s@%s) invited him/herself into %s (Overriding Key)", sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname);
 		}
 #ifdef OPEROVERRIDE_VERIFY
 		else if(chptr->mode.mode & MODE_SECRET || chptr->mode.mode & MODE_PRIVATE)
@@ -384,10 +373,8 @@ static int fixhop_inviteoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr,
 	}
 
 	/* Notify the person who got invited */
-	if(!is_silenced(sptr, acptr)) {
+	if(!is_silenced(sptr, acptr))
 		sendto_prefix_one(acptr, sptr, ":%s INVITE %s :%s", sptr->name, acptr->name, ((chptr) ? (chptr->chname) : parv[2]));
-	}
-
 	return 0;
 }