Archive

Archive for the ‘xchat’ Category

Xchat replace.conf

March 30th, 2008 No comments

Pidgin has a cool plugin named “Text Replacement”. It has a built in big mapping between wrong spellings and correct spellings. So recently in #xchat IRC channel, someone asked for auto replace plugin. XChat has plugin for auto replacement, but it doesn’t have a map. You have to make the map yourself. XChat doesn’t allow cool options that pidgin gives (like case sensitive/insensitive or exact match or partial), so the mapping I am providing is case sensitive and exact match. I converted that Pidgin map (which is usually stored in “~/.purple/dict”) into XChat format (stored in “~/.xchat2/replace.conf”) . So, you can download the replace.conf file from the below given link, and can replace your current replace.conf with this file.

After restarting XChat, you should be able to see the plugin working properly.

here is the link to the file.

http://rohitj.net/myscripts/xchat_replace_conf/replace.conf

The Perl (yes, I still love Perl when it comes to regex) script I used to convert the format is here

http://rohitj.net/myscripts/xchat_replace_conf/replace.perl

You will need to put the script in the folder where “dict” file is.

License : The dictionary copyright mainly belongs to Eric Warmenhoven (piding.im).

Categories: xchat Tags:

My first XChat plugin :)

March 28th, 2008 2 comments

Recently I started using IRC a lot. As I was doing some django, PyQT and KDE/C++ development. Yes, its lot of development. And then whenever I want to ask some question on IRC, I have to use pastebin/dpaste. ( dpaste is developed upon django framework. :) ). Now, to dpaste any code, I have to switch to Firefox, I have to use mouse as well. I have to copy paste the link to xchat. This was tedious task for me. So, I started making a plugin for xchat so that I could easily paste my code. Fortunately XChat has python plugin interface.

This plugin runs with the command:

/dpaste language

If you keep <language> empty, it will assume it to be “Plain”. You can use any language supported by dpaste.com. The command will open a gtk window, in which you can paste your code. And then “dpaste” button will copy paste the link (containing your code) on your xchat input box. :) . As of now I am sure, it works fine in IITK proxy system. I am pretty much sure it will work fine if you are behind no proxy.

Before using the proxy, you will need to change few parameters in the script, namely “proxy_username”, “proxy_password”, “proxy_server”, “proxy_port”. If you are not behind proxy, just keep “proxy_server” empty.

Also, you should install python module “ClientForm”, “pygtk”, and “urllib2″.

aptitude install python-clientform python python-gtk2

To load the script, a simple way is /load <path to plugin file> . Or you can copy the script in ~/.xchat2 folder. That way the script will be loaded whenever you open xchat.

You can download the code from here. As of now I haven’t made docs, but its an easy plugin, and some commenting as well. :)

Updates : Download the plugin version 0.6, and you don’t need to change anything in it. The plugin uses xchat proxy settings by itself. :)   As of now, http proxy and no proxy is supported.
http://rohitj.net/myscripts/xchat_plugin_dpaste

Categories: dpaste, FOSS, Fun, GTK, Python, xchat Tags: