]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Made CHANFLAGS display the "nothing changed" message instead of saying Done.
authorsplidge <redacted>
Thu, 20 Mar 2008 16:16:19 +0000 (16:16 +0000)
committersplidge <redacted>
Thu, 20 Mar 2008 16:16:19 +0000 (16:16 +0000)
Also changed that message a bit to be more helpful.

chanserv/chancmds/chanflags.c
chanserv/chanserv_messages.h

index 021870005c1e53b6652e50a6feba261af468bc45..532765e94d2a93fec3e1d9a75a1076c400fb1f85 100644 (file)
@@ -119,6 +119,12 @@ int csc_dochanflags(void *source, int cargc, char **cargv) {
         cs_checkchanmodes(cip->channel);
     }
 
+    /* If nothing has changed, say so and don't do anything else */
+    if (rcp->flags == oldflags) {
+      chanservstdmessage(sender, QM_CHANLEVNOCHANGE);
+      return CMD_OK;
+    }
+    
     strcpy(flagbuf,printflags(oldflags, rcflags));
     cs_log(sender,"CHANFLAGS %s %s (%s -> %s)",cip->name->content,cargv[1],flagbuf,printflags(rcp->flags,rcflags));
     chanservstdmessage(sender, QM_DONE);
index 9bd406b34d31ae97c96d87346567503322cca4a5..a715431f344f9798ce8e8498ab06ba6ad5339018 100644 (file)
@@ -198,7 +198,7 @@ BeginMessages() {
   msg(QM_CHANLEVEMPTIEDCHANNEL, "The channel has been deleted since the last known user was removed.", ""),
   msg(QM_CHANLEVCHANGED, "Done.  Flags for $0 on $1 are now: $2.", "sss"),
   msg(QM_CHANLEVREMOVED, "Done.  User $0 is no longer known on $1.", "ss"),
-  msg(QM_CHANLEVNOCHANGE, "No change - check that you didn't specify an impossible flag combination.", ""),
+  msg(QM_CHANLEVNOCHANGE, "Nothing changed.  This could be because you specified an impossible flag combination or don't have enough access.", ""),
   msg(QM_USERSHEADER, "Users currently on $0:\nNick            Username        Flags        Host", "s"),
   msg(QM_EMPTYCHAN, "Channel $0 is currently empty.", "s"),
   msg(QM_USERSSUMMARY, "Total $0 users: $1 opped, $2 voiced, $3 others, $4 with flags ($5 ops, $6 masters)", "ddddddd"),