Skip to content

Commit

Permalink
Rev881, Restrict serverShutdown to admin sites, Avoid redirect cache …
Browse files Browse the repository at this point in the history
…when clicking trayicon
  • Loading branch information
shortcutme committed Feb 2, 2016
1 parent 687a848 commit c11d4f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ __pycache__/

# Data dir
data/*
.db
*.db
4 changes: 2 additions & 2 deletions plugins/Trayicon/TrayiconPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ def hideIcon():
("ZeroNet Github", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet")),
("Report bug/request feature", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet/issues")),
"--",
("!Open ZeroNet", lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port))),
("!Open ZeroNet", lambda: self.opensite("http://%s:%s/%s" % (ui_ip, config.ui_port, config.homepage) )),
"--",
("Quit", self.quit),

)

icon.clicked = lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port))
icon.clicked = lambda: self.opensite("http://%s:%s/%s" % (ui_ip, config.ui_port, config.homepage) )
gevent.threadpool.start_new_thread(icon._run, ()) # Start in real thread (not gevent compatible)
super(ActionsPlugin, self).main()
icon._die = True
Expand Down
2 changes: 1 addition & 1 deletion src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Config(object):

def __init__(self, argv):
self.version = "0.3.6"
self.rev = 879
self.rev = 881
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"
Expand Down
2 changes: 1 addition & 1 deletion src/Ui/UiWebsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def handleRequest(self, data):

admin_commands = (
"sitePause", "siteResume", "siteDelete", "siteList", "siteSetLimit", "siteClone",
"channelJoinAllsite", "serverUpdate", "serverPortcheck", "certSet", "configSet"
"channelJoinAllsite", "serverUpdate", "serverPortcheck", "serverShutdown", "certSet", "configSet"
)

if cmd == "response": # It's a response to a command
Expand Down

0 comments on commit c11d4f2

Please sign in to comment.