exit_client

These are old archives. They are kept for historic purposes only.
Post Reply
Cue
Posts: 6
Joined: Sun Feb 17, 2008 2:57 am

exit_client

Post 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?
Cue
-CAIRC Services Operator
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: exit_client

Post 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.
Cue
Posts: 6
Joined: Sun Feb 17, 2008 2:57 am

Re: exit_client

Post by Cue »

It would if it didn't serve a different purpose/function differently than the Spamfilter already in Unreal.
Cue
-CAIRC Services Operator
Kinight
Posts: 13
Joined: Sat Feb 23, 2008 5:16 pm

Re: exit_client

Post by Kinight »

1. If you use mIRC, I can script one for you so your online, but other than that, can't help ya :(
Cue
Posts: 6
Joined: Sun Feb 17, 2008 2:57 am

Re: exit_client

Post by Cue »

Ok, so anybody know how to properly use the exit_client function?
Cue
-CAIRC Services Operator
nate
Posts: 148
Joined: Fri Jul 29, 2005 10:12 am
Location: Johnstown, Pa
Contact:

Re: exit_client

Post 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
Jason
Posts: 570
Joined: Mon Jun 14, 2004 5:09 pm

Re: exit_client

Post 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)
Why the hell can't my signature be empty?
"Your message contains too few characters."
Post Reply