changeset 1517:6df03b9b17ba

eventcmd.pastebin: add https and ftp support (suggested by Vic and M. Vuets)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 27 Sep 2008 21:21:37 +0200
parents 581d7bc8a404
children 63dc211a4c1a
files mcabber/contrib/events/eventcmd.pastebin
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/contrib/events/eventcmd.pastebin	Sat Sep 27 21:14:17 2008 +0200
+++ b/mcabber/contrib/events/eventcmd.pastebin	Sat Sep 27 21:21:37 2008 +0200
@@ -37,7 +37,7 @@
 [ "$jid" == "$me" ] && exit 0
 
 # If receiving a message, scan for links
-url=$(cat "$4" | awk 'BEGIN { RS="( |\n|\t)+"; FS=""; } /http:\/\// { print $1 }')
+url=$(cat "$4" | awk 'BEGIN { RS="( |\n|\t)+"; FS=""; } /(https?|ftp):\/\// { print $1 }')
 
 if [ -n "$url" ]; then
   date=$(/bin/date)