Code: Select all
;Installation of OpenSSL is required to use Prowl api --->> http://www.mirc.com/download/openssl-0.9.8k-setup.exe
;Install OpenSSL and then restart mIRC before using this script.
;Prowl API Script by Ford_Lawnmower irc.mindforge.org #USA-Chat
;Alias Syntax /Prowl apikey priority event-must-be-one-string text to send.
alias Prowl {
if ($2 !isnum -2-2) || (!$4) { echo -st Syntax is /Prowl apikey priority event-must-be-one-string text to send. -- Priority must be a number between -2 and 2. | return }
sockopen -e prowl prowl.weks.net 443
sockmark prowl $1 $2 $+(mIRC,$version) $fixurl($3) $fixurl($4-)
}
On *:sockopen:prowl:{
tokenize 32 $sock($sockname).mark
sockwrite -nt $sockname GET $+(/publicapi/add?apikey=,$1,&priority=,$2,&application=,$3,&event=,$4,&description=,$5-)
sockwrite -n $sockname Host: prowl.weks.net $+ $+($crlf,2)
}
On *:sockread:prowl:{
if (!$sockerr) {
var %prowl | sockread %prowl
if (<success code isin %prowl) { echo -at 07Message sent Successfully! | sockclose $sockname }
if (<error code isin %prowl) { echo -at 04An error occurred. Your message was not sent! | sockclose $sockname }
}
}
alias -l fixurl return $regsubex($1-,/([^a-z0-9])/ig,% $+ $base($asc(\t),10,16,2))
Here is a small example script that will send a message through Prowl everytime someone says your current irc nickname.
Code: Select all
menu status,channel {
Prowl Highlight
.Set api key: set %prowlapikey $$?"Enter Your Prowl API Key"
.$iif(!%prowlapikey,$style(2)) Prowl Highlight On:.enable #prowl
.$iif($group(#prowl) == off,$style(2)) Prowl Hightlight Off:.disable #prowl
}
#prowl off
On *:text:*:*:{
if ($istok($strip($1-),$me,32)) && (%Prowlapikey) {
if ($timer($+(prowl,$nick,$network))) { return }
.timer $+ $+(prowl,$nick,$network) 1 5 noop
Prowl %prowlapikey 1 Highlight $nick said: $1-
}
}
#prowl end
**note** If you missed this in the code notes, Installation of openssl is required to run this script. You can get it here if you don't already have it --->>> http://www.mirc.com/download/openssl-0.9.8k-setup.exe
After installing openssl you will have to restart mIRC for it to take effect.
I hope this helps someone
