make sure to replace my username/channel name anubisxhades, with yours(in three places)
Code:
; ________Auto Unhost Program and uptime__________________

ON ME:*:JOIN:#: {
/timerCheck1 0 30 check
}

on *:TEXT:!auh:#: { 
 if ($nick isop #) {
  /timerCheck1 0 30 check
}
}

on *:TEXT:!muh:#: {
 if ($nick isop #) {
  check
}
}

on *:TEXT:!esd:#: {
 if ($nick isop #) {
  /timerCheck1 off
  msg $chan Timer off
}
}

alias host {
  msg # .host $read(target.txt)
  set %h 1
}

alias unhost {
  msg #anubisxhades .unhost
  set %h 0
}

alias justhosted {
  set %jht 1
  /timerJht 1 60 set %jht 0
}

on *:TEXT:!host*:#:{
  if ($nick == anubisxhades) {
    .write -c target.txt $2
    host
    justhosted
  }
}

on *:TEXT:!unhost:#:{
  if ($nick == anubisxhades) {
    unhost
  }
}

alias check {
  if (%h = 1) {
    online
    if (%o  = 1) {
      if (%jht = 0) {
        unhost
        echo now unhosting
      }
    }
  }
}


on *:text:!uptime*:#:{
  set -u10 %target $iif($2,$2,$mid(#,2-))
  set -u10 %channel #
  uptime 
}

alias uptime {
  sockclose uptime
  sockopen uptime nightdev.com 80
}

on *:sockopen:uptime:{
  if ($sockerr) { sockclose $sockname | halt }
  sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ %target HTTP/1.1
  sockwrite -n $sockname Host: www.nightdev.com 
  sockwrite -n $sockname $crlf
}

on *:sockread:uptime:{
  if ($sockerr) { sockclose $sockname }
  var %data
  sockread %data
  tokenize 32 %data
  if ($1 isnum) && ($2) { msg %channel %target has been online for $1- }
  elseif (%data == The channel is not live.) msg %channel %target is currently not online.
}

on *:text:!online*:#:{
  set -u10 %target $iif($2,$2,$mid(#,2-))
  set -u10 %channel #
  online 
}

alias online {
  sockclose online
  sockopen online nightdev.com 80
}

on *:sockopen:online:{
  if ($sockerr) { sockclose $sockname | halt }
  sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ %target HTTP/1.1
  sockwrite -n $sockname Host: www.nightdev.com 
  sockwrite -n $sockname $crlf
}

on *:sockread:online:{
  if ($sockerr) { sockclose $sockname }
  var %data
  sockread %data
  tokenize 32 %data
  if ($1 isnum) && ($2) { set %o 1 }
  elseif (%data == The channel is not live.) set %o 0
}