<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>CHANGELOG</filename>
    </added>
    <added>
      <filename>platform/base</filename>
    </added>
    <added>
      <filename>platform/darwin</filename>
    </added>
    <added>
      <filename>platform/linux</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -55,7 +55,6 @@ killx=n
 screenshot=/tmp/prey-screenshot.jpg
 picture=/tmp/prey-picture.jpg
 
-
 ####################################################################
 # not implemented yet
 ####################################################################</diff>
      <filename>config</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #!/bin/bash
 ####################################################################
 # Prey Installation Script - by Tomas Pollak (bootlog.org)
-# URL : http://prey.bootlog.org
+# URL : http://preyproject.com
 # License: GPLv3
 ####################################################################
 
@@ -17,10 +17,10 @@ DEFAULT_INSTALLPATH='/usr/share/prey'
 
 separator=&quot;--------------------------------------------------------------------------------&quot;
 
-	echo -e &quot;\n\t\033[1m####################################&quot;
-	echo -e &quot;\t### Prey $version installation script ###&quot;
-	echo -e &quot;\t### By Tomas Pollak, bootlog.org ###&quot;
-	echo -e &quot;\t####################################\033[0m\n&quot;
+	echo -e &quot;\n\t\033[1m########################################&quot;
+	echo -e &quot;\t###   Prey $version installation script   ###&quot;
+	echo -e &quot;\t###   By Tomas Pollak, bootlog.org   ###&quot;
+	echo -e &quot;\t########################################\033[0m\n&quot;
 
 	# define language
 	echo -e $separator
@@ -34,7 +34,7 @@ separator=&quot;---------------------------------------------------------------------
 		. lang/$LANGUAGE
 		echo &quot;$HELLO_IN_LANGUAGE&quot;
 	else
-		echo -e &quot; !! Unsupported language! Remember to write its valid code (en for english, es for espanol, etc)\n&quot;
+		echo -e &quot; !! Unsupported language! Remember to write its valid code (en for english, es for espanol, de for deutsche, etc)\n&quot;
 		exit
 	fi
 
@@ -44,7 +44,7 @@ separator=&quot;---------------------------------------------------------------------
 
 		previous_path=&quot;/usr/local/bin&quot;
 
-	elif [ -e &quot;/usr/bin/prey&quot; ]; then
+	elif [ -e &quot;/usr/bin/prey.sh&quot; ]; then
 
 		previous_path=&quot;/usr/bin&quot;
 
@@ -188,7 +188,7 @@ separator=&quot;---------------------------------------------------------------------
 		sed -i -e &quot;s/lang='.*'/lang='$LANGUAGE'/&quot; $temp_config_file
 		sed -i -e &quot;s/emailtarget='.*'/emailtarget='$EMAIL'/&quot; $temp_config_file
 		sed -i -e &quot;s/url='.*'/url='$URL'/&quot; $temp_config_file
-		sed -i -e &quot;s/-SLASH-/\//g&quot; $temp_config_file
+		sed -i -e &quot;s/-SLASH-/\//g&quot; $temp_config_file # resolve the slash hack
 		sed -i -e &quot;s/smtp_server='.*'/smtp_server='$SMTP_SERVER'/&quot; $temp_config_file
 		sed -i -e &quot;s/smtp_username='.*'/smtp_username='$SMTP_USER'/&quot; $temp_config_file
 		sed -i -e &quot;s/smtp_password='.*'/smtp_password='$SMTP_PASS'/&quot; $temp_config_file
@@ -235,9 +235,9 @@ separator=&quot;---------------------------------------------------------------------
 	sudo cp -f $prey_file sendEmail $INSTALLPATH
 	sudo chmod +x $INSTALLPATH/sendEmail $INSTALLPATH/$prey_file
 
-	# now the language files
-	sudo cp -R lang alerts $INSTALLPATH
-	sudo chmod +x $INSTALLPATH/lang/*
+	# now the language and specific platform files
+	sudo cp -R lang alerts platform $INSTALLPATH
+	sudo chmod +x $INSTALLPATH/lang/* $INSTALLPATH/platform/*
 
 	if [ &quot;$SKIP&quot; != &quot;y&quot; ]; then
 </diff>
      <filename>install.sh</filename>
    </modified>
    <modified>
      <diff>@@ -84,11 +84,11 @@ elif [ -n &quot;$DEFAULT_INSTALLPATH&quot; ]; then # we're running the installer
 	COPYING_ISIGHTCAPTURE=&quot; -- Copying iSightCapture to $INSTALLPATH...&quot;
 	COPYING_FILES=&quot;\n -- Copying necessary files to $INSTALLPATH and setting permissions...&quot;
 	ADDING_CRONTAB=&quot; -- Adding crontab entry...&quot;
-	INSTALL_OK=&quot;\n -- Everything OK! Prey is up and running now. You can now delete this directory safely.
+	INSTALL_OK=&quot;\033[1m\n -- Everything OK! Prey is up and running now. You can now delete this directory safely.
  -- If you ever want to uninstall Prey, just delete the $INSTALLPATH directory
     and remove Prey's line in root's crontab: \n
 \t $ sudo rm -Rf $INSTALLPATH\n \t $ sudo crontab -l | grep -v prey | sudo crontab -\n
- -- For updates remember to check http://prey.bootlog.org!\n\n&quot;
+ -- For updates remember to check http://prey.bootlog.org!\033[0m\n\n&quot;
 
 else
 
@@ -111,8 +111,8 @@ else
 	STRING_TAKE_IMAGE=&quot; -- Taking a screenshot and a picture of the impostor...&quot;
 	STRING_TAKE_IMAGE_DONE=&quot; -- Done with the images!&quot;
 	STRING_SENDING_EMAIL=&quot; -- Sending the email...&quot;
-	STRING_ERROR_EMAIl=&quot;There was a problem sending the email. Are you sure it was setup correctly?
-	If you're using Gmail, try removing the '@gmail.com' from the smtp_username field in Prey's config file.&quot;
+	STRING_ERROR_EMAIL=&quot;\n\033[1m !! There was a problem sending the email. Are you sure it was setup correctly?
+    If you're using Gmail, try removing the '@gmail.com' from the smtp_username field in Prey's config file.\033[0m\n&quot;
 	STRING_REMOVE_EVIDENCE=&quot; -- Removing all traces of evidence...&quot;
 	STRING_CHANGE_WALLPAPER=&quot; -- Changing the wallpaper to alert him and nearby users...&quot;
 	STRING_SHOW_ALERT=&quot; -- Showing the guy our alert message...&quot;</diff>
      <filename>lang/en</filename>
    </modified>
    <modified>
      <diff>@@ -84,11 +84,11 @@ elif [ -n &quot;$DEFAULT_INSTALLPATH&quot; ]; then # we're running the installer
 	COPYING_ISIGHTCAPTURE=&quot; -- Copiando iSightCapture a $INSTALLPATH...&quot;
 	COPYING_FILES=&quot;\n -- Copiando archivos necesarios a $INSTALLPATH y definiendo permisos...&quot;
 	ADDING_CRONTAB=&quot; -- Agregando entrada en el crontab...&quot;
-	INSTALL_OK=&quot;\n -- Todo bien! Prey esta instalado y listo para volar. Ahora puedes eliminar esta carpeta.
+	INSTALL_OK=&quot;\033[1m\n -- Todo bien! Prey esta instalado y listo para volar. Ahora puedes eliminar esta carpeta.
  -- Si alguna vez quieres desinstalar Prey, basta con que elimines la carpeta $INSTALLPATH
     y remuevas la linea de Prey del crontab de root:\n
 \t $ sudo rm -Rf $INSTALLPATH\n \t $ sudo crontab -l | grep -v prey | sudo crontab -\n
- -- Para actualizaciones recuerda visitar http://prey.bootlog.org!\n\n&quot;
+ -- Para actualizaciones recuerda visitar http://prey.bootlog.org!\033[0m\n\n&quot;
 
 else
 
@@ -111,8 +111,8 @@ else
 	STRING_TAKE_IMAGE=&quot; -- Tomando una captura de pantalla y una foto de la persona...&quot;
 	STRING_TAKE_IMAGE_DONE=&quot; -- Finalizando la captura de imagenes...&quot;
 	STRING_SENDING_EMAIL=&quot; -- Enviando el correo electronico...&quot;
-	STRING_ERROR_EMAIl=&quot; !! Hubo un problema enviando el correo electronico. &#191;Estas seguro de que fue configurado correctamente?
-	Si estas usando Gmail, intenta removiendo el '@gmail.com' del campo smtp_username en el archivo de configuracion.&quot;
+	STRING_ERROR_EMAIL=&quot;\n\033[1m !! Hubo un problema enviando el correo electronico. &#191;Estas seguro de que fue configurado correctamente?
+    Si estas usando Gmail, intenta removiendo el '@gmail.com' del campo smtp_username en el archivo de configuracion.\033[0m\n&quot;
 	STRING_REMOVE_EVIDENCE=&quot; -- Eliminando la evidencia...&quot;
 	STRING_CHANGE_WALLPAPER=&quot; -- Cambiando el fondo de pantalla para alertar a la persona y a los que esten cerca...&quot;
 	STRING_SHOW_ALERT=&quot; -- Mostrando nuestro mensaje de alerta...&quot;</diff>
      <filename>lang/es</filename>
    </modified>
    <modified>
      <diff>@@ -7,276 +7,86 @@
 
 version='0.2'
 . ./config
-. lang/$lang
-
-####################################################################
-# Veamos si estamos en Linux o Mac
-####################################################################
-echo -e &quot;\E[36m$STRING_START\E[0m&quot;
 
-platform=`uname`
-logged_user=`who | cut -d' ' -f1 | sort -u | tail -1`
-
-if [ $platform == 'Darwin' ]; then
-	getter='curl -s'
-else
-	getter='wget -q -O -'
+if [ ! -e &quot;lang/$lang&quot; ]; then # fallback to english in case the lang is missing
+	lang='en'
 fi
+. lang/$lang
 
-# en teoria se puede usar la variable OSTYPE de bash, pero no lo he probado
-# posibles: Linux, Darwin, FreeBSD, CygWin?
+# valid unames: Linux, Darwin, FreeBSD, CygWin?
+# we also set it to lowercase
+os=`uname | sed &quot;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/&quot;`
+. platform/base
+. platform/$os
+
+echo -e &quot;\E[36m$STRING_START\E[0m&quot;
 
 ####################################################################
-# primero revisemos si buscamos url, y si existe o no
+# if there's a URL in the config, lets see if it actually exists
+# if it doesn't, the program will shut down gracefully
 ####################################################################
+
 if [ -n &quot;$url&quot; ]; then
 	echo &quot;$STRING_CHECK_URL&quot;
+	check_url
 
-	# Mac OS viene con curl por defecto, asi que tenemos que checkear
-	if [ $platform == 'Darwin' ]; then
-
-		status=`$getter -I $url | awk /HTTP/ | sed 's/[^200|302|400|404|500]//g'` # ni idea por que puse tantos status codes, deberia ser 200 o 400
-
-		if [ $status == '200' ]; then
-			config=`$getter $url`
-		fi
-
-#	elif [ $platform == 'Linux' ]; then
-	else # ya agregaremos otras plataformas
-
-		config=`$getter $url`
-
-	fi
-
-	# ok, ahora si el config tiene ALGO, significa que tenemos que hacer la pega
-	# eventualmente el archivo remoto puede tener parametros y gatillar comportamientos
+	# ok, if the config actually contains something, it means Prey should do its magic
+	# eventually the remote file can contain config params to modify certain behaviours in Prey
 	if [ -n &quot;$config&quot; ]; then
-		echo &quot;$STRING_PROBLEM&quot;
+		echo -e &quot;$STRING_PROBLEM&quot;
 	else
 		echo -e &quot;$STRING_NO_PROBLEM&quot;
 		exit
 	fi
-
 fi
 
 ####################################################################
-# partamos por ver cual es la IP publica
+# ok, lets gather all the information
 ####################################################################
-echo &quot;$STRING_GET_IP&quot;
 
-publico=`$getter checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/&lt;.*$//'`
+echo &quot;$STRING_GET_IP&quot;
+get_public_ip
 
-####################################################################
-# ahora el IP interno
-####################################################################
 echo &quot;$STRING_GET_LAN_IP&quot;
+get_internal_ip
 
-# works in mac as well as linux (linux just prints an extra &quot;addr:&quot;)
-interno=`ifconfig | grep &quot;inet &quot; | grep -v &quot;127.0.0.1&quot; | cut -f2 | awk '{ print $2}'`
-
-####################################################################
-# gateway, mac e informacion de wifi (nombre red, canal, etc)
-####################################################################
 echo &quot;$STRING_GET_MAC_AND_WIFI&quot;
+get_network_info
 
-if [ $platform == 'Darwin' ]; then
-	airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
-	routes=`netstat -rn | grep default | cut -c20-35`
-	mac=`arp -n $routes | cut -f4 -d' '`
-	wifi_info=`$airport -I`
-else
-	routes=`route -n`
-	mac=`ifconfig | grep 'HWaddr' | cut -d: -f2-7`
-	wifi_info=`iwconfig 2&gt;&amp;1 | grep -v &quot;no wireless&quot;`
-fi
-
-if [ &quot;$interno&quot; == &quot;&quot; ]; then # no wifi connection, let's see if we can auto connect to one
-
+if [ &quot;$wifi_info&quot; == &quot;&quot; ]; then # no wifi connection, let's see if we can auto connect to one
 	echo &quot;$STRING_TRY_TO_CONNECT&quot;
-
-	if [ $platform == 'Linux' ]; then
-
-		# Find device used for wifi.
-		devlist=$(cat /proc/net/wireless | tail --lines=1) 2&gt;/dev/null
-		devleft=${devlist#' '*}
-		devright=${devlist%%':'*}
-		echo $devright | grep &quot;&quot; &gt; /tmp/dev_pure
-		dev=$(cat /tmp/dev_pure)
-
-		# Get a list of open wifi points, and choose one
-		iwlist $dev scan &gt; /tmp/scan_output 2&gt;/dev/null
-		scanone=$(egrep 'ESSID|Encryption' /tmp/scan_output)
-		essidone=${scanone%%&quot;Encryption key:off&quot;*}
-		essidquot=${essidone##*'ESSID:&quot;'}
-		essid=${essidquot%'&quot;'*}
-
-		# lets see if we have a valid device and essid
-		if [[ ! -z $essid &amp;&amp; ! -z $dev ]]; then
-			iwconfig $dev essid $essid
-			wifi_info=`iwconfig 2&gt;&amp;1 | grep -v &quot;no wireless&quot;`
-		else
-			echo &quot;$STRING_NO_CONNECT_TO_WIFI&quot;
-		fi
-
-	else # Mac Wifi Autoconnect by Warorface &lt;warorface@gmail.com&gt;
-
-		# restart airport service
-		networksetup -setnetworkserviceenabled AirPort off 2&gt;/dev/null
-		networksetup -setnetworkserviceenabled AirPort on 2&gt;/dev/null
-
-		# power on the airport
-		networksetup -setairportpower off 2&gt;/dev/null
-		networksetup -setairportpower on 2&gt;/dev/null
-
-		# list available access points and parse to get first SSID with security &quot;NONE&quot;
-		essid=`$airport -s | grep NONE | head -1 | cut -c1-33 | sed 's/^[ \t]*//'`
-
-		if [ -n &quot;$essid&quot; ]; then
-
-			# now lets connect and get the new info
-			networksetup -setairportnetwork $essid 2&gt;/dev/null
-			wifi_info=`$airport -I`
-
-		else
-
-			echo &quot;$STRING_NO_CONNECT_TO_WIFI&quot;
-
-		fi
-
-	fi
-
+	try_to_connect
 fi
 
-####################################################################
-# rastreemos la ruta completa hacia Google
-####################################################################
-
-# disabled for now, TOO SLOW!
-# traceroute=`which traceroute`
+# traceroute=`which traceroute` &lt;-- disabled since its TOO DAMN SLOW!
 if [ -n &quot;$traceroute&quot; ]; then
 	echo &quot;$STRING_TRACE&quot;
-	complete_trace=`$traceroute -q1 www.google.com 2&gt;&amp;1`
+	trace_route
 fi
 
-####################################################################
-# ahora veamos que programas esta corriendo
-####################################################################
 echo &quot;$STRING_UPTIME_AND_PROCESS&quot;
+get_uptime_and_processes
 
-uptime=`uptime`
-programas=`ps ux`
-
-####################################################################
-# ahora veamos que archivos se han modificado
-####################################################################
 echo &quot;$STRING_MODIFIED_FILES&quot;
+get_modified_files
 
-# no incluimos los archivos carpetas ocultas ni los archivos weones de Mac OS
-archivos=`find $ruta_archivos \( ! -regex '.*/\..*/..*' \) -type f -mmin -$minutos 2&gt;&amp;1`
-# archivos=`find ~/. \( ! -regex '.*/\..*/\.DS_Store' \) -type f -mmin -$minutos`
-
-####################################################################
-# ahora veamos a donde esta conectado
-####################################################################
 echo &quot;$STRING_ACTIVE_CONNECTIONS&quot;
+get_active_connections
 
-connections=`netstat -a | grep -i established`
-
-####################################################################
-# ahora los metemos en el texto que va a ir en el mail
-####################################################################
 echo &quot;$STRING_WRITE_EMAIL&quot;
-. lang/$lang
+write_email
 
-####################################################################
-# veamos si podemos sacar una foto del tipo con la camara del tarro.
-# de todas formas un pantallazo para ver que esta haciendo la persona
-####################################################################
 echo &quot;$STRING_TAKE_IMAGE&quot;
-
-if [ $platform == 'Darwin' ]; then
-
-	screencapture='/usr/sbin/screencapture -mx'
-
-	if [ `whoami` == 'root' ]; then # we need to get the PID of the loginwindow and take the screenshot through launchctl
-
-        loginpid=`ps -ax | grep loginwindow.app | grep -v grep | awk '{print $1}'`
-        launchctl bsexec $loginpid $screencapture $screenshot
-
-	else
-
-		$screencapture $screnshot
-
-	fi
-
-	# muy bien, veamos si el tarro puede sacar una imagen con la webcam
-	./isightcapture $picture
-
-else
-
-	# si tenemos streamer, saquemos la foto
-	streamer=`which streamer`
-	if [ -n &quot;$streamer&quot; ]; then # excelente
-
-		$streamer -o /tmp/imagen.jpeg &amp;&gt; /dev/null # streamer necesita que sea JPEG (con la E) para detectar el formato
-
-		if [ -e '/tmp/imagen.jpeg' ]; then
-
-			mv /tmp/imagen.jpeg $picture
-
-		else # by Vanscot, http://www.hometown.cl/ --&gt; some webcams are unable to take JPGs so we grab a PPM
-
-			$streamer -o /tmp/imagen.ppm &amp;&gt; /dev/null
-			if [ -e '/tmp/imagen.ppm' ]; then
-
-				$convert=`which convert`
-				if [ -n &quot;$convert&quot; ]; then # si tenemos imagemagick instalado podemos convertirla a JPG
-					$convert /tmp/imagen.ppm $picture &gt; /dev/null
-				else # trataremos de enviarla asi nomas
-					picture='/tmp/imagen.ppm'
-				fi
-
-			fi
-
-		fi
-
-	fi
-
-	scrot=`which scrot` # scrot es mas liviano y mas rapido
-	import=`which import` # viene con imagemagick, mas obeso
-
-	if [ -n &quot;$scrot&quot; ]; then
-
-		if [ `whoami` == 'root' ]; then
-			DISPLAY=:0 su $logged_user -c &quot;$scrot $screenshot&quot;
-		else
-			$scrot $screenshot
-		fi
-
-	elif [ -n &quot;$import&quot; ]; then
-
-		args=&quot;-window root -display :0&quot;
-
-		if [ `whoami` == 'root' ]; then # friggin su command, cannot pass args with &quot;-&quot; since it gets confused
-			su $logged_user -c &quot;$import $args $screenshot&quot;
-		else
-			$import $args $screenshot
-		fi
-
-	fi
-
-fi
-
+get_images
 echo &quot;$STRING_TAKE_IMAGE_DONE&quot;
 
 ####################################################################
-# ahora la estocada final: mandemos el mail
+# all set, lets send the email
 ####################################################################
+
 echo &quot;$STRING_SENDING_EMAIL&quot;
-complete_subject=&quot;$subject @ `date +&quot;%a, %e %Y %T %z&quot;`&quot;
-echo &quot;$emailtext&quot; &gt; msg.tmp
 
-# si no pudimos sacar el pantallazo o la foto, limpiamos las variables
+# lets clean the vars in case we couldn't get the images
 if [ ! -e &quot;$picture&quot; ]; then
 	picture=''
 fi
@@ -284,146 +94,36 @@ fi
 if [ ! -e &quot;$screenshot&quot; ]; then
 	screenshot=''
 # else
-	# Comprimimos el pantallazo? (A veces es medio pesado)
-	# echo &quot; -- Comprimiento pantallazo...&quot;
-	# tar zcf $screenshot.tar.gz $screenshot
-	# screenshot=$screenshot.tar.gz
+	# should we compress the screenshot? (faster email sending)
+	# compress_screenshot
 fi
 
-emailstatus=`./sendEmail -f &quot;$from&quot; -t &quot;$emailtarget&quot; -u &quot;$complete_subject&quot; -s $smtp_server -a $picture $screenshot -o message-file=msg.tmp tls=auto username=$smtp_username password=$smtp_password`
+send_email
 
-if [[ &quot;$emailstatus&quot; =~ &quot;ERROR&quot; ]]; then
-	echo &quot;$STRING_ERROR_EMAIL&quot;
-fi
-
-####################################################################
-# Borramos la evidencia
-####################################################################
 echo &quot;$STRING_REMOVE_EVIDENCE&quot;
-
-if [ -e &quot;$picture&quot; ]; then
-	rm $picture
-fi
-if [ -e &quot;$screenshot&quot; ]; then
-	rm $screenshot
-fi
-rm msg.tmp
+remove_evidence
 
 ####################################################################
-# change desktop wallpaper with a BIG image to alert nearby people (great idea @warorface!)
+# post email stuff, wallpaper and message alerts
 ####################################################################
 
 if [ $alertwallpaper == 'y' ]; then
-
 	echo &quot;$STRING_CHANGE_WALLPAPER&quot;
 	# we need the full path to the files (and we'll asume the script is being run from prey's folder)
 	wallpaper=`pwd`/$wallpaper
-
-	if [ $platform == 'Linux' ]; then
-
-		gconftool=`which gconftool-2`
-		kdesktop=`which kdesktop`
-		xfce=`which xfconf-query`
-
-		if [ -n &quot;$gconftool&quot; ]; then
-
-			$gconftool --type string --set /desktop/gnome/background/picture_filename $wallpaper
-			$gconftool --type string --set /desktop/gnome/background/picture_options 'zoom'
-
-		elif [ -n &quot;$kdesktop&quot; ]; then # untested
-
-			$kdesktop KBackgroundIface setWallpaper $wallpaper 5
-
-		elif [ -n &quot;$xfce&quot; ]; then # requires xfce 4.6
-
-			$xfce -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s $wallpaper
-
-		fi
-
-	else # really untested
-
-		# this code belongs to Katy Richard
-		# http://thingsthatwork.net/index.php/2008/02/07/fun-with-os-x-defaults-and-launchd/
-
-		defaults write com.apple.Desktop Background &quot;{default = {ChangePath = '~/Pictures'; ChooseFolderPath = '~/Pictures'; CollectionString = Wallpapers; ImageFileAlias = &lt;00000000 00e00003 00000000 c2cc314a 0000482b 00000000 00089e0c 001be568 0000c2fe 8ab30000 00000920 fffe0000 00000000 0000ffff ffff0001 00100008 9e0c0007 4cea0007 4cb40013 52b2000e 00260012 00740068 00650065 006d0070 00690072 0065005f 00310036 00380030 002e006a 00700067 000f001a 000c004d 00610063 0069006e 0074006f 00730068 00200048 00440012 00355573 6572732f 6b726963 68617264 2f506963 74757265 732f5761 6c6c7061 70657273 2f746865 656d7069 72655f31 3638302e 6a706700 00130001 2f000015 0002000f ffff0000 &gt;; ImageFilePath = $wallpaper; Placement = Crop; TimerPopUpTag = 6; };}&quot;
-
-		# we need to restart the dock to make the new wallpaper visible
-		killall Dock
-
-	fi
-
+	change_wallpaper
 fi
 
-####################################################################
-# le avisamos al ladron que esta cagado?
-# TODO: esto solo funciona con GNOME y KDE
-####################################################################
-
 if [ $alertuser == 'y' ]; then
-
 	echo &quot;$STRING_SHOW_ALERT&quot;
-
-	if [ $platform == 'Linux' ]; then
-
-		# veamos si tenemos zenity o kdialog
-		zenity=`which zenity`
-		kdialog=`which kdialog`
-
-		if [ -n &quot;$zenity&quot; ]; then
-
-			# lo agarramos pal weveo ?
-			# zenity --question --text &quot;Este computador es tuyo?&quot;
-			# if [ $? = 0 ]; then
-				# TODO: inventar buena talla
-			# fi
-
-			 # mensaje de informacion
-			# zenity --info --text &quot;Obtuvimos la informacion&quot;
-
-			 # mejor, mensaje de error!
-			$zenity --error --text &quot;$alertmsg&quot;
-
-		elif [ -n &quot;$kdialog&quot; ]; then #untested!
-
-			$kdialog --error &quot;$alertmsg&quot;
-
-		fi
-
-	else # Mac alert msg code by Matias Halles (http://halles.cl)
-
-		alertvoice='Zarvox'
-		# can be Agnes, Kathy, Princess, Vicki, Victoria, Bruce, Fred, Junior, Ralph, Albert, Bad News, Bahh, Bells, Boing, Bubbles, Cellos , Deranged, Good News, Hysterical, Pipe Organ, Trinoids, Whisper, Zarvox
-
-		osascript -e &quot;say \&quot;$alertmsg\&quot; using \&quot;$alertvoice\&quot;&quot; &amp;
-
-# this must go in column 0
-osascript&lt;&lt;END
-	tell application &quot;Finder&quot;
-		activate #Le da el foco al Finder
-		set dd to display dialog &quot;\n$alertmsg\n&quot; buttons {&quot;OK, tengo miedo.&quot;} default button 1 with icon caution #Despliega el di&#225;logo.
-	end tell
-END
-
-	fi
-
+	alert_user
 fi
 
-####################################################################
-# Reiniciamos de Servidor X
-####################################################################
+# should we drop him out of his X session?
 if [ $killx == &quot;y&quot; ]; then
-
 	echo &quot;$STRING_XKILL&quot;
-
-	if [ $platform == 'Linux' ]; then
-		pkill &quot;gdm|kdm|xdm|entrance&quot;
-	else
-		echo &quot;$STRING_MACKILL&quot;
-	fi
-
+	kill_x
 fi
 
-####################################################################
 # this is the end, my only friend
-####################################################################
 echo -e &quot;$STRING_DONE&quot;</diff>
      <filename>prey.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>39ea78a1385276e845a85193aa747a4518c374bd</id>
    </parent>
  </parents>
  <author>
    <name>Tomas Pollak</name>
    <email>tomas@bootic.net</email>
  </author>
  <url>http://github.com/tomas/prey/commit/3d2362f97d642d3857e5c16d30c466f2000705ac</url>
  <id>3d2362f97d642d3857e5c16d30c466f2000705ac</id>
  <committed-date>2009-05-05T23:37:33-07:00</committed-date>
  <authored-date>2009-05-05T23:37:33-07:00</authored-date>
  <message>Separated Mac &amp; Linux functions. Fixed Mac wifi_info bug. Cleaned code a bit. Added Mac message code from Matias. Added Changelog</message>
  <tree>a0d67891ee2b6ddcd5df10c6f76525e2f9b03eff</tree>
  <committer>
    <name>Tomas Pollak</name>
    <email>tomas@bootic.net</email>
  </committer>
</commit>
