Top News Bot code
Platform: mIRC
Published Oct 23, 2008
Updated Jun 21, 2011
copy/paste into a new remote of ur bot.
!UPDATED!
Quote
<~napa182> @news u 1
<&Sick0> Us News: Story Number: 1 : U.S. releases graphic tobacco warning labels : WASHINGTON (Reuters) - Dead bodies, diseased lungs and a man on a ventilator were among the graphic images for revamped U.S. tobacco labels, unveiled on Tuesday by health officials who hope the warnings will help smokers quit.
<~napa182> @news w 1
<&Sick0> World News: Story Number: 1 : Seven protesters killed in Syria during rallies : AMMAN (Reuters) - Syrian security forces shot dead seven people on Tuesday during clashes in two cities between President Bashar al-Assad's loyalists and protesters demanding his removal, a leading activist said.
<~napa182> @news t 1
<&Sick0> Technology News: Story Number: 1 : Analysis: New Internet rules will spawn battle for "dots" : NEW YORK (Reuters) - When it comes to branding on the Internet, 2012 may be the dawn of a chaotic new era with companies and other groups expected to battle over suffixes like .cancer, .chocolate and just about .anything.
<~napa182> @news p 1
<&Sick0> Politics News: Story Number: 1 : Biden, Congress tee up crucial week on debt limit : WASHINGTON (Reuters) - Faced with a looming self-imposed deadline, lawmakers launched a crucial week of debt-reduction talks on Tuesday seeking to break through differences on taxes and healthcare.
<~napa182> @news s 1
<&Sick0> Sports News: Story Number: 1 : Serena shows raw emotion while Federer wins : LONDON (Reuters) - Wimbledon has come to expect fighting instincts and effortless power from Serena Williams but the raw tears she shed after beating Aravane Rezai Tuesday betrayed just how much torment she has suffered since holding the trophy aloft last year.
<~napa182> @news e 1
<&Sick0> Entertainment News: Story Number: 1 : John Galliano to attend anti-Semitic trial : PARIS (Reuters) - Fashion designer John Galliano will attend in person his trial on Wednesday over charges he hurled anti-Semitic insults at customers in a cafe in a series of outbursts that have wrecked a towering career.
<~napa182> @news h 1
<&Sick0> Health News: Story Number: 1 : U.S. releases graphic tobacco warning labels : WASHINGTON (Reuters) - Dead bodies, diseased lungs and a man on a ventilator were among the graphic images for revamped U.S. tobacco labels, unveiled on Tuesday by health officials who hope the warnings will help smokers quit.
<~napa182> @news o 1
<&Sick0> Oddlyenough News: Story Number: 1 : Boeing rights a wrong: the flight attendant button : LE BOURGET, France (Reuters) - In the long history of bad industrial design, the flight attendant call button on commercial airlines takes a prominent place.
feel free to rip butcher and strip this code how ever you want idc
pulls US, World, Technology, Politics, Entertainment, Health, Sports, and OddlyEnough News
on $*:text:/^@news?\s?([uwtpehso])?\s?(\d+)?/iS:#: {
if (!$regml(1) || !$regml(2) || $regml(2) >= 11) { msg # To Get $iif($regml(1) = u,US,$iif($regml(1) = w,World,$iif($regml(1)t,Technology,$iif($regml(1) = p,Politics,$iif($regml(1) = e,Entertainment,$iif($regml(1) = h,Health,$iif($regml(1) = s,Sports,$iif($regml(1) = o,OddlyEnough, $&
$iif(!$istok(u w t p e h s o,$regml(1),32),US / World / Technology / Politics / Entertainment / Health / Sports / OddlyEnough,))))))))) News Please type @news $iif($regml(1) = u,<u>,$iif($regml(1) = w,<w>,$iif($regml(1) = t,<t>,$iif($regml(1) = p,<p>,$iif($regml(1) = e,<e>,$iif($regml(1) = h,<h>, $&
$iif($regml(1) = s,<s>,$iif($regml(1) = o,<o>,$iif(!$istok(u w t p e h s o,$regml(1),32),<uwtpehso>,))))))))) $&
< number of news story > 1-10 ex: @news $iif(!$istok(u w t p e h s o,$regml(1),32),t,$regml(1)) 3 }
else {
if ($sock(news)) sockclose news
sockopen news www.reuters.com 80
sockmark news $iif($regml(1) = u,us,$iif($regml(1) = w,world,$iif($regml(1) = t,technology,$iif($regml(1) = p,politics,$iif($regml(1) = e,entertainment,$iif($regml(1) = h,health,$iif($regml(1) = s,sports,$iif($regml(1) = o,oddlyEnough)))))))) $regml(2) msg #
}
}
on *:sockopen:news: {
sockwrite -n $sockname GET $+(/news/,$gettok($sock(news).mark,1,32)) HTTP/1.1
sockwrite -n $sockname Host: $+($sock(news).addr,$str($crlf,2))
}
on *:sockread:news: {
var %news | sockread %news
if ($regex(%news,/(<h1>|<h2>)<a href="/article.+>(.+)<\/a>$/)) { inc -u4 %nf
if (%nf = $gettok($sock(news).mark,2,32)) {
sockmark news $addtok($sock(news).mark,04 $+($upper($left($gettok($sock(news).mark,1,32),1)),$&
$lower($right($gettok($sock(news).mark,1,32),-1))) News: Story Number: $gettok($sock(news).mark,2,32) : $regml(2) :,32)
}
}
if ($regex(%news,/(<\/h2><p>|<p>)(.+)(<\/p>|\| )/) && %nf = $gettok($sock(news).mark,2,32)) {
$gettok($sock(news).mark,3-,32) $replace($regml(2),&,&)
sockclose news
}
}