Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
c54c8739
Commit
c54c8739
authored
13 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Remove stupid "Type '!HELP' for a list of commands." thinger.
parent
c9d1c325
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
exec/load/geoip.js
+5
-24
5 additions, 24 deletions
exec/load/geoip.js
exec/load/http.js
+1
-1
1 addition, 1 deletion
exec/load/http.js
exec/load/ircbot_commands.js
+0
-1
0 additions, 1 deletion
exec/load/ircbot_commands.js
with
6 additions
and
26 deletions
exec/load/geoip.js
+
5
−
24
View file @
c54c8739
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
exec/load/http.js
+
1
−
1
View file @
c54c8739
...
...
@@ -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
==
''
)
...
...
This diff is collapsed.
Click to expand it.
exec/load/ircbot_commands.js
+
0
−
1
View file @
c54c8739
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment