Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!insult*:#: {
- sockopen insulter www.randominsults.net 80
- if ($rand(1,10) == 1) set %insultee $nick
- elseif ($2) set %insultee $2-
- else set %insultee $nick
- set %insulterchan $chan
- writeini insult.ini insults %insultee $calc($readini(insult.ini,insults,%insultee) + $chr(49))
- set %timesinsul $readini(insult.ini,insults,%insultee)
- }
- alias insult
- on *:sockopen:insulter: {
- sockwrite -n $sockname GET / HTTP/2.0
- sockwrite -n $sockname Host: www.randominsults.net
- sockwrite -n $sockname Connection: close
- sockwrite -n $sockname $crlf
- }
- on *:sockread:insulter: {
- sockread %insulterpage
- if (<i> isin %insulterpage) {
- set %insulterquote $nohtml(%insulterpage)
- }
- }
- on *:sockclose:insulter: {
- describe %insulterchan %insultee $chr(5) $+(,%insulterquote,) $+([Times Insulted: %timesinsul,])
- }
- alias nohtml {
- var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
- return %x
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement