Allows one user to use a text command to update their twitter from mIRC.
Original script by hixxy: http://forum.swiftirc.net/viewtopic.php?f=34&t=21826&hilit=twitter
I've taken the aliases; Turned them into text triggers.
Since It shows up as "from API" on Twitter, I added [mIRC Tweet] (just to brag everytime I update :P )to the beginning of your status. Can be easily removed.
Syntax-
Replace username with your username; password is replaced with password; your name replaced by your nick on the IRC.
As hixxy explained, you may want to encode your password.
use //echo -a $encode(,m)
Then replace the password string with:
alias -l password return $decode(,m)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;Twitter Update/Direct Reply Script;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;Edit of Original Script by Hixxy;;;;;;;;;;;;;;;;;;;;
;;;http://forum.swiftirc.net/viewtopic.php?f=34&t=21826&hilit=twitter;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias -l username return *username*
alias -l password return *password*
alias -l raiseerror {
echo -a * /twitter: $1-
halt
}
alias -l urlencode return $regsubex($1-,/([^a-z0-9])/ig,% $+ $base($asc(\t),10,16,2))
on *:TEXT:-Status *:#: {
if ($nick == *your name*) {
hfree -w twitter
sockclose twitter
sockopen twitter twitter.com 80
sockmark twitter status= $+ $urlencode([mIRC Tweet] $2-)
msg $chan 00,01[04,01New Status00,01] $2-
}
else { halt }
}
else
on *:TEXT:-DR *:#: {
if ($nick == *your name*) {
hfree -w twitter
sockclose twitter
sockopen twitter twitter.com 80
sockmark twitter status= $+ $urlencode(@ $+ $2 $3-)
msg $chan 00,01[04,01Direct Reply @ $+ $2 Sent00,01]: $3-
}
else { halt }
}
on *:sockopen:twitter:{
if ($sockerr) {
sockclose twitter
raiseerror socket error. Try again later.
}
var %s = sockwrite -n twitter
%s POST /statuses/update.xml HTTP/1.1
%s Host: twitter.com
%s Authorization: Basic $encode($+($username,:,$password),m)
%s Accept: */*, *.*
%s Connection: close
%s User-Agent: mIRC/ $+ $version
%s Content-Type: application/x-www-form-urlencoded
%s Content-Length: $len($sock(twitter).mark)
%s
%s $sock(twitter).mark
}
on *:sockread:twitter:{
var %data
sockread %data
if ($regex(%data,/(.+?)/)) {
hfree -w twitter
sockclose twitter
raiseerror $regml(1)
}
if ($regex(%data,/<(.+?)>(.+?)/)) hadd -m twitter $regml(1) $regml(2)
elseif (%data == ) .signal twitterpost
}
http://forum.swiftirc.net/viewtopic.php?f=34&t=21826&hilit=twitter
@SoxFarxAway777 this is a direct RIP of hixxy's script ;/
Why would you Post someone else's work like this?