Page 1 of 1

exit_client

Posted: Sun Feb 17, 2008 3:21 am
by Cue
Alright, I've searched the forum and can't find much on exit_client usage except that it is tricky/confusing.

Firstly, I'm trying to kill a user if a message contains a certain string. So, I'm trying to use exit_client from within a 'char' function that's called by the usermsg or chanmsg hooktypes. The problem is, it crashes the ircd when the exit_client happens.
It will remove the user, but then crashes right after.

So, I went and just made it mark the user I want to kill as "dead", then created a "rmdead" command. This command is to check the users online, if they are marked as "dead", remove them. Everything works great, except the exit_client again.
I've tried sptr, cptr, NULL, for within the exit_client call... nothing seems to work without crashing the ircd.

Is there something else I need to do before exit_client is called or what may be the issue?

Re: exit_client

Posted: Sun Feb 17, 2008 5:36 am
by Stealth
Cue wrote:Firstly, I'm trying to kill a user if a message contains a certain string.
Seems a little overkill to make a module considering Unreal already has a feature to do this.

Re: exit_client

Posted: Sat Mar 01, 2008 2:13 am
by Cue
It would if it didn't serve a different purpose/function differently than the Spamfilter already in Unreal.

Re: exit_client

Posted: Sat Mar 01, 2008 2:10 pm
by Kinight
1. If you use mIRC, I can script one for you so your online, but other than that, can't help ya :(

Re: exit_client

Posted: Sun Mar 02, 2008 10:35 pm
by Cue
Ok, so anybody know how to properly use the exit_client function?

Re: exit_client

Posted: Tue Mar 04, 2008 6:49 pm
by nate
Perhaps if you would kindly explain why spamfilter can't do what you need (as it seems by all means it would do exactly what you need), we might be a bit more enlightened to provide slight modulation assistance : P

Re: exit_client

Posted: Sun Mar 23, 2008 4:50 pm
by Jason
Not entirely fair, Nate. He could simply be doing this to learn the module system, or may not want to take the time to explain a complex module of which this is only a small part. He was given the spamfilter solution, acknowledged it, and stated that it was not sufficient for his purposes, he shouldn't have to prove it. It is, after all, different enough for him to feel it is worth the effort of writing this module.

Cue, have you tried looking for other modules that would use exit_client to see what they do? That might help, otherwise, I suppose your best bet, in lieu of help here, would be to read the source for the exit_client function to see what is needed.

Just the first example I dug up, not sure if it'll help: From m_quit.c: exit_client(cptr, sptr, sptr, "Client exited");
If that's already what you're doing, try checking the values of cptr/sptr to make sure you're not giving invalid input (an unexpected NULL, or such)