Skip to content
Snippets Groups Projects
Commit c54c8739 authored by deuce's avatar deuce
Browse files

Remove stupid "Type '!HELP' for a list of commands." thinger.

parent c9d1c325
No related branches found
No related tags found
No related merge requests found
......@@ -14,47 +14,28 @@ function get_geoip(host, countryonly)
{
var GeoIP;
var m,i,j;
var ishost=false;
var geoip_url;
var result;
var tmpobj={};
var isarray=(typeof(host)=='object' && host instanceof Array);
/*
* Check if this is an IP address or a hostname...
* (We'll ignore weird encodings though like 12345.12345)
*/
if(!isarray) {
m=host.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/);
if(m!=null) {
if(m.length==5) {
for(i=1; i<5; i++) {
j=parseInt(m[i]);
if(j < 0 || j > 255) {
ishost=true;
break;
}
}
}
}
else
ishost=true;
if(isarray) {
for(i in host)
host[i]=resolve_ip(host[i]);
}
else
host=resolve_ip(host);
// Get the best URL
if(countryonly) {
if(isarray)
geoip_url='http://api.ipinfodb.com/v3/ip-country/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host.join(','));
else if(ishost)
geoip_url='http://api.ipinfodb.com/v3/ip-country/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host);
else
geoip_url='http://api.ipinfodb.com/v3/ip-country/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host);
}
else {
if(isarray)
geoip_url='http://api.ipinfodb.com/v3/ip-city/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host.join(','));
else if(ishost)
geoip_url='http://api.ipinfodb.com/v3/ip-city/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host);
else
geoip_url='http://api.ipinfodb.com/v3/ip-city/?key='+geoipAPIKey+'&format=json&ip='+encodeURIComponent(host);
}
......
......@@ -94,7 +94,7 @@ function HTTPRequest()
this.response_headers=[];
for(;;) {
header=this.sock.recvline(4096);
header=this.sock.recvline(4096, 120);
if(header==null)
throw("Unable to receive headers");
if(header=='')
......
......@@ -621,7 +621,6 @@ Server_Commands["PRIVMSG"] = function (srv,cmd,onick,ouh) {
if(!cmd) return false;
if(cmd[0].length == 0) {
srv.o(chan.name,"Type '" + get_cmd_prefix() + "HELP' for a list of commands.");
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment