Hawkee Search Snippet

By PowerScripters on Jan 09, 2010

Its just a Preview, the code gets more beautiful tomorrow

Screenshot
Image

## Hawkee Search Script
alias hawkee-connection { 
  set %hawkee-full $1
sockopen hawkee hawkee.com 80 }
on *:SOCKOPEN:hawkee:{

  ; connection
  sockwrite -n $sockname GET %hawkee-c HTTP/1.1

  ; Write Connection Details
  sockwrite -n $sockname Host: www.hawkee.com

  sockwrite -n $sockname $crlf 

}
on *:SOCKREAD:hawkee:{
var %mirc.temp
  sockread %mirc.temp
  if (<h1 style="display: inline;">Code Snippets</h1> isin %mirc.temp) {
    msg %hawkee-chan Found » $+ $remove(%mirc.temp,<h1 style="display: inline;">Code Snippets</h1>,&nbsp;) $+            « Scripts for Query » $+ %hawkee-query% $+ «
    msg %hawkee-chan See full Query-Results on: http://hawkee.com/ $+ %hawkee-c 
  }
  elseif (We couldn't find any snippets to match your search. isin %mirc.temp) {
  msg %hawkee-chan We couldn't find any snippets to match your search. Try something else! }
  elseif ((<a href='/snippet/ isin %mirc.temp) && (class='large'> isin %mirc.temp)) {
    if (%hawkee-maxpost == 3) { }
    else {
      msg %hawkee-chan 08H15awkee - Snippet: $replace($remove(%mirc.temp,<a href=,',class=large>,</a>,<br>),/snippet/,http://hawkee.com/snippet/)
      inc %hawkee-maxpost
    }
  }
}
on *:TEXT:!hawkee*:#:{
  unset %hawkee-maxpost
  sockclose hawkee
  set %hawkee-chan $chan
  set %hawkee-c /snippets/?search_query= $+ $2-
  hawkee-connection $2-
}

Comments

Sign in to comment.
bourneident   -  Sep 05, 2010

thanks works great now

 Respond  
sok   -  Sep 05, 2010

set %hawkee-c /snippets/?search_query= $+ $2-
Replace on :
set %hawkee-c /snippets/search/ $+ $2- $+ /

 Respond  
bourneident   -  Sep 05, 2010

everytime

[07:09am] « ~BourneIdent » !hawkee tinyurl
[07:09am] « %HelpDesk » Found »             (6,655)             « Scripts for Query »«
[07:09am] « %HelpDesk » See full Query-Results on: http://hawkee.com//snippets/?search_query=tinyurl
[07:09am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7921/ Highlight flood protection
[07:09am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7920/ Query blocker
[07:09am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7919/ Whois
[07:11am] « ~BourneIdent » !hawkee tinyurl
[07:11am] « %HelpDesk » Found »             (6,655)             « Scripts for Query »«
[07:11am] « %HelpDesk » See full Query-Results on: http://hawkee.com//snippets/?search_query=tinyurl
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7921/ Highlight flood protection
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7920/ Query blocker
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7919/ Whois
[07:11am] « ~BourneIdent » !hawkee work
[07:11am] « %HelpDesk » Found »             (6,655)             « Scripts for Query »«
[07:11am] « %HelpDesk » See full Query-Results on: http://hawkee.com//snippets/?search_query=work
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7921/ Highlight flood protection
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7920/ Query blocker
[07:11am] « %HelpDesk » Hawkee - Snippet:   http://hawkee.com/snippet/7919/ Whois

can you update or fix so it works again

 Respond  
Jethro   -  Jul 02, 2010

Its just a Preview, the code gets more beautiful tomorrowlol Ack I can't help it. By the way, there are some bits that look just ugly! I'm sure this code gets prettier later. No offense for the criticism.

 Respond  
xplo   -  Jul 02, 2010

You can add comments to your scripts by using the ; & # semi-colon & pound at the start of a line, or / and / to enclose text.

This is a comment

;This is a comment

/
This is a comment
/

 Respond  
xplo   -  Jul 02, 2010

hmm, it does work with # ; / /

 Respond  
sercan386   -  Mar 09, 2010

comments dont start with ##, they neither start with //
/ this is not a comment /
so please fix it
;this is a comment. k?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.