Page 1 of 1

gline in module

Posted: Sun Aug 15, 2004 5:15 am
by Blackl3232
how do i set a gline in a module.

i want to do it on a join event. i have all the other code i just need to know how to set a gline from sptr

Posted: Sun Aug 15, 2004 11:30 am
by AngryWolf
If you know that sptr, what you want to ban, always points to a local client, the easiest way is to use Syzop's place_host_ban function declared in src/s_kline.c. Or else build up an array of tkl parameters that you later pass to m_tkl (a function that is in src/s_kline.c, too), like in the m_tkl_line function of src/modules/m_tkl.c (see tklllayer).

Posted: Mon Aug 16, 2004 2:13 am
by Blackl3232
how do i include the file from src. i tried #include <src/s_kline.c>, <../s_kline.c>, <s_kline.c>, with <>s with "s and nothing worked.

Posted: Mon Aug 16, 2004 2:47 am
by w00t
That's something that I still can't figure out :/

I think it has something to do with linking source files.

Posted: Mon Aug 16, 2004 3:40 am
by codemastr
how do i include the file from src. i tried #include <src/s_kline.c>, <../s_kline.c>, <s_kline.c>, with <>s with "s and nothing worked.
The fact that you are saying that tells me you don't know C. You don't include .c files, you include .h files. There is no reason you would ever want to include s_kline.c. I suggest, before playing with modules, you learn some C first.