IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: kyltmer on September 14, 2010, 07:20:48 PM

Title: Response Capture
Post by: kyltmer on September 14, 2010, 07:20:48 PM
Hey, i am writing a few scripts for my chat client and want to know is there a way to [on user join] pull in whether they are registered of not [or at least signed into NickServ] and to store this value as a variable [maybe $reg=0 [unregistered/unidentified], $reg=1 [identified]]

Thanks for any help!
Title: Re: Response Capture
Post by: Morio on September 15, 2010, 01:42:52 AM
you can use the command /msg nickserv info nickname to see if the person is registered or not. Then just use the ONNOTICE sub to catch the reply from nickserv.
Title: Re: Response Capture
Post by: kyltmer on September 28, 2010, 01:21:39 PM
On Notice isn't catching that response for some reason. Is there any other way to check to see if a nick is identified when it joins the channnel?
Title: Re: Response Capture
Post by: Snerf on September 28, 2010, 05:52:16 PM
It may be a ONSERVERNOTICE that gets sent back, not an ONNOTICE.
Title: Re: Response Capture
Post by: kyltmer on September 29, 2010, 05:52:31 PM
I've tried Notice, Servernotice, Servermessage, and Action. No luck across them all.
Title: Re: Response Capture
Post by: Snerf on September 29, 2010, 06:54:08 PM
Ok, open up the Debug Window and see what the message is that comes in and paste it in here.
Title: Re: Response Capture
Post by: kyltmer on September 30, 2010, 01:46:53 PM
"
1-:ns status kyltmer
1=:NickServ!services@geekshed.net NOTICE `kylt` :STATUS kyltmer 3
"

It appears to be a NOTICE, however its arrival to my client never triggered the notice sub......

Also, (side question) is it better to write scripts in IceChat 5 style, rather than 7? or is there not difference? I just see so many of those, compared to the other.
Title: Re: Response Capture
Post by: Snerf on September 30, 2010, 05:29:45 PM
If it is a notice, it will be triggered.

As for which is better to use, ice5 style has lot more flexibility to it, so it is the better to use of the 2.

The ice7 style is more for very simple scripts.
Title: Re: Response Capture
Post by: Snerf on October 01, 2010, 04:27:46 PM
Paste your code for what you have to capture the notice event.
Title: Re: Response Capture
Post by: kyltmer on October 03, 2010, 07:59:05 AM
on *:JOIN:#kyltmer: {
/ns status $nick
}

;In this sub, i hard-coded the result for just one nick for testing purposes
on *:NOTICE:STATUS kyltmer 3:#kyltmer: {
/stuff here
}
Title: Re: Response Capture
Post by: Morio on October 03, 2010, 08:25:03 AM
I'm not entirely sure about this, as I'm not that familiar with the mirc scripting language, but I don't think you should include the channel when catching the notice, because the notice doesn't come to a channel, it comes to you directly.
Title: Re: Response Capture
Post by: Snerf on October 03, 2010, 09:07:51 AM
Well, you are using on notice, but it is not happening in your channel, it is coming from nickserv.

So instead of matching the channel, you need to match NickServ.

Code: [Select]
on *:NOTICE:NickServ:STATUS kyltymer 3:/stuff here


Also, you dont need to use { } with your scripts if you are just sending single commands.

Quote
on *:JOIN:#kyltmer:/ns status $nick