Auto Update servers.ini

By hlpxbr on Mar 16, 2015

This code provides update servers.ini mIRC through the site http://IRC-Source.com/
You can do /getserv to automatically update the servers.ini

;GetServ 1.0 By eCh (IRC.ChatBrasil.ml)
on *:start:{
/getserv
echo -sa * Getting Servers list from IRC-Source.com!
echo -sa * This addon is made by eCh (IRC.ChatBrasil.Ml)
}

alias getserv {
  write -c servers.ini
  /sockopen getserv www.irc-source.com 80
}

on *:sockopen:getserv*:{
  if $sockerr { echo -ac info * Error opening socket | return }
  var %s = sockwrite -n getserv*
  %s GET /wp-content/plugins/IRCSource-Networks/gen_server_list.php?client=mirc HTTP/1.0
  %s Host: www.irc-source.com $str($crlf,2)
}

on *:sockread:getserv*:{
  if $sockerr { return }
  if !$sock(getserv*).mark {
    var %a
    sockread %a

    if %a == $null { sockmark getserv* 1 }
  }
  else {
    sockread %b
    while $sockbr {
      write servers.ini %b
      sockread %b

    }
  }
}

Comments

Sign in to comment.
hlpxbr   -  Mar 16, 2015

Comment now!

 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.