myrealname=getcopyconfigitem("control","realname","NewServ Control Service",REALLEN);
myauthname=getcopyconfigitem("control","authname","C",ACCOUNTLEN);
- mynick=registerlocaluser(cnick->content,myident->content,myhost->content,myrealname->content,myauthname->content,UMODE_SERVICE|UMODE_DEAF|UMODE_OPER|UMODE_ACCOUNT,&handlemessages);
+ mynick=registerlocaluser(cnick->content,myident->content,myhost->content,myrealname->content,myauthname->content,UMODE_SERVICE|UMODE_DEAF|UMODE_OPER|UMODE_ACCOUNT|UMODE_INV,&handlemessages);
triggerhook(HOOK_CONTROL_REGISTERED, mynick);
cp=findchannel("#twilightzone");
if (!cp) {
controlreply((nick *)sender,"You must give a reason.");
return CMD_USAGE;
}
+
+ controlwall(0,0,"DIE from %s: %s",((nick *)sender)->nick, cargv[0]);
- irc_send("%s SQ %s 0 :%s",mynumeric->content,myserver->content,cargv[0]);
- irc_disconnected();
+ newserv_shutdown_pending=1;
- exit(0);
+ return CMD_OK;
}
int controlchannel(void *sender, int cargc, char **cargv) {
char buf[BUFSIZE];
char buf2[12];
int i,j;
-
+ char timebuf[30];
+
if (cargc<1)
return CMD_USAGE;
}
controlreply((nick *)sender,"Channel : %s",cp->index->name->content);
+ strftime(timebuf, 30, "%d/%m/%y %H:%M", localtime(&(cp->timestamp)));
+ controlreply((nick *)sender,"C-time : %ld [%s]",cp->timestamp,timebuf);
if (cp->topic) {
controlreply((nick *)sender,"Topic : %s",cp->topic->content);
- controlreply((nick *)sender,"T-time : %ld [%s]",cp->topictime,ctime(&(cp->topictime)));
+ strftime(timebuf, 30, "%d/%m/%y %H:%M", localtime(&(cp->topictime)));
+ controlreply((nick *)sender,"T-time : %ld [%s]",cp->topictime,timebuf);
}
controlreply((nick *)sender,"Mode(s) : %s %s%s%s",printflags(cp->flags,cmodeflags),IsLimit(cp)?buf2:"",
IsLimit(cp)?" ":"",IsKey(cp)?cp->key->content:"");
buf[i*18]=' ';
}
}
-
+
for (cbp=cp->bans;cbp;cbp=cbp->next) {
controlreply((nick *)sender,"Ban : %s",bantostringdebug(cbp));
}