mIRC Homepage
Posted By: ardit on *:TEXT - 25/02/04 04:08 AM
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
Posted By: Iori Re: on *:TEXT - 25/02/04 06:26 AM
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
Posted By: ardit Re: on *:TEXT - 25/02/04 08:35 AM
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
Posted By: Man Re: on *:TEXT - 25/02/04 09:13 AM
Im still unsure on what you are wanting, but heres something that could find the time.
$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)
Posted By: BassReFLeX Re: on *:TEXT - 25/02/04 09:47 PM
ardit a shiptar je a ? :tongue: grin
Posted By: Iori Re: on *:TEXT - 02/03/04 06:34 AM
Hm, really unsure of exactly what you want here, but I'll take a stab at it grin
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) }
© mIRC Discussion Forums