static int ovr_ircop_only(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[]) { if (IsPerson(sptr) && !IsOper(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name); return -1; } return CallCmdoverride(ovr, cptr, sptr, parc, parv); }
DLLFUNC int listreg(Cmdoverride *anoverride, aClient *cptr, aClient *sptr, int parc, char *parv[]) { if (!IsAnOper(sptr)) { if (!IsARegNick(sptr)) { sendto_one(sptr, ":%s %s %s :in order to use this command to need to register your nickname", me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name); sendto_one(sptr, rpl_str(RPL_LISTSTART), me.name, sptr->name); sendto_one(sptr, rpl_str(RPL_LISTEND), me.name, sptr->name); return 0; } } return CallCmdoverride(listreg_override, cptr, sptr, parc, parv); }
DLLFUNC int m_delaylist(Cmdoverride *anoverride, aClient *cptr, aClient *sptr, int parc, char *parv[]) { if (!IsAnOper(sptr)) { if (sptr->firsttime + 10 > TStime()) { /* DENIED! */ sendto_one(sptr, ":%s %s %s :*** You have not been connected long enough " "to use /list. You must wait 30 seconds after connecting", me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name); /* if we don't do this, some clients have a hissy :p */ sendto_one(sptr, rpl_str(RPL_LISTSTART), me.name, sptr->name); sendto_one(sptr, rpl_str(RPL_LISTEND), me.name, sptr->name); return 0; } } /* aww, no fun. they've been connected a while :( - let it through */ return CallCmdoverride(delaylist_override, cptr, sptr, parc, parv); }