summaryrefslogtreecommitdiff
path: root/fetch.go
diff options
context:
space:
mode:
Diffstat (limited to 'fetch.go')
-rw-r--r--fetch.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/fetch.go b/fetch.go
index ecd3ec9ea..e505776cb 100644
--- a/fetch.go
+++ b/fetch.go
@@ -31,6 +31,12 @@ func Fetch(id int32, targetUrl string) []byte {
FetchResId: id,
}
+ if !Perms.Connect {
+ resMsg.Error = "Permission to connect denied."
+ PubMsg("fetch", resMsg)
+ return
+ }
+
resp, err := http.Get(targetUrl)
if err != nil {
resMsg.Error = err.Error()