+ /* Generate the appropriate strings for the command name (including
+ * prefixes for privileged users) and the summary text.
+ *
+ * We do this before we're sure we will print the command to make things
+ * easier when we are doing -v */
+ summary=(cmdsummary *)cmdlist[i]->ext;
+
+ if (rup && UHasStaffPriv(rup)) {
+ if (cmdlist[i]->level & QCMD_DEV) {
+ sprintf(cmdbuf,"+d %s",cmdlist[i]->command->content);
+ } else if(cmdlist[i]->level & QCMD_ADMIN) {
+ sprintf(cmdbuf,"+a %s",cmdlist[i]->command->content);
+ } else if(cmdlist[i]->level & QCMD_OPER) {
+ sprintf(cmdbuf,"+o %s",cmdlist[i]->command->content);
+ } else if(cmdlist[i]->level & QCMD_HELPER) {
+ sprintf(cmdbuf,"+h %s",cmdlist[i]->command->content);
+ } else if(cmdlist[i]->level & QCMD_STAFF) {
+ sprintf(cmdbuf,"+q %s",cmdlist[i]->command->content);
+ } else {
+ sprintf(cmdbuf," %s",cmdlist[i]->command->content);
+ }
+ ct=cmdbuf;
+ } else {
+ ct=cmdlist[i]->command->content;
+ }
+
+ if (summary->bylang[lang]) {
+ message=summary->bylang[lang]->content;
+ } else if (summary->bylang[0]) {
+ message=summary->bylang[0]->content;
+ } else {
+ message=summary->def->content;
+ }
+
+ if (dumpcount) {
+ chanservsendmessage(sender,"%-20s %u", cmdbuf, cmdlist[i]->calls);
+ continue;
+ }