mIRC Homepage
Posted By: ardit /haltdef - 18/02/04 02:36 AM
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
Posted By: Iori Re: /haltdef - 18/02/04 03:29 AM
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 }  
}
Posted By: billythekid Re: /haltdef - 18/02/04 03:31 AM
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
Posted By: DaveC Re: /haltdef - 18/02/04 05:15 AM
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).
Posted By: ardit Re: /haltdef - 18/02/04 05:55 AM
[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.
Posted By: DaveC Re: /haltdef - 18/02/04 06:10 AM
Code:
 
on ^*:TEXT:*:#:{
  if ((Three isin $3) &amp;&amp; (PM isin $6)) {
    if (%lasttime isin $5) {
      haltdef
    }
    else {
      set %lasttime $5
    }
  }
}
 


Posted By: Iori Re: /haltdef - 18/02/04 06:13 AM
Well, did you try what I posted earlier, because that's what it will do smile
Posted By: DaveC Re: /haltdef - 18/02/04 06:40 AM
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


Posted By: Online Re: /haltdef - 18/02/04 06:45 AM
Your solution works fine here. If you wanted to place the regex pattern as <matchtext>, the : (event delimiter) could be changed to \x3A laugh
Posted By: ardit Re: /haltdef - 18/02/04 09:00 AM
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
© mIRC Discussion Forums