mIRC Home    About    Download    Register    News    Help

Print Thread
#52777 06/10/03 11:16 PM
Joined: Oct 2003
Posts: 3
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Oct 2003
Posts: 3
Hi there ppl!

I can't seem to put this bit os code working under mIRC v6.1

--------------------------------------------------------
on *:TEXT:!mypic:?:{ /dcc send $nick me.jpg }

It simply doesn't seem to be listening to private chats, but it is active never the less.

But the thing is that this next code works on private chats

--------------------------------------------------------

on *:TEXT:*:?:{
if ($away == $true) {
/query $nick is away: %a
/write pv.log $timestamp $+($nick) : $1-
/goto end
}
/beep 1
:end
}


It really writes in to the file, what ppl say in PV whem i'm away ... i can't seem to understand way this appens ... i really don't ... any ideas ... pleaseee ... tks ppl



--
Life is really short ... taste it
#52778 07/10/03 01:12 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Put the second on text event below the first one. Mirc likes to stop parsing all on text's after one containing a * as the matchtext field. Atleast that's been my experience


-KingTomato
#52779 07/10/03 05:54 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
mIRC matches only one event per script file


Code:
//if ( khaled isgod ) echo yes | else echo no
#52780 07/10/03 05:57 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
It matches 2 or more events with different settings (matchtexts, targets etc) and it matches them according to what KingTomato said.

Last edited by cold; 07/10/03 05:58 AM.

* cold edits his posts 24/7
#52781 07/10/03 06:04 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I can't make these two trigger together and they have different matchtexts and targets.

Code:
on *:TEXT:a:#:{
  echo -a a
}
on *:TEXT:a*:#channel:{
  echo -a b
}


The only way I can make it trigger both is if one has a ^ prefix.

I have tried several combinatons.

Edit 3: Added an *

#52782 07/10/03 06:18 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Edit: Just thought I wasn't that clear. Note that I never said mIRC matches ALL the events with different settings at the same time; I meant it matches them, under the "priority" KingTomato has mentioned.

No, it won't work when the different patterns match the same thing.
Also, you didn't test it thoughtfully:
Code:
on *:TEXT:a:#:{
  echo -a a
}
on *:TEXT:a*:#cold#:{
  echo -a b
}

<cold> a
a
<cold> aa
b


Now change that "a*" to "b" or that "#" to another channel and you'll see both simply match.

Last edited by cold; 07/10/03 06:23 AM.

* cold edits his posts 24/7
#52783 07/10/03 06:23 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
<cold> a
a
<cold> aa
b

I see no
"a
b"
there, the object is to get both firing for ONE line of text, not two seperate ones, and I still can't do it.

#52784 07/10/03 06:44 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Once mIRC founds a matching event it stops processing of that script file and moves on to next one. I don't know the way the mathing event is determined, but only one normal and one with ^ prefix, will fire per script file per event.


Code:
//if ( khaled isgod ) echo yes | else echo no
#52785 07/10/03 06:46 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It always matches the first matching event, atleast in every script I've fowled up on the first one has fired.

#52786 07/10/03 12:37 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
As I said, my objective was never this, but the way theRat put it, I simply said mIRC matches as many events you want, as long as they have different settings. This doesn't mean it will match all of them when you say "a", it means it won't ignore them completely just because they're in the same file, instead it will follow their priority.
I know this doesn't answer the poster's question, but I wanted to point this out since one could misunderstand that affirmation.

Last edited by cold; 07/10/03 12:42 PM.

* cold edits his posts 24/7
#52787 07/10/03 03:21 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Im working on setting up a lil test to see how it evaluates, and by accient did the on text event with a * and it just looped. I was just wondering, would you call it a bug, that if you pressed ctrl+Break say 5 times, to halt a script (that you didnt realise halted after 1 line) that 4 more breaks would actually take place?

Ex: I have this line in remotes:

on 1:TEXT:*:#: { /msg $chan Message Received }

Now, Im using the multi server connect to have a "clone" on the server that i can test my script with. As you know, now the on text event belongs to both clones so saying one word creates an infinate loop of "Message Received" messages. Well, I pressed ctrl+break 5 times, as i mentioned, of which it stopped after 1. Now, I edit the script to prevent that from re-occuring:

on 1:TEXT:*:#: {
if (Received !isin $1-) /msg $chan Message Received
}

now it will only occur when somethign other than its own responce is said. Now I type "hello" to test and it gives me a "Command Halted" message 4 times (to make up for the absent breaks that essentially did nothing). Would that be a bug, or is that just proper processing. its almost like mirc loads the breaks into a buffer and "uses" them when another event occurs..



-KingTomato
#52788 07/10/03 03:40 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
To add on the discussion, theRat is correct. When a matching event i found, mirc stops looking in that file for another match. I had a match event for each of the follwoing:

*
!command
!command *

All they did was returned "Message Received (<matchtext>)" when it was triggered. here were my findings:

Code:
+------------------+
|Ref#   Matchtext  |
+------------------+
| 1.    *          |
| 2.    !command   |
| 3.    !command * |
+------------------+
+-----------------------------------------------------------------+
| Remotes Order:   Command Typed:   Received TexT:                |
+-----------------------------------------------------------------+
| 1,2,3            Test             Message Received (*)          |
| 1,2,3            !command         Message Received (*)          |
| 1,2,3            !command a       Message Received (*)          |
|                                                                 |
| 2,3,1            Test             Message Received (*)          |
| 2,3,1            !command         Message Received (!command)   |
| 2,3,1            !command a       Message Received (!command *) |
|                                                                 |
| 3,1,2            Test             Message Received (*)          |
| 3,1,2            !command         Message Received (*)          |
| 3,1,2            !command a       Message Received (!command *) |
+-----------------------------------------------------------------+


It looks for the first possible match, and if one is found it stops processing that file. So your best bet in this case would be to either make one event with a complete wildcard match (*) and use conditions in that evernt, or to put any events that contain *'s to their own file. So if you have a flood protection--that needs its own file, if you have spam protection--that in its own file, etc.



-KingTomato
#52789 07/10/03 07:08 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
stupid -+| art -_-


new username: tidy_trax
#52790 07/10/03 07:47 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Jealous? I think its both decorative as well as provides an easy to follow method for following the information provided...


-KingTomato
#52791 07/10/03 08:01 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Quote:
Jealous?

............____
|\.....|.|..._...|
|..\...|.|..|_|.|
|....\.|.|_____|

>:D


new username: tidy_trax
#52792 07/10/03 09:42 PM
Joined: Mar 2003
Posts: 41
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 41
the problem can be solved very easily:

ON *:TEXT:*:#: {
if ($1 == test1) { echo -a test1 }
if ($1 == test2) { echo -a test2 }
}

OR

ON *:TEXT:*:#: {
if (test1 isin $1-) { echo -a test1 }
if (test2 isin $1-) { echo -a test2 }
}

easy or what?! grin

#52793 08/10/03 12:10 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I already stated that in my findings. The alternative method is to supply a new file for the evnts you wish to duplicate.


-KingTomato

Link Copied to Clipboard