;Delicious Bookmark Search Script by Ford_Lawnmower
;I know everyone is stuck on google and google is great, but their are other ways to search. In this case, you can search other peoples bookmarks.
;I find this useful, because people normally only bookmark the most useful sites. It's pretty unlikely that you will find a useless or virus infected
;site using this. Believe it or not, I have been blamed for someone getting a virus from a link generated by my google script. Hahahaha.
;I am the google god, lol. Anyhow, enjoy the script :) Syntax: !bmark search terms or /bmark search terms. You can turn the trigger off. Right click the Channel.
;Questions, Comments: You can find me On WyldRyde #Script-Help,SwiftIRC #Technical, Abjects #Technical, Mindforge #USA,#Hollywood,#War
alias delicious.timeout {
if (%delicious.chan == echo) { echo -a Connection was timed out... :( | delicious.clear }
else { .msg %delicious.chan Connection was timed out... We could not find your site... :( | delicious.clear }
}
alias delicious.clear {
unset %delicious*
sockclose delicious
.timer-delicious off
halt
}
alias bmark {
if (%delicious.inuse == 1) { echo -a delicious in use. To reset the script type /delicious.clear | return error1 | halt }
set %delicious.inuse 1
set %delicious.nick $me
set %delicious.chan ECHO
set %delicious.count 1
set %delicious.max 5
sockclose delicious
set %deliciousurl /search?p= $+ $replace($1-,$chr(32),+) $+ &u=&chk=&context=&fr=del_icio_us&lc=0
set %delicioussite delicious.com
sockopen delicious %delicioussite 80
.timer-delicious 1 15 delicious.timeout
}
#bmark.trigger On
on *:TEXT:!bmark*:# {
if (%delicious.inuse == 1) { .notice $nick Sorry, But Somebody else is already searching delicious. | halt }
set %delicious.inuse 1
set %delicious.nick $nick
set %delicious.chan $chan
set %delicious.count 1
set %delicious.max 5
sockclose delicious
set %deliciousurl /search?p= $+ $replace($2-,$chr(32),+) $+ &u=&chk=&context=&fr=del_icio_us&lc=0
set %delicioussite delicious.com
sockopen delicious %delicioussite 80
.msg $chan 4 $chan delicious finder... 7Searching 4 delicious 3Please Wait.....
.timer-delicious 1 15 delicious.timeout
}
#bmark.trigger end
on *:sockopen:delicious: {
sockwrite -n $sockname GET %deliciousurl HTTP/1.1
sockwrite -n $sockname Host: %delicioussite $+ $CRLF $+ $CRLF
}
on *:sockread:delicious: {
if ($sockerr > 0) { .msg %delicious.chan There has been an error... We could not retrive your RandomQuote. Sorry | delicious.clear }
else {
var %deliciousvar | sockread %deliciousvar
;the echo line below is for testing.. Don't forget to comment it out as soon as the script is working
;if (%deliciousvar) echo -at %deliciousvar
if (%delicious.count > %delicious.max) { delicious.clear }
if (<div id="srpRelated"> isin %deliciousvar) { delicious.clear }
if (Try editing your search in the box above isin $deliciousvar) {
if (%delicious.chan == ECHO) { echo -a Sorry, there are no results for you search | delicious.clear }
else { .msg %delicious.chan Sorry, there are no results for your search | delicious.clear }
}
if (<a rel="nofollow" isin %deliciousvar) {
set %delicious.name $httpstrip(%deliciousvar)
set %delicious.link $getlink(%deliciousvar)
}
if (<span class="user-first-saved"> isin %deliciousvar) {
set %delicious.user $httpstrip(%deliciousvar)
if (%delicious.chan == ECHO) {
echo -a 07 $+ %delicious.name 09--04 %delicious.user 09-->>06 %delicious.link
}
else {
.timer 1 %delicious.count .msg %delicious.chan 07 $+ $remove(%delicious.name,$chr(124)) 09--04 $remove(%delicious.user,$chr(124)) 09-->>06 %delicious.link
}
inc %delicious.count
}
}
}
menu channel {
.Delicious
..Trigger Off:.disable #bmark.trigger
..Trigger On:.enable #bmark.trigger
}
alias -l getlink {
var %getlink.return = $gettok($replace($remove($1-,$gettok($replace($1-,href=",$chr(7)),1,7)),",$chr(7)),2,7)
return %getlink.return
}
alias -l httpstrip {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ,')
return %x
}