|
|
Joined: Feb 2004
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Try this out on *^:text:*:#channel:{
if $regex($$5-6,/\d\d:\d\d (P|A)M/) && $fline(#,* $5-6,1) { haltdef }
}
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
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
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
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).
|
|
|
|
Joined: Feb 2004
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
on ^*:TEXT:*:#:{
if ((Three isin $3) && (PM isin $6)) {
if (%lasttime isin $5) {
haltdef
}
else {
set %lasttime $5
}
}
}
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Well, did you try what I posted earlier, because that's what it will do
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Feb 2004
Posts: 7
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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
|
|
|
|
|
|