]>
jfr.im git - irc/quakenet/newserv.git/blob - chanserv/chanservschedule.c
2 #include "../lib/irc_string.h"
3 #include "../core/schedule.h"
5 void chanservdgline(void* arg
) {
6 reguser
*rup
=(reguser
*)arg
;
12 if (!rup
|| (!UIsDelayedGline(rup
) && !UIsGline(rup
)))
15 if (!(anp
=findauthname(rup
->ID
)))
18 for (nl
=anp
->nicks
;nl
;nl
=nl
->nextbyauthname
) {
19 for (i
=0, ucount
=0; i
<NICKHASHSIZE
; i
++)
20 for (np
=nicktable
[i
];np
;np
=np
->next
)
21 if (np
->ipnode
==nl
->ipnode
&& !ircd_strcmp(np
->ident
, nl
->ident
))
24 if (ucount
>= MAXGLINEUSERS
) {
25 chanservwallmessage("Delayed GLINE \"*!%s@%s\" (account %s) would hit %d users, aborting.",
26 nl
->ident
, IPtostr(nl
->p_ipaddr
), rup
->username
, ucount
);
28 char *reason
= "Network abuse";
29 if(rup
->suspendreason
)
30 reason
= rup
->suspendreason
->content
;
32 irc_send("%s GL * +*!%s@%s 3600 :%s\r\n", mynumeric
->content
, nl
->ident
,
33 IPtostr(nl
->p_ipaddr
), reason
);
34 chanservwallmessage("Delayed GLINE \"*!%s@%s\" (authed as %s) expires in 60 minute/s (hit %d user%s) (reason: %s)",
35 nl
->ident
, IPtostr(nl
->p_ipaddr
), rup
->username
, ucount
, ucount
==1?"":"s", reason
);