mIRC Home    About    Download    Register    News    Help

Print Thread
#108525 20/01/05 04:13 PM
Joined: Nov 2004
Posts: 14
R
replay Offline OP
Pikka bird
OP Offline
Pikka bird
R
Joined: Nov 2004
Posts: 14
Code:
 
on *:TEXT:!security:#: { /msg $chan %tag security.nl News: %news.security.title Link: %news.security.link } } 
alias security { 
  write -c security.txt 
  sockopen security www.security.nl 80 
} 
on *:sockopen:security:{ 
  sockwrite -n $sockname GET http://www.security.nl/headlines.php
} 
on *:sockread:security:{ 
  if ($sockerr) { return } 
  :read 
  sockread &security 
  bwrite security.txt -1 -1 &security 
  if ($sockbr) { goto read } 
} 
on *:sockclose:security:{ 
  if ($regex(title,$read(security.txt,24),<title>(.*)</title>)) && ($regex(link,$read(security.txt,25),<link>(.*)</link>)) { 
    set %news.security.update $ctime 
    if ($regml(title,1) != %news.security.title) && ($regml(link,1) != %news.security.link) { 
      set %news.security.title $regml(title,1) 
      set %news.security.link $regml(link,1) 
      .msg %news.security.chans Security.nl News: $regml(title,1) Link: $regml(link,1) 
    } 
  } 
}
 


What's wrong with this script?

#108526 20/01/05 04:43 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I haven't tested it but on the first line you have one too many braces.
Code:
on *:TEXT:!security:#: { /msg $chan %tag security.nl News: %news.security.title Link: %news.security.link } [color:red]}[/color]


Link Copied to Clipboard