mIRC Home    About    Download    Register    News    Help

Print Thread
#71831 18/02/04 02:36 AM
Joined: Feb 2004
Posts: 7
A
ardit Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Feb 2004
Posts: 7
Hi, can someone help me with this please ..


[10:00] <nick> one two Three four 10:00 PM

on ^*:TEXT:*:#:{

if ((Three isin $3) && (PM isin $6) && (10:00 isin $5)) haltdef }


I'm trying to stop the message with the 10:00 from being posted more the one time in the channel

the problem is that the time changes from 10:00 to 10:05 11:33 etc.

in other words if (10:00 or 10:05 etc. isin $5) post once and then halt



thanks
ardit

#71832 18/02/04 03:29 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Try this out
Code:
on *^:text:*:#channel:{ 
  if $regex($$5-6,/\d\d:\d\d (P|A)M/) &amp;&amp; $fline(#,* $5-6,1) { haltdef }  
}

#71833 18/02/04 03:31 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
how about just checking the : $chr(58) is in $5 since that remains constant, or if its checking against your own time try one of the $time identifiers


billythekid
#71834 18/02/04 05:15 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you want to see only one of these posts every hour? is that it?

Could you define what ya want again, since you said "from being posted more the one time in the channel" and thats going to block every occrance (assuming you fixed your 10:00 problem).

#71835 18/02/04 05:55 AM
Joined: Feb 2004
Posts: 7
A
ardit Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Feb 2004
Posts: 7
[10:00] <nick> one two Three four 10:00 PM
[10:03] <nick> one two Three four 10:00 PM
[10:08] <nick> one two Three four 10:00 PM
[10:09] <nick> one two Three four 10:00 PM
[10:12] <nick> one two Three four 10:00 PM

[10:16] <nick> one two Three four 10:09 PM
[10:18] <nick> one two Three four 10:09 PM
[10:23] <nick> one two Three four 10:09 PM
[10:26] <nick> one two Three four 10:09 PM

[10:16] <nick> one two Three four 11:36 PM
[10:18] <nick> one two Three four 11:36 PM


it keeps going like this all day with different times, from 11:36 goest to lets say 11:38 11:50 12:12 etc.

What i'm trying to do is let the message on line one {10:00} post only once and then halt the rest of them .. and do the same for the next block {10:09} and the next {11:36} etc.

#71836 18/02/04 06:10 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
 
on ^*:TEXT:*:#:{
  if ((Three isin $3) &amp;&amp; (PM isin $6)) {
    if (%lasttime isin $5) {
      haltdef
    }
    else {
      set %lasttime $5
    }
  }
}
 



#71837 18/02/04 06:13 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well, did you try what I posted earlier, because that's what it will do smile

#71838 18/02/04 06:40 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
he might have cleared the screen, but then one display wouldnt hurt em :-)

I do wonder what type of bot he has in the channel that is displaying lines like this tho...

[10:16] <nick> one two Three four 11:36 PM



#71839 18/02/04 06:45 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Your solution works fine here. If you wanted to place the regex pattern as <matchtext>, the : (event delimiter) could be changed to \x3A laugh

#71840 18/02/04 09:00 AM
Joined: Feb 2004
Posts: 7
A
ardit Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Feb 2004
Posts: 7
Iori .. yes i tried your code, works fine here
Dave .. the bot retreives news from a web page, problem is that the web site been going crazy latelly, posting the same headline many times.
For the moment both your codes have stopped the double posting, i'll do some more testing tomorrow and see how it goes.

thanks a lot for your help
ardit


Link Copied to Clipboard