new plugins

change_pic.lua: Change the group picture
rename:lua Rename group name
This commit is contained in:
Akamaru 2015-07-27 15:50:19 +02:00
parent c121bff69a
commit 76699da739
3 changed files with 28 additions and 1 deletions

3
.gitignore vendored
View File

@ -45,4 +45,5 @@ plugins/dantest.lua
plugins/flickr.lua
plugins/flickr_search.lua
plugins/google_books.lua
plugins/safebrowsing.lua
plugins/safebrowsing.lua
plugins/random.lua

14
plugins/change_pic.lua Normal file
View File

@ -0,0 +1,14 @@
function run(msg, matches)
local receiver = get_receiver(msg)
local url = matches[1]
local file = download_to_file(url)
local cb_extra = {file_path=file}
chat_set_photo(receiver, file, ok_cb, false)
end
return {
description = "",
usage = {""},
patterns = {"^/pic (.*)$"},
run = run
}

12
plugins/rename.lua Normal file
View File

@ -0,0 +1,12 @@
function run(msg, matches)
local receiver = get_receiver(msg)
local text = matches[1]
rename_chat(receiver, text, ok_cb, false)
end
return {
description = "",
usage = {""},
patterns = {"^/rename (.*)$"},
run = run
}