|
Joined: Oct 2003
Posts: 3
Self-satisified door
|
OP
Self-satisified door
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
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 774 |
mIRC matches only one event per script file
//if ( khaled isgod ) echo yes | else echo no
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
I can't make these two trigger together and they have different matchtexts and targets. 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 *
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
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:
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
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
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.
//if ( khaled isgod ) echo yes | else echo no
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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:
+------------------+
|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
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
............____ |\.....|.|..._...| |..\...|.|..|_|.| |....\.|.|_____| >:D
new username: tidy_trax
|
|
|
|
Joined: Mar 2003
Posts: 41
Ameglian cow
|
Ameglian cow
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?!
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
|