|
Joined: May 2006
Posts: 98
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 98 |
(This post was re-posted here by request.)
I recently discovered that I'm having problems with the 'on notice' event working. I'm hoping someone may be able to help.
I was attempting to use it to execute commands and log notices sent from common IRC network services such as NickServ, ChanServ, and MemoServ. However, no matter what I did, I can't get it to work.
I had a more complex script section using 'on notice' but after it not working I simplified it down to this for testing and troubleshooting:
on 1:NOTICE:*:*:{ /echo 4 -s $nick $1- }
Even that isn't working at all.
I've looked at the mIRC help documentation over and over for that event. I'm still at a loss as to why this is happening. I'm probably being stupid and missing something, and I might feel like an idiot afterward. However, after simplifying it and it still not working, I'm just stumped on it.
I'm not sending notices to myself to try to test this, it was clearly stated in the docs that sending notices to oneself doesn't trigger the event. I was testing it by getting NickServ to send me notices. None of them were triggering the event. Chanserv has the same effect, as does MemoServ. Those are the only services accessable to standard users on the network I use.
Just for the record, I do have the network services set to send me information as 'notices'. They are not being sent as privmsg's.
Just for infomation to help resolve this, I'm currently using version 6.17 and there are no other 'on notice' events at all. I'm only using one script file, no others are loaded. I do have other events but none of them are 'on notice'. --- Additionally, as reqested by RusselB when I posted this in a different forum, I have not seen any error messages. Basically, nothing at all happens in regards to the 'on notice' event.
RusselB also requested I post my code here. Am I to assume that means my entire script file? I didn't want to be annoying and post it all without confirmation. I don't have any personal information contained in my scripts, I use variables for that data.
Lloyd
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Not hard coding personal information is a good idea. The reason I asked about the rest of the script, is that I'm unable to duplicate the problem that you are mentioning, so I just wondered if maybe it might be something simple in the code, such as a missing brace, which would probably cause an alignment problem, and therefore cause the event to not be triggered due to the fact that the event wasn't left hand justified (which is required for mIRC to recognize it as an event)
|
|
|
|
Joined: May 2006
Posts: 98
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 98 |
Ok, well, here's everything.
;OPEN DATA WINDOWS
on 1:start:{ /debug -npt 4 @raw_data
/window -n @user_data
}
;AUTO-ID TO NICKSERV
on nickserv:NOTIFY:{
if ($network == StarChat) {
/ns ID %zipwd | /echo 4 -s Nickserv Password Sent }
elseif ($network == PegasusChat.Net) {
/ns identify %zipwd | /echo 4 -s Nickserv Password Sent }
elseif ($network == $null) goto end
else goto end
:end
}
;AUTO WHOIS ON VISITOR JOIN
on 1:JOIN:#:{ /whois $nick
/aline 9 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5) Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5) Channel: $chan
}
;VISITOR PART DATA
on 1:PART:#:{ /aline 7 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) PART $address($nick,5) Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) PART $address($nick,5) Channel: $chan
}
;VISITOR QUIT DATA
on 1:QUIT:{ /aline 8 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) QUIT $address($nick,5)
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) QUIT $address($nick,5)
}
;VISITOR BAN DATA
on 1:BAN:#:{ /aline 11 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN+ Ban by $address($nick,5) : Ban mask: $banmask : Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN+ Ban by $address($nick,5) : Ban mask: $banmask : Channel: $chan
}
;VISITOR UNBAN DATA
on 1:UNBAN:#:{ /aline 11 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN- Unban by $address($nick,5) : Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN- Unban by $address($nick,5) : Channel: $chan
}
;VISITOR KICK DATA
on 1:KICK:#:{ /aline 4 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) KICK $address($knick,5) : $nick kicked $knick off $chan : Reason: $1-
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) KICK $address($knick,5) : $nick kicked $knick off $chan : Reason: $1-
}
;VISITOR NICK DATA
on 1:NICK:{ /aline 9 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) NICK $address($newnick,5) : $nick is now $newnick
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) NICK $address($newnick,5) : $nick is now $newnick
}
;CHANSERV NOTICE DATA
on 1:NOTICE:*:*:{ /echo 4 -s $nick $1-
}
;RAW EVENT PROCESSING
raw 311:*: {
/echo 4 8 $+ $2 is $3-
if ($right($4,3) isnum) /echo 4 7 $+ Number, no domain name.
else {
/echo 4 7 $+ TLD Code: $right($4,3) $read -s $right($4,3) D:\IRC-data\ccode.txt
if ($right($4,7) == aol.com) { /echo 4 13 $+ AOL User, checking with NickServ
/ns info $2
}
else goto end2
}
:end2
}
;CTCP REPLIES
ctcp 1:ping:?:/ctcpreply $nick PING | /halt
ctcp 1:time:?:/ctcpreply $nick TIME I don't observe linear time, so don't ask. | /halt
ctcp 1:info:?:/ctcpreply $nick INFO | /halt
I deeply appreciate your help or at least your trying to, if we can't find a solution.
Lloyd
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I made a few small changes to the code, basically getting rid of code that was irrelevant and re-aligning code within the braces. The following code has been tested and does work on my system. ;OPEN DATA WINDOWS
on 1:start:{
/debug -npt 4 @raw_data
/window -n @user_data
}
;AUTO-ID TO NICKSERV
on nickserv:NOTIFY:{
if ($network == StarChat) {
/ns ID %zipwd
/echo 4 -s Nickserv Password Sent
}
elseif ($network == PegasusChat.Net) {
/ns identify %zipwd
/echo 4 -s Nickserv Password Sent
}
}
;AUTO WHOIS ON VISITOR JOIN
on 1:JOIN:#:{
/whois $nick
/aline 9 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5) Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5) Channel: $chan
}
;VISITOR PART DATA
on 1:PART:#:{
/aline 7 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) PART $address($nick,5) Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) PART $address($nick,5) Channel: $chan
}
;VISITOR QUIT DATA
on 1:QUIT:{
/aline 8 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) QUIT $address($nick,5)
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) QUIT $address($nick,5)
}
;VISITOR BAN DATA
on 1:BAN:#:{
/aline 11 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN+ Ban by $address($nick,5) : Ban mask: $banmask : Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN+ Ban by $address($nick,5) : Ban mask: $banmask : Channel: $chan
}
;VISITOR UNBAN DATA
on 1:UNBAN:#:{
/aline 11 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN- Unban by $address($nick,5) : Channel: $chan
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) BAN- Unban by $address($nick,5) : Channel: $chan
}
;VISITOR KICK DATA
on 1:KICK:#:{
/aline 4 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) KICK $address($knick,5) : $nick kicked $knick off $chan : Reason: $1-
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) KICK $address($knick,5) : $nick kicked $knick off $chan : Reason: $1-
}
;VISITOR NICK DATA
on 1:NICK:{
/aline 9 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) NICK $address($newnick,5) : $nick is now $newnick
/write %ud_path $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) NICK $address($newnick,5) : $nick is now $newnick
}
;CHANSERV NOTICE DATA
on 1:NOTICE:*:*:{
/echo 4 -s $nick $1-
}
;RAW EVENT PROCESSING
raw 311:*: {
/echo 4 8 $+ $2 is $3-
if ($right($4,3) isnum) /echo 4 7 $+ Number, no domain name.
else {
/echo 4 7 $+ TLD Code: $right($4,3) $read -s $right($4,3) D:\IRC-data\ccode.txt
if ($right($4,7) == aol.com) { /echo 4 13 $+ AOL User, checking with NickServ
/ns info $2
}
}
}
;CTCP REPLIES
ctcp 1:ping:?:/ctcpreply $nick PING | /halt
ctcp 1:time:?:/ctcpreply $nick TIME I don't observe linear time, so don't ask. | /halt
ctcp 1:info:?:/ctcpreply $nick INFO | /halt
mIRC can be very pernickity regarding spaces and alignment, which is what I think you've run into here.
|
|
|
|
Joined: May 2006
Posts: 98
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 98 |
Eh, in just playing around with it, while I was typing this. I found out the problem. I had previously set the services with their own custom access levels. Which I use for the auto-ID'ing script part. Chanserv also had it's own level set. When using "on 1:NOTICE' it wasn't triggering with the services because of their own custom access levels. I changed the event to 'on *:NOTICE' and it now works.
So, I feel like an idiot for not checking those things first. I haven't messed with the 'Users' tab in a long time and forgot I had set them that way.
I do apologize. However, you did point out I need to pay attention to spaces and alignment. You also seemed to make my code look neat. I like the way you changed it. So, thank you very much. I still learned something.
I'm still learning a lot about scripting, obviously. It's something I like to mess around with and learn from.
Lloyd
|
|
|
|
|