- usercount = hp->clonecount;
- if(usercount > 10) { /* (decent) trusted host */
- int j;
- nick *np;
-
- usercount = 0;
-
- for (j=0;j<NICKHASHSIZE;j++)
- for (np=nicktable[j];np;np=np->next)
- if (np && (np->host == hp) && (!ircd_strcmp(np->ident, target->ident)))
- usercount++;
-
- if(usercount > 50)
- LUA_RETURN(ps, LUA_FAIL);
-
- snprintf(mask, sizeof(mask), "*%s@%s", target->ident, IPtostr(target->p_ipaddr));
- } else {
- snprintf(mask, sizeof(mask), "*@%s", IPtostr(target->p_ipaddr));
- }
-
- irc_send("%s GL * +%s %d %jd :%s", mynumeric->content, mask, duration, (intmax_t)getnettime(), reason);
+ usercount = glinebynick(target, duration, reason, 0, "lua");