יוצר: XtrAp
גירסא: v1
תיאור: הקוד מראה לך את החדשות האחרונות מהאתר http://www.walla.co.il
הפעלה: או במקש הימני ואז Walla News או
קוד: בחר הכל
/walla
תמונה:
קוד: בחר הכל
;- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
; WallaNews Script v1 By XtrAp.
; Date: 27/07/2009
; To Use: /walla or right click -> open dialog.
; To Use In Channel: Right Click -> Channel Settings -> Set Channel.
; To Use In Channel: Right Click -> Channel Settings -> Turn script On/Off
; -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
alias walla {
if ($1 != -nod) { dialog $iif($dialog(walla),-e,-md) walla walla | did -ra walla 6 Opening Socket... | set %Walla.nod OFF }
.sockclose walla | write -c walla.txt | sockopen walla news.walla.co.il 80 | unset %walla.art
}
on *:SOCKOPEN:walla:{
if ($dialog(walla)) { did -ra walla 6 Connecting... }
if (!$sockerr) {
var %a sockwrite -tn walla
%a GET /?w=/22 HTTP/1.1
%a Host: news.walla.co.il
%a Connection: keep-alive
%a Accept: */*
%a User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)
%a
}
}
on *:sockread:walla:{
if (!$sockerr) {
var %news | sockread %news
if (<b class="block title"><a class="w3b" href=" isin %news) { write walla.txt http://news.walla.co.il/ $+ $gettok(%news,6,34) - $gettok($gettok(%news,3,62),1,60)) | if ($dialog(walla)) { did -ra walla 6 Getting News... } }
if (<div style="width:100%;margin-bottom:15px;height:1px;overflow:hidden;background:#e0e0e0;"></div><div style="text-align:center;"><div style="width:468px;margin:0 auto;"> isin %news) { .timer 1 2 wallasend }
}
}
alias wallasend {
if (%Walla.nod == ON) {
if ($me isop %Walla.Channel) { mode %Walla.Channel +m } | .timer 1 1 msg %Walla.Channel 5 Last News From www.Walla.co.il
var %walla = 1,%x 5
while (%x) { .timer 1 $calc(%walla * 2) msg %Walla.Channel $read(walla.txt, %walla) | dec %x | inc %walla }
if ($me isop %Walla.Channel) { .timer 1 $calc(%walla * 2) mode %Walla.Channel -m }
}
elseif (%Walla.nod == OFF) {
var %walla = 1 | did -r walla 2
while (%walla <= $lines(walla.txt)) { did -a walla 2 $gettok($read(walla.txt, %walla),2-,45) | inc %walla | did -ra walla 6 Done! }
}
}
on *:TEXT:!News:%Walla.Channel: if (!%walla.flood && %Walla.Status == ON) { inc -u10 %walla.flood | walla -nod | set %Walla.nod ON }
dialog walla {
title "Walla News by XtrAp v1 [/walla]"
size -1 -1 194 74
option dbu
list 2, 4 20 186 38, size
text "Walla News - Created By XtrAp", 3, 4 60 81 8, disable center
link "www.mIRCs.co.il", 4, 92 60 50 8
button "Refresh", 5, 4 4 37 12
edit "", 6, 146 60 44 9, read
button "OK", 7, 152 4 37 12, OK
}
on *:dialog:walla:init:*: walla
on *:dialog:walla:sclick:5: walla
on *:dialog:walla:sclick:4: url -an www.mIRCs.co.il
on *:dialog:walla:dclick:2: url -an $gettok($read(walla.txt,$did(2).sel),1,32)
on *:LOAD:{ echo -a WallaNews Script v1 Loaded! | echo -a Script By mIRCs - v1. | set %Walla.Status OFF }
menu * {
Walla News
.Open Dialog: walla
.Channel Settings
..Set Channel: set %Walla.Channel #$$?="Enter Channel"
..Turn Script On/Off (In Channel): $iif($?!="Do you want to turn walla news script in channel ON?",set %Walla.Status ON,set %Walla.Status OFF)
}