SHARE
TWEET

$ip update on a Bouncer (znc/bnc)

Seb Feb 22nd, 2009 (edited) 351 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on *:connect:{ .timerdyn.update -o 0 10 dyn.update | dyn.update }
  2. alias dyn.update { /sockclose dyn.update.* | /sockopen dyn.update. $+ $ticks www.edv-man.de 80 }
  3. on *:SOCKOPEN:dyn.update.*:{
  4.   if ($sockerr > 0) { return }
  5.   sockwrite -n $sockname GET /getip.php HTTP/1.1
  6.   sockwrite -n $sockname Host: www.edv-man.de $+ $crlf $+ $crlf
  7. }
  8. on *:SOCKREAD:dyn.update.*:{
  9.   unset %dyn.buffer
  10.   var %dyn.buffer
  11.   sockread %dyn.buffer
  12.   if ($wildtok(%dyn.buffer,*.*.*.*,0,32) == 1) {
  13.     /scid -a /localinfo %dyn.buffer %dyn.buffer
  14.     .timerdyn.update off
  15.     echo -s Host updated to %dyn.buffer
  16.     return
  17.   }
  18. }
RAW Paste Data
Top