All pastes #740662 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-18 03:07 UTC
rendered paste body
; =========================
;     jerkcity shittoo
;   contributing authors:
;     dozenutzoverdare
;           and
;     deeznutzoverhere
; =========================
;
; /jerkupdate
; use this when you first install it.
; this connects to the oym webserver
; and retrieves the lasted updated
; list of jerkcity quotes... Use
; whenever you get that "not-so-faggy"
; feeling.
;
; /jerk
; spouts off a random quote
;
; /jerks <search string>
; searches for all instances of <searchstring>
; right click matched items for gay popups
;
;


; v 0.1.gay (doze)
; =========
; jerk say and search adapted from code by Ellis_Dee
; quick /jerkupdate hack by gid
; I think I'm gonna write a web browser next...

; v 0.2.m0 (deez)
; ========
; updated the qsearch alias.  now it echos all matches
; still significantly gay, but notably less so...
; nice auto-update, gid :)

; v 0.3.niz (deez+doze)
; =========
; still tweaking the qsearch.  trying the custom listbox bit.
; sucessful update message move to active window.

; v 0.4.smeuwvemoove (deez)
; =========
; fixed a window populating bug in $gnuqsearch() when the search
; string contained spaces  (heh.)

; v 0.5.poop (doze)
; =========
; added jerke alias for simply an echo, also made it available as qjerk
; because jerke makes d3nt hunger for dried meats

alias bjerk { //say  $+ $rand(1,15) $+ , $+ $rand(1,15) $+ $read(jerkcity.txt) }
alias cjerk { msg $active  $+ $rand(1,15) $+ $read(jerkcity.txt) }
alias jerk { say $read $mircdir\jerkcity.txt }
alias jerke { echo 6 $read $mircdir\jerkcity.txt }
alias qjerk { echo 6 $read $mircdir\jerkcity.txt }
alias jerks { $read(jerkcity.txt, w, *$1-*) }
alias jerklol { var %text = $iif($1-,$v1,$read($mircdir\jerkcity.txt)), %newtext, %i = 1
  while (%i <= $numtok(%text,32)) { var %c1 = $rand(1,16), %c2 = $rand(1,16) | while (%c1 == %c2) { set %c2 $rand(1,16) }
  set %newtext $+(%newtext,$chr(3),%c1,$chr(44),%c2,$gettok(%text,%i,32),$chr(3),$chr(96)) | inc %i } | say $replace(%newtext,$chr(96),$chr(32))
}

alias jerkupdate {
 sockclose jerkshit
 sockopen jerkshit oym.org 80
}
on 1:sockopen:jerkshit:{
 sockwrite jerkshit GET /links/jerk/jerkcity.txt HTTP/1.0 $+ $chr(13) $+ $chr(10)
 sockwrite jerkshit Host: oym.org $+ $chr(13) $+ $chr(10) $+ $chr(13) $+ $chr(10)
}
on 1:sockread:jerkshit:{
 if ($sockerr > 0) return
 :nextread
 sockread %temp
 if ($sockbr == 0) return
 if (%temp == $null) {
   write -c jerkcity.txt
   goto nextread
 }
 write jerkcity.txt %temp
 goto nextread
}
on 1:sockclose:jerkshit:{
 echo 7 -a *** Sucessfully updated jerkcity.txt, GLAUHLGAHUGLHAHGHG.  REPLENISHED COCKS AND DONGS, PLEASE RESUME DICKLICKING.
}

alias gnuqsearch {
 if ( $null == $2 ) { %tmp.qs.str $$?="Search String:" }
 else { set %tmp.qs.str $$2- }
 set %tmp.qs.stop $lines($1)
 set %tmp.qs.windowopen $false
 set %tmp.qs.windowtitle @SearchResultsfor $+ $replace(%tmp.qs.str,$chr(32),$chr(160)) $+ in $+ $1
 set %tmp.qs.i 0
 :loop
 set %tmp.qs.line $read -nl $+ %tmp.qs.i $$1
 if %tmp.qs.str isin %tmp.qs.line {
   if ( !%tmp.qs.windowopen ) {
     write -c qsearchmenu.txt
     write qsearchmenu.txt dclick: { echo double-click in }
     write qsearchmenu.txt Copy to Clipboard: { clipboard $ $+ sline( $ $+ active,1) }
     write qsearchmenu.txt -
     set %tmp.qs.chan 1
     :chanloop
     write qsearchmenu.txt $chan(%tmp.qs.chan) : { msg $chan(%tmp.qs.chan) $ $+ sline( $ $+ active,1) }
     inc %tmp.qs.chan
     if ( %tmp.qs.chan <= $chan(0) ) { goto chanloop }
     write qsearchmenu.txt -
     write qsearchmenu.txt ALL channels : { amsg $ $+ sline( $ $+ active,1) }
     window -l %tmp.qs.windowtitle 10 10 500 200 qsearchmenu.txt
     set %tmp.qs.windowopen $true
   }
   aline %tmp.qs.windowtitle %tmp.qs.line
   window -b %tmp.qs.windowtitle
 }
 inc %tmp.qs.i
 if ( %tmp.qs.i < %tmp.qs.stop ) { goto loop }
 unset %tmp.qs.*
}