diff --git a/konata.sh b/konata.sh index fd217ff..477e01d 100755 --- a/konata.sh +++ b/konata.sh @@ -92,6 +92,7 @@ help(){ - /4c [board] - Get a random image from 4chan. - /lfy [query] - Let me look that up for you... - /ip [address] - Get information for an IP address. + - /wttr [city] - Get the weather for a city. - /repo - Get my source code. And a lot more to come!" @@ -238,6 +239,12 @@ ip(){ Time: $(TZ=${data[9]} date +'%H:%M %Z')" } +wttr(){ + args + res=$(curl wttr.in/${args[0]}?format=3) + sendmsg "$res" +} + repo(){ sendmsg "You can find my source code here." } @@ -325,6 +332,7 @@ case "$cmd" in /4c@$bot*) 4c ;; /lfy@$bot*) lfy ;; /ip@$bot*) ip ;; + /wttr@$bot*) wttr ;; /repo@$bot) repo ;; # Administrative /mp3@$bot*) mp3 ;;