23
Twittear desde un cliente mIRC
He visto que Twitter se utiliza en todos los rubros de la tecnologÃa ultimamente, y pues un script para el famoso cliente mIRC no podÃa faltar, el código es creado por Dave Amenta, consistente en un socket muy limpio para lanzar mensajes desde cualquier cliente mIRC a nuestra cuenta en Twitter.
El código debe ser instalado en nuestro directorio mIRC y cargado en nuestro cliente mIRC. Para instalarlo seguimos los siguientes pasos:
- Presionamos las teclas ALT + R
- Seleccionamos File → Load → Escojemos el Archivo
- Aplicamos OK
El código :
alias tweet {
; use /tweet
set %tw.username twitter_username_here
set %tw.password twitter_password_here
; exit if the message is too long for twitter to take.
if ($len($1-) > 140) {
echo -a Sorry, that was $calc($len($1-)-140) characters too long!
halt
}
; connect to twitter on HTTP port 80
set %authentication $encode($+(%tw.username,:,%tw.password),m)
sockclose twitter
sockopen twitter twitter.com 80
; set a 2-second timeout in case there is a problem
; this could be changed to 5 or 10
.timertwitter 1 2 twitter_timeout
set %tweet $$1-
; store the text
}
; encoding is important for sending data to a web server
; the decode function is not used, but is here for the sake of
; completeness
alias urlencode return $regsubex($1-,/\G(.)/g,$iif(($prop && \1 !isalnum) || !$prop,$chr(37) $+ $base($asc(\1),10,16),\1))
alias urldecode return $replace($regsubex($1-,/%(\w\w)/g,$chr($iif($base(\t,16,10) != 32,$v1,1))),$chr(1),$chr(32))
; when the socket accepts our connection
on *:sockopen:twitter:{
sockwrite -n twitter POST /statuses/update.json HTTP/1.1
sockwrite -n twitter Host: twitter.com
sockwrite -n twitter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
sockwrite -n twitter Content-Length: $calc($len($urlencode(%tweet)) + 9)
sockwrite -n twitter Authorization: Basic %authentication
sockwrite -n twitter $crlf
sockwrite twitter status=
sockwrite -n twitter $urlencode(%tweet)
sockwrite twitter $crlf
sockwrite twitter $crlf
; send the postdata
}
; the data wasn't returned, kill the socket
; and tell the user.
alias twitter_timeout {
echo -a Message Failed to Send - Socket Timeout
sockclose twitter
}
; we have data back
on *:sockread:twitter: {
.timertwitter off
sockread -f %string
echo -a Message Returned ( $+ %string $+ )
sockclose twitter
}
Debemos setear: twitter_username_here → username | twitter_password_here → clave
Para utilizarlo solo tecleamos en nuestro mIRC: /tweet mensaje
Articulos Relacionados
Autor del Articulo | Power
Nombre del Articulo | Twittear desde un cliente mIRC
Categorias del articulo | irc, scripts
Etiquetas Usadas en el articulo | addon | mirc | script | twitter
Enlace para TrackBacks | trackback
Articulo Anterior | Nuevo Aspecto para Gmail con Stylish
Articulo Siguiente | Wordpress Plugins - Integrar Fotolog en Wordpress
Quieres un avatar?
Los avatares de este Blog y de muchos otros, son gracias al sistema de Gravatar, para que aparezca tu imagen, registrate en gravatar.com
2 Comentarios para “Twittear desde un cliente mIRC”
-
OdECk dijo:
July 23rd, 2008 a las 1:24muy buen addon carnal…
-
Twitter desde un cliente mIRC | IRC México dijo:
July 23rd, 2008 a las 1:42[...] Power nos presenta un codigo scripting para poder mandar mensajes desde el mIRC hacia twitter.com se me hace un muy buen aporte para los adictos al mIRC y Twiiter power.org.mx - Twittear desde un cliente mIRC [...]

































