mIRC Home    About    Download    Register    News    Help

Print Thread
#142904 20/02/06 03:20 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
OP Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Ok, when I upgraded to mIRC 6.17, there were a few errors in my scripts, mostly due to the $regsub no longer allowing $1 in place of \1.

Anyway, there was one error that started happening that I haven't been able to understand yet. The error occurs when ChanServ says a certain type of message in a channel. Before switching to 6.17 the script worked with no problem, but now it doesn't unless I alter it.

Here is the code that I have been testing the script with on a blank copy of mIRC.

Code:
on ^*:TEXT:U & & & *:#channel:{
  echo 3 # MATCH from $nick $+ : $1-
  haltdef
}

on ^*:TEXT:*:#channel:{
  echo 4 # NO MATCH from $nick $+ : $1-
  haltdef
}
(The channel name has been changed. I don't know if that will affect the bug or not.)



The message that is triggering the code is this:
Code:
U (irc.theserver.net) genius_test genius@my.host.net [ genius ]
(Sensitive information has also been changed.)



This is what happens when the above message is sent by ChanServ and by my other client in the same channel:

Code:
[color:red]NO MATCH from ChanServ: U (irc.theserver.net) genius_test genius@my.host.net [ genius ][/color]
[color:green]MATCH from genius_0001: U (irctheserver.net) genius_test genius@my.host.net [ genius ][/color]



Here is the debug:
Code:
<- :ChanServ!services@theserver.net PRIVMSG #channel :U  (irc.theserver.net) genius_test genius@my.host.net [ genius ]
<- :genius_0001!genius@my.host.net PRIVMSG #channel :U (irc.theserver.net) genius_test genius@my.host.net [ genius ]



Now, if I change the code to this:
Code:
on ^*:TEXT:U *:#adminwatch:{
  echo 3 # MATCH from $nick $+ : $1-
  haltdef
}

on ^*:TEXT:*:#adminwatch:{
  echo 4 # NO MATCH from $nick $+ : $1-
  haltdef
}
(notice the difference in the first matchtext)



I get this:
Code:
[color:green]MATCH from ChanServ: U (irc.theserver.net) genius_test genius@my.host.net [ genius ]
MATCH from genius_0001: U (irc.theserver.net) genius_test genius@my.host.net [ genius ][/color]



Does anyone have any idea why this could be happening? I'm thinking it is a bug that cropped up due to some feature that was added in 6.17. (/me curses Unicode :P)

-genius_at_work

#142905 21/02/06 06:50 PM
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
I can't seem to reproduce this issue here. The text matching seems to be working fine so it doesn't look like that's the problem.

Do you have ChanServ assigned a level in your user list? If you fiddle with that, are you able to make the above event trigger?

#142906 22/02/06 08:29 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
OP Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I used a completely blank copy of 6.17 to test this problem. I just tried adding ChanServ to the user list, but that made no difference to the outcome. I've adjusted the code so that is doesn't need to be changed to view the results:

Code:
on ^*:TEXT:U & & & *:#channel:{
  echo 3 # MATCH 1 from $nick $+ : $1-
  haltdef
}

on ^*:TEXT:U *:#channel:{
  echo 12 # MATCH 2 from $nick $+ : $1-
  haltdef
}

on ^*:TEXT:*:#channel:{
  echo 4 # NO MATCH from $nick $+ : $1-
  haltdef
}


This is the result that I get:
Code:
[color:blue]MATCH 2 from ChanServ: U (irc.theserver.net) SomeNick genius@my.host.net [ genius ][/color]
[color:green]MATCH 1 from genius_at_work: U (irc.theserver.net) SomeNick genius@my.host.net [ genius ][/color]


I haven't tested this on other networks (ircds) because I only have access to ChanServ on one network. It may (somehow) be related to the ircd/services that are running on the network I am on. We use custom ircd and services, but I can't see how that would affect it at all, since it still sends PRIVMSG normally.

If you are unable to duplicate this bug on the network you test on, you can PM me and I will try to arrange to have you test it on the network I use.

-genius_at_work

#142907 22/02/06 10:58 PM
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
I just noticed something in the raw debug message you listed in your first post:

Code:
:ChanServ!services@theserver.net PRIVMSG #channel :U  (irc.theserver.net) genius_test [Email]genius@my.host.net[/Email] [ genius ]


It contains two spaces after the ":U". This is probably the reason why "U & & & *" is not matcing it. If you try using two spaces after the U in the match text does it work?

The & wildcard had a bug in previous versions of mIRC that was making it incorrectly match too many characters.

#142908 22/02/06 11:11 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
OP Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Aha! That seems to have been the problem. Good catch on your part. I didn't notice that there was an extra space in there during my testing because I was using $1- which striped the extra space.

So it wasn't a bug causing the problems.. in fact it was the removal of an existing bug.

Thanks, Khaled.

-genius_at_work


Link Copied to Clipboard