]>
Commit | Line | Data |
---|---|---|
1 | #include "../irc/irc.h" | |
2 | #include "../trusts/trusts.h" | |
3 | #include "glines.h" | |
4 | ||
5 | void glinesetbynick(nick *np, int duration, char *reason, char *creator, int flags) { | |
6 | irc_send("%s GL * +%s@%s %d %jd :%s", mynumeric->content, istrusted(np)?np->ident:"*", IPtostr(np->p_ipaddr), duration, (intmax_t)getnettime(), reason); | |
7 | } | |
8 | ||
9 | void glinesetbynode( patricia_node_t *node, int duration, char *reason, char *creator) { | |
10 | irc_send("%s GL * +*@%s %d %jd :%s", mynumeric->content, IPtostr(node->prefix->sin), duration, (intmax_t)getnettime(), reason); | |
11 | } | |
12 | ||
13 | ||
14 | /** | |
15 | * This should be avoided (where possible) and gline on Nick/IPs instead | |
16 | */ | |
17 | void glinesetbyhost(char *ident, char *hostname, int duration, char *reason, char *creator) { | |
18 | irc_send("%s GL * +%s@%s %d %jd :%s", mynumeric->content, ident, hostname, duration, (intmax_t)getnettime(), reason); | |
19 | } | |
20 | ||
21 | void unglinebyhost(char *ident, char *hostname, int duration, char *reason) { | |
22 | irc_send("%s GL * -%s@%s %d %jd :%s", mynumeric->content, ident, hostname, duration, (intmax_t)getnettime(), reason); | |
23 | } |