Restrict blocked site addition when using mergerSiteAdd
This commit is contained in:
parent
b21b885aa9
commit
43c366d2fb
3 changed files with 18 additions and 2 deletions
|
@ -79,8 +79,11 @@ class UiWebsocketPlugin(object):
|
|||
def cbMergerSiteAdd(self, to, addresses):
|
||||
added = 0
|
||||
for address in addresses:
|
||||
added += 1
|
||||
site_manager.need(address)
|
||||
try:
|
||||
site_manager.need(address)
|
||||
added += 1
|
||||
except Exception as err:
|
||||
self.cmd("notification", ["error", _["Adding <b>%s</b> failed: %s"] % (address, err)])
|
||||
if added:
|
||||
self.cmd("notification", ["done", _["Added <b>%s</b> new site"] % added, 5000])
|
||||
RateLimit.called(self.site.address + "-MergerSiteAdd")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue