mIRC Home    About    Download    Register    News    Help

Print Thread
on *:TEXT #72715 25/02/04 04:08 AM
Joined: Feb 2004
Posts: 7
A
ardit Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Feb 2004
Posts: 7
on *:TEXT:*:#:{
set %last $5
if ((word isin $3) && (by isin $6) && (%last isin $5)) msg $chan url
if (ok isin $1) msg $chan http://www.internet.com/first $+ %last | halt }

problem is that it doesn't grab what it should but the last thing that was said it the channel.

do i need to write an alias for it and replace $+ %last with alias name ?

i don't have a clue how to do it though

please help

Re: on *:TEXT #72716 25/02/04 06:26 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
What is it supposed to 'grab'.
This line; " set %last $5" is always setting %last to whatever is $5 (if there is a $5, otherwise to NULL), so checking "(%last isin $5) is very redundant here. smile

Re: on *:TEXT #72717 25/02/04 08:35 AM
Joined: Feb 2004
Posts: 7
A
ardit Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Feb 2004
Posts: 7
one two word four 11:35 by


on *:TEXT:*:#:{

set %last $5
if ((word isin $3) && (by isin $6) && (%last isin $5)) msg $chan one two word four five by <--- works fine till here


if (by isin $6) msg $chan http://www.internet.com/first $+ %last | halt } <--- this is the line i'm having problem


it's supposed to grab the time 11:35 or whatever the time of the news is.

but if something else is posted in the channel for example: one two three one two three

is grabbing "two" not the time

i understand that checking %last is the wrong option here, it needs some kind of code to evaluate the "if" first, but im a newbie and i really don't know how to write the rest of the code confused

Re: on *:TEXT #72718 25/02/04 09:13 AM
Joined: Dec 2003
Posts: 33
M
Man Offline
Ameglian cow
Offline
Ameglian cow
M
Joined: Dec 2003
Posts: 33
Im still unsure on what you are wanting, but heres something that could find the time.
Code:
$gettok($gettok($1-,1,58),-1,32) $+ : $+ $gettok($gettok($1-,2,58),1,32) 


This probably could be done better with tokenize or even better with regular expressions. But this will do just fine for what you need it for (well what I think you need it for)

Re: on *:TEXT #72719 25/02/04 09:47 PM
Joined: Jan 2004
Posts: 8
B
BassReFLeX Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
B
Joined: Jan 2004
Posts: 8
ardit a shiptar je a ? :tongue: grin


-= Leave Some Trace =-
Re: on *:TEXT #72720 02/03/04 06:34 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Hm, really unsure of exactly what you want here, but I'll take a stab at it grin
Code:
on $*:TEXT:/(\d{1,2}\x3A\d\d)/:#:{
  if word by == $3 $6 { msg $chan one two word four five by }
  if by == $6 { msg $chan http://www.internet.com/first $+ $regml(1) }
}