]>
jfr.im git - irc/quakenet/newserv.git/blob - trusts/trusts_api.c
1 #include <../nick/nick.h>
2 #include "../irc/irc.h"
5 int istrusted(nick
*np
) {
6 return gettrusthost(np
) != NULL
;
9 int trustgline(trustgroup
*tg
, const char *ident
, int duration
, const char *reason
) {
13 for(th
=tg
->hosts
;th
;th
=th
->next
) {
14 char *cidrstr
= trusts_cidr2str(th
->ip
, th
->mask
);
15 irc_send("%s GL * +%s@%s %d %jd :%s", mynumeric
->content
, ident
, cidrstr
, duration
, (intmax_t)getnettime(), reason
);
22 int trustungline(trustgroup
*tg
, const char *ident
, int duration
, const char *reason
) {
26 for(th
=tg
->hosts
;th
;th
=th
->next
) {
27 char *cidrstr
= trusts_cidr2str(th
->ip
, th
->mask
);
28 irc_send("%s GL * +%s@%s %d %jd :%s", mynumeric
->content
, ident
, cidrstr
, duration
, (intmax_t)getnettime(), reason
);