Markdown Fix für "nicht sudo" Nachricht
/kill Fix
This commit is contained in:
parent
2483a25449
commit
869342ba07
@ -65,7 +65,7 @@ end
|
|||||||
|
|
||||||
function channels:action(msg, config, matches)
|
function channels:action(msg, config, matches)
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ end
|
|||||||
function creds_manager:action(msg, config, matches)
|
function creds_manager:action(msg, config, matches)
|
||||||
local receiver = msg.from.id
|
local receiver = msg.from.id
|
||||||
if receiver ~= config.admin then
|
if receiver ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ function gh_feed:action(msg, config, matches)
|
|||||||
-- For channels
|
-- For channels
|
||||||
if matches[1] == 'sub' and matches[2] and matches[3] then
|
if matches[1] == 'sub' and matches[2] and matches[3] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local id = '@'..matches[3]
|
local id = '@'..matches[3]
|
||||||
@ -195,7 +195,7 @@ function gh_feed:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'del' and matches[2] and matches[3] then
|
elseif matches[1] == 'del' and matches[2] and matches[3] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local id = '@'..matches[3]
|
local id = '@'..matches[3]
|
||||||
@ -228,7 +228,7 @@ function gh_feed:action(msg, config, matches)
|
|||||||
|
|
||||||
if matches[1] == 'sub' and matches[2] then
|
if matches[1] == 'sub' and matches[2] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local output = gh_feed:subscribe(id, matches[2])
|
local output = gh_feed:subscribe(id, matches[2])
|
||||||
@ -236,7 +236,7 @@ function gh_feed:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'del' and matches[2] then
|
elseif matches[1] == 'del' and matches[2] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local output = gh_feed:unsubscribe(id, matches[2])
|
local output = gh_feed:unsubscribe(id, matches[2])
|
||||||
@ -248,7 +248,7 @@ function gh_feed:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'sync' then
|
elseif matches[1] == 'sync' then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
gh_feed:cron()
|
gh_feed:cron()
|
||||||
|
@ -50,7 +50,7 @@ end
|
|||||||
|
|
||||||
function imgblacklist:action(msg, config, matches)
|
function imgblacklist:action(msg, config, matches)
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ end
|
|||||||
|
|
||||||
function plugin_manager:action(msg, config, matches)
|
function plugin_manager:action(msg, config, matches)
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ function quotes:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == "delquote" and matches[2] then
|
elseif matches[1] == "delquote" and matches[2] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
utilities.send_reply(msg, quotes:delete_quote(msg), true)
|
utilities.send_reply(msg, quotes:delete_quote(msg), true)
|
||||||
|
@ -224,7 +224,7 @@ function rss:action(msg, config, matches)
|
|||||||
-- For channels
|
-- For channels
|
||||||
if matches[1] == 'sub' and matches[2] and matches[3] then
|
if matches[1] == 'sub' and matches[2] and matches[3] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local id = '@'..matches[3]
|
local id = '@'..matches[3]
|
||||||
@ -238,7 +238,7 @@ function rss:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'del' and matches[2] and matches[3] then
|
elseif matches[1] == 'del' and matches[2] and matches[3] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local id = '@'..matches[3]
|
local id = '@'..matches[3]
|
||||||
@ -271,7 +271,7 @@ function rss:action(msg, config, matches)
|
|||||||
|
|
||||||
if matches[1] == 'sub' and matches[2] then
|
if matches[1] == 'sub' and matches[2] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local output = rss:subscribe(id, matches[2])
|
local output = rss:subscribe(id, matches[2])
|
||||||
@ -279,7 +279,7 @@ function rss:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'del' and matches[2] then
|
elseif matches[1] == 'del' and matches[2] then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local output = rss:unsubscribe(id, matches[2])
|
local output = rss:unsubscribe(id, matches[2])
|
||||||
@ -291,7 +291,7 @@ function rss:action(msg, config, matches)
|
|||||||
return
|
return
|
||||||
elseif matches[1] == 'sync' then
|
elseif matches[1] == 'sync' then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
rss:cron()
|
rss:cron()
|
||||||
|
@ -39,7 +39,7 @@ end
|
|||||||
|
|
||||||
function shell:action(msg, config, matches)
|
function shell:action(msg, config, matches)
|
||||||
if not is_sudo(msg, config) then
|
if not is_sudo(msg, config) then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ end
|
|||||||
|
|
||||||
function site_header:action(msg, config, matches)
|
function site_header:action(msg, config, matches)
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local url = matches[2]
|
local url = matches[2]
|
||||||
|
@ -112,7 +112,7 @@ function special:action(msg, config, matches)
|
|||||||
utilities.send_photo(msg.chat.id, download_to_file('http://img.ponywave.de/di/N03B/squid.jpg'), 'They are', msg.message_id)
|
utilities.send_photo(msg.chat.id, download_to_file('http://img.ponywave.de/di/N03B/squid.jpg'), 'They are', msg.message_id)
|
||||||
return
|
return
|
||||||
elseif msg_text:match("[Kk][Ii][Ll][Ll]") then
|
elseif msg_text:match("[Kk][Ii][Ll][Ll]") then
|
||||||
output = msg.first.first_name..' tötet '..matches[1]
|
output = user_name..' tötet '..matches[1]
|
||||||
elseif msg_text:match("[Pp][Ee]") then
|
elseif msg_text:match("[Pp][Ee]") then
|
||||||
output = 'nis'
|
output = 'nis'
|
||||||
elseif msg_text:match("[Vv][Aa]") then
|
elseif msg_text:match("[Vv][Aa]") then
|
||||||
|
@ -137,7 +137,7 @@ function stats:action(msg, config, matches)
|
|||||||
|
|
||||||
if matches[2] == "chat" then
|
if matches[2] == "chat" then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
utilities.send_reply(msg, stats:chat_stats(matches[3]), 'HTML')
|
utilities.send_reply(msg, stats:chat_stats(matches[3]), 'HTML')
|
||||||
|
@ -8,7 +8,7 @@ surrogate.triggers = {
|
|||||||
|
|
||||||
function surrogate:action(msg, config, matches)
|
function surrogate:action(msg, config, matches)
|
||||||
if not is_sudo(msg, config) then
|
if not is_sudo(msg, config) then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
utilities.send_message(matches[1], matches[2], true, nil, true)
|
utilities.send_message(matches[1], matches[2], true, nil, true)
|
||||||
|
@ -249,7 +249,7 @@ end
|
|||||||
function twitter_send:action(msg, config, matches)
|
function twitter_send:action(msg, config, matches)
|
||||||
if matches[1] == "twwhitelist add" then
|
if matches[1] == "twwhitelist add" then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local user_id = matches[2]
|
local user_id = matches[2]
|
||||||
@ -266,7 +266,7 @@ function twitter_send:action(msg, config, matches)
|
|||||||
|
|
||||||
if matches[1] == "twwhitelist del" then
|
if matches[1] == "twwhitelist del" then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local user_id = matches[2]
|
local user_id = matches[2]
|
||||||
@ -289,7 +289,7 @@ function twitter_send:action(msg, config, matches)
|
|||||||
if not oauth_token and not oauth_token_secret then
|
if not oauth_token and not oauth_token_secret then
|
||||||
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local text, auth_url = twitter_send:do_twitter_authorization_flow(hash, true)
|
local text, auth_url = twitter_send:do_twitter_authorization_flow(hash, true)
|
||||||
@ -313,7 +313,7 @@ function twitter_send:action(msg, config, matches)
|
|||||||
if matches[1] == 'auth' and matches[2] then
|
if matches[1] == 'auth' and matches[2] then
|
||||||
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -328,7 +328,7 @@ function twitter_send:action(msg, config, matches)
|
|||||||
if matches[1] == 'unauth' then
|
if matches[1] == 'unauth' then
|
||||||
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
if msg.chat.type == 'group' or msg.chat.type == 'supergroup' then
|
||||||
if msg.from.id ~= config.admin then
|
if msg.from.id ~= config.admin then
|
||||||
utilities.send_reply(msg, config.errors.sudo)
|
utilities.send_reply(msg, config.errors.sudo, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user