}
int controlstatus(void *sender, int cargc, char **cargv) {
- unsigned long level=5;
+ unsigned long level=999;
hooknick=(nick *)sender;
if (cargc>0) {
if (target->umodes) {
controlreply((nick *)sender,"Umode(s) : %s",printflags(target->umodes,umodeflags));
}
+ if (IsOper(target) && target->opername)
+ controlreply((nick *)sender,"Opered as : %s",target->opername->content);
if (IsAccount(target)) {
controlreply((nick *)sender,"Account : %s",target->authname);
if (target->accountts)
controlreply((nick *)sender,"AccountTS : %ld",target->accountts);
- if (target->auth)
+ if (target->auth) {
controlreply((nick *)sender,"UserID : %ld",target->auth->userid);
- if (target->accountflags)
- controlreply((nick *)sender,"AccFlags : %s",printflags(target->accountflags,accountflags));
+ if (target->auth->flags)
+ controlreply((nick *)sender,"AccFlags : %s",printflags(target->auth->flags,accountflags));
+ }
}
hooknick=(nick *)sender;
chanban *cbp;
char buf[BUFSIZE];
char buf2[12];
- int i,j;
+ int i,j, ops=0, voice=0;
char timebuf[30];
if (cargc<1)
controlreply((nick *)sender,"Topic : %s",cp->topic->content);
strftime(timebuf, 30, "%d/%m/%y %H:%M", localtime(&(cp->topictime)));
controlreply((nick *)sender,"T-time : %ld [%s]",cp->topictime,timebuf);
+ } else {
+ controlreply((nick *)sender,"Topic : (none)");
}
controlreply((nick *)sender,"Mode(s) : %s %s%s%s",printflags(cp->flags,cmodeflags),IsLimit(cp)?buf2:"",
IsLimit(cp)?" ":"",IsKey(cp)?cp->key->content:"");
break;
}
if (cp->users->content[j]!=nouser) {
+ if (cp->users->content[j]&CUMODE_OP)
+ ops++;
+ else if (cp->users->content[j]&CUMODE_VOICE)
+ voice++;
np=getnickbynumeric(cp->users->content[j]);
sprintf(&buf[i*18],"%c%c%-15s ",cp->users->content[j]&CUMODE_VOICE?'+':' ',
cp->users->content[j]&CUMODE_OP?'@':' ', np?np->nick:"!BUG-NONICK!");
buf[i*18]=' ';
}
}
-
+ controlreply((nick *)sender, "Users : Opped: %d, Voiced: %d", ops,voice);
for (cbp=cp->bans;cbp;cbp=cbp->next) {
controlreply((nick *)sender,"Ban : %s",bantostringdebug(cbp));
}