Top

Update Twitter


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  6.0 (of 1 scores)
Date Added  Aug 27, 2009
Last Updated  Sep 02, 2009
Tags  direct  twitter  update 

Introduction

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(<your password>,m)
Then replace the password string with:
alias -l password return $decode(<string you just copied>,m)


Grab the Code

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;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 
}

Comments

  (9)  RSS
uneek
Comments: 26
 
mIRC Snippet:  Update Twitter
Posted on Aug 28, 2009 12:52 am
Maybe add a direct message functionality like Fordlawnmower has. Very short and clean though!
SoxFarxAway777
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Aug 28, 2009 12:54 am
It does have direct messaging. Type -DR @name <message>
GrimReaper
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Sep 1, 2009 2:35 pm
I can't get it to work.. i keep getting the error "* /twitter: <" D:
SoxFarxAway777
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Sep 1, 2009 2:54 pm
Is anyone else getting this error? It works perfectly for me...
Shinybot
Comments: 20
 
mIRC Snippet:  Update Twitter
Posted on Sep 2, 2009 2:42 pm
I got a Error to Can you find the problem ?
FordLawnmower
Comments: 412
 
mIRC Snippet:  Update Twitter
Posted on Sep 2, 2009 3:00 pm
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?
SoxFarxAway777
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Sep 2, 2009 4:34 pm
It's not, actually. My script is based off that one, but I created triggers, as opposed to aliases.

I actually posted the status trigger on that subject; my username on the forum is xSlayer.
GrimReaper
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Sep 2, 2009 5:20 pm
it still doesn't work even tho you may have updated things. oh well.. good script anyways. :>
SoxFarxAway777
Comments: 10
 
mIRC Snippet:  Update Twitter
Posted on Sep 2, 2009 6:08 pm
That's weird. I just tested the updates myself. =/

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom