From e6add15b639d94ddf9cc0f00e2e0d12ebbae5597 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sat, 5 Dec 2015 22:41:33 +0000 Subject: Added coffee,pool,cat --- cowsay_weechat/cowsay.lua | 52 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) (limited to 'cowsay_weechat') diff --git a/cowsay_weechat/cowsay.lua b/cowsay_weechat/cowsay.lua index d29614b..03228d2 100644 --- a/cowsay_weechat/cowsay.lua +++ b/cowsay_weechat/cowsay.lua @@ -98,6 +98,47 @@ function ascii_juice( name1, name2 ) return s end +-------------------------------------------------------------------------------- +-- http://ascii.co.uk/art/coffee +function ascii_coffee( name ) + local s = "" + if name == nil then name = "Single Expresso" end + if name ~= nil then name = "Single Expresso for " .. name end + +s = s .. [[ .-=-. + ,|`~'| + `| | ]] .. name .. [[ + `~']] + + return s +end +-------------------------------------------------------------------------------- +--http://ascii.co.uk/art/pool +function ascii_pool( name ) + local s = "" + if name == nil then name = "" end + +s = s .. [[,_____,_____, 6 __ +T\ :. .^\,_/_\_I_ ]] .. name .. [[ +I ^T=====;=====T /| + I I _|_|]] + + return s +end +-------------------------------------------------------------------------------- +--http://ascii.co.uk/art/cat +function ascii_cat( text ) + local s = "" + if text == nil then text = "mmeeoowwrr!" end + +s = s .. [[ + ) _. ]] .. text .. [[ + (___)'' + / ,_,/ + /'"\ )\]] + return s +end + function cs_print_list() weechat.print("","buf "..weechat.current_buffer()) weechat.print(weechat.current_buffer(),"/msg #mainlv br br") @@ -107,12 +148,17 @@ function cs_command( cmd, args ) cmd = string.lower(cmd) weechat.print("",cmd..":"..args) if cmd == "nerd" then - --weechat.print("",ascii_nerd(arg1)) weechat.command( weechat.current_buffer(), ascii_nerd(args) ) elseif cmd == "goat" then weechat.command( weechat.current_buffer(), ascii_goat(args) ) elseif cmd == "shoot" then weechat.command( weechat.current_buffer(), ascii_shoot(args) ) + elseif cmd == "coffee" then + weechat.command( weechat.current_buffer(), ascii_coffee(args) ) + elseif cmd == "pool" then + weechat.command( weechat.current_buffer(), ascii_pool(args) ) + elseif cmd == "cat" then + weechat.command( weechat.current_buffer(), ascii_cat(args) ) else weechat.print(weechat.current_buffer(), "Unknown command") end @@ -140,11 +186,11 @@ end weechat.register("cowsay", "FreeArtMan", "0.0.1", "Beerware", "ASCII drawing in commanline", "", "") weechat.hook_command("cowsay", "cowsay", -- description - "[shoot , goat , juice , nerd ", -- args + "[shoot , goat , juice , nerd , coffee , pool , cat ", -- args " list: \n".. " add: \n".. " del: \n\n".. "If no command is given, all phrases are listed.", - "nerd|juice|goat|shoot", -- completion + "nerd|juice|goat|shoot|coffee|pool|, -- completion "cowsay_init", "") \ No newline at end of file -- cgit v1.2.3