I've taken the liberty of just changing it and adding it for you.
MSG NICK
on *:text:!gas*:#: { if (!$($+(%,gas,flood),2)) { if ($2 isnum 1-10 && $regex($3,/\b[0-9]{5}\b/)) { unset gas.* | set -u3 $+(%,gas,flood) on | if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $2 | set %gas.look $3 | sockopen gas www.motortrend.com 80 } | else { msg $nick Please Type !gas <1-10> <zip code> ex: !gas 3 90210 } } }
alias -l afree2 { var %b,%p | %p = $regsub($1-,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%b) | %b = $remove(%b, ,$chr(9)) | return %b }
alias gas { if ($1 isnum 1-10 && $regex($2,/\b[0-9]{5}\b/)) { if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $1 | set %gas.look $2 | sockopen gas www.motortrend.com 80 } | else { msg $nick Please Type /gas <1-10> <zip code> ex: /gas 3 90210 } }
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Gas Price Finder
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on *:SOCKOPEN:gas: {
sockwrite -nt $sockname GET $+(/gas_prices/34/,%gas.look,/index.html) HTTP/1.1
sockwrite -nt $sockname Host: www.motortrend.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:gas: {
if ($sockerr) { msg %gas.nick Socket Error: }
else {
var %g
sockread %g
if (*We are currently* iswm %g) { msg %gas.nick %g | unset %gas.* | sockclose gas }
if (%gas.count == %gas.count2) { unset %gas.* | sockclose gas }
if (*<td class="pad brdr1_b">* iswm %g) { inc %gas.count | msg %gas.nick $afree2(%g) }
}
}
NOTICE NICK
on *:text:!gas*:#: { if (!$($+(%,gas,flood),2)) { if ($2 isnum 1-10 && $regex($3,/\b[0-9]{5}\b/)) { unset gas.* | set -u3 $+(%,gas,flood) on | if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $2 | set %gas.look $3 | sockopen gas www.motortrend.com 80 } | else { notice $nick Please Type !gas <1-10> <zip code> ex: !gas 3 90210 } } }
alias -l afree2 { var %b,%p | %p = $regsub($1-,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%b) | %b = $remove(%b, ,$chr(9)) | return %b }
alias gas { if ($1 isnum 1-10 && $regex($2,/\b[0-9]{5}\b/)) { if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $1 | set %gas.look $2 | sockopen gas www.motortrend.com 80 } | else { notice $nick Please Type /gas <1-10> <zip code> ex: /gas 3 90210 } }
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Gas Price Finder
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on *:SOCKOPEN:gas: {
sockwrite -nt $sockname GET $+(/gas_prices/34/,%gas.look,/index.html) HTTP/1.1
sockwrite -nt $sockname Host: www.motortrend.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:gas: {
if ($sockerr) { notice %gas.nick Socket Error: }
else {
var %g
sockread %g
if (*We are currently* iswm %g) { notice %gas.nick %g | unset %gas.* | sockclose gas }
if (%gas.count == %gas.count2) { unset %gas.* | sockclose gas }
if (*<td class="pad brdr1_b">* iswm %g) { inc %gas.count | notice %gas.nick $afree2(%g) }
}
}
Well, it's for specifics. Most people use multiple windows so they know what they're looking at. Like one ban window for all bans. That and other helpop/locops is a little difficult. It's easier to split it up, but different strokes for different folks imo.
And it's for Unreal/Anope really. I have a version for Inspirircd+Unreal though
I think that this could be improved a little.
On *:Text:*:#:{
if ($nick == %owner) {
if ($1 == !Op) { /mode # $+(+,$str(o,6)) $2- }
if ($1 == !DeOp) { /mode # $+(-,$str(o,6)) $2- }
if ($1 == !Halfop) { /mode # $+(+,$str(h,6)) $2- }
if ($1 == !DeHalfop) { /mode # $+(-,$str(h,6)) $2- }
if ($1 == !Voice) { /mode # $+(+,$str(v,6)) $2- }
if ($1 == !DeVoice) { /mode # $+(-,$str(v,6)) $2- }
if ($1 == !Kick ) { /cs kick # $2- }
if ($1 == !Talk) || ($1 == msg) { msg $2 $3- }
if ($1 == !Access) { /cs access $chan add $2- }
if (mute isin $1) { mode $chan $iif(un !isin $1,+b-v,-b+v) $+(~q:,$address($2,2)) $2 }
}
}
Nice snippet, but I've always been a favor of /run http://hawkee.com :P