FWM Latest Entry

By zak123 on Jun 15, 2009

My first socket script, Usage: [`!@~]fwm

on $*:text:/^[`!@~](fwm)/Si:#:{
if ($sock(FWM)) .sockclose FWM
if ($left($1,1) == `) set %way msg $chan
if ($left($1,1) == !) set %way msg $chan
if ($left($1,1) == @) set %way msg $chan
if ($left($1,1) == ~) set %way msg $chan
sockopen FWM fwhyme.com 80
}
on *:SOCKOPEN:FWM: {
sockwrite -nt $sockname GET / HTTP/1.1
sockwrite -nt $sockname Host: fwhyme.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:FWM: {
if ($sockerr) {
%way Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
halt
}
else {
var %sockreader
sockread %sockreader
if (*   <div style="overflow: hidden;">* iswm %sockreader-1) {
noop $regex(%sockreader,/   (.*?)       /Si)
set %FWM $remove($regml(1),                     )
%way [FWM] %FWM
unset %sockreader*
sockclose $sockname
}
if ($len($remove(%sockreader,$chr(9),$chr(32))) > 0) {
var %x = 0
while (%x > -1) {
if ($len(%sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]) <= 850) set %sockreader [ $+ [ $+(-,$calc(%x + 1)) ] ] %sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]
dec %x
}
}
}
}

Comments

Sign in to comment.
zak123   -  Jun 15, 2009

I was going to do a random one, but they didn't have a random FWM generator, would've made things 10 times harder. Nice job on your script though, much more useful than mine lol...

 Respond  
napa182   -  Jun 15, 2009

edit: site fwhyme.com is gone
so i took the code down.

 Respond  
buddy   -  Jun 15, 2009

Excuse me, what do i need to type?

 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.