reguser *rup=getreguserfromnick(sender);
chanindex *cip;
regchan *rcp;
- int i;
- char *bywhom, buf[200];
+ int i, seewhom;
+ char *bywhom, buf[TIMELEN];
unsigned int count=0;
- struct tm *tmp;
if (!rup)
return CMD_ERROR;
return CMD_ERROR;
}
+ seewhom = cs_privcheck(QPRIV_VIEWSUSPENDEDBY, sender);
+ if(!seewhom)
+ bywhom = "(hidden)";
+
+ /* @TIMELEN */
chanservstdmessage(sender, QM_SUSPENDCHANLISTHEADER);
for (i=0; i<CHANNELHASHSIZE; i++) {
for (cip=chantable[i]; cip; cip=cip->next) {
if (!CIsSuspended(rcp))
continue;
- if ((rcp->suspendby != rup->ID) && match(cargv[0], cip->name->content))
+ if (match(cargv[0], cip->name->content) != 0)
continue;
-
- if (rcp->suspendby == rup->ID)
- bywhom=rup->username;
- else {
- reguser *trup=findreguserbyID(rcp->suspendby);
- if (trup)
- bywhom=trup->username;
- else
- bywhom="unknown";
+
+ if(seewhom) {
+ if (rcp->suspendby == rup->ID)
+ bywhom=rup->username;
+ else {
+ reguser *trup=findreguserbyID(rcp->suspendby);
+ if (trup)
+ bywhom=trup->username;
+ else
+ bywhom="(unknown)";
+ }
}
count++;
- tmp=gmtime(&(rcp->suspendtime));
- strftime(buf,15,"%d/%m/%y %H:%M",tmp);
+ q9strftime(buf,sizeof(buf),rcp->suspendtime);
- chanservsendmessage(sender, "%-30s %-15s %-15s %s", cip->name->content, bywhom, buf, rcp->suspendreason?rcp->suspendreason->content:"(no reason)");
+ /* @TIMELEN */
+ chanservsendmessage(sender, "%-30s %-15s %-19s %s", cip->name->content, bywhom, buf, rcp->suspendreason?rcp->suspendreason->content:"(no reason)");
if (count >= 2000) {
chanservstdmessage(sender, QM_TOOMANYRESULTS, 2000, "channels");
return CMD_ERROR;