Language Selection

English French German Italian Portuguese Spanish

A Collection of Tips and Tricks for XChat, Part 1

XChat is a GTK client for IRC, available on both Linux and Windows. It is one of the most popular and feature-rich IRC clients on the Linux platform, together with Konversation and KVirc. Of course, there are very good clients like Irssi too, but I'm talking only about graphical clients here.

Although by default XChat doesn't offer all the user-friendly options in its configuration dialogue, its true power stands in the possibility to configure it using /SET variables and Perl/Python scripts or even C plugins. You can practically make XChat behave in any way you want: from a powerful, personalised IRC client for daily use to an IRC help or trivia bot.

In my two recent articles I showed how to make simple Perl scripts for XChat which will change its default behaviour:

Make a Perl Script to Display Notices in Current Window
Make a Perl Script to PART/REJOIN a Channel Similar with mIRC's /HOP

In this article however I will list some of the tips and tricks I consider most popular and useful for the IRC user, leaving all that scripting behind.

Hide JOIN/PART messages using the conference mode
The conference mode can be turned on/off using the irc_conf_mode variable (which by default is 0 - disabled). By turning it on, the join/part and quit messages will not be displayed anymore, so you will be able to keep a log from an IRC meeting/tutorial/discussion without those annoying messages. Use it like this:

/SET irc_conf_mode 1

If you still want to see the messages on other channels, right-click on the channel button, go to Settings -> Hide Join/Part Messages. Tick (or un-tick, depending if you want to see them) this option.

Hide the backlog
Introduced in XChat 2.8.4, this feature will automatically display the last lines from a channel/private log when you open it again. If you want to turn this feature off use:

/SET text_replay 0

This will turn off the backlog.

Show the /WHOIS info in the current window
The /WHOIS information is shown in the status window by default. However if you are on a channel and you /WHOIS someone, you will probably want the information to be displayed in the same window, instead of having to switch on the status window to see it and then back on the channel. To do so, use:

/SET irc_whois_front 1

Change the way events are shown
You can do this using scripts, which provides a more flexible way of doing it, but I'll show here only how to use the Settings -> Advanced -> Text Events... dialogue.

For example, the Quit action looks like this by default:

%C23*%O$t%C23$1 has quit (%O%C23%B%B$2%O%C23)

However, you may also want to see the person's host, add the third parameter ($3 - host), as specified in the Number and Description fields:

%C23*%O$t%C23$1 ($3) has quit (%O%C23%B%B$2%O%C23)

See the screenshot below:

Change the location and format of logs
The default format for logs is %n-%c.log, which will log as network-channel/nick.log (e.g. FreeNode-#debian.log). The logs are kept by default in the ~/.xchat2/logs/ directory. However, you may change this and customise it to your likings:

~/logs_xchat/%n/%Y_%m_%d_%c.log

This will log all in the logs_xchat directory inside your home directory, creating a new folder for each network, and using several conversion specifiers for the filename. In the above example, I used:

%Y for full year digits (e.g. 2009)
%m for the number of the month (e.g. 01-12)
%d for the day number (e.g. 01-31)
%c for the channel/nickname

You can find all the conversion specifiers here.

Use shortcuts for last and previous commands
By default, the up and down arrows are used for these two actions. However I always prefered ^P (CTRL+P) for last command and ^N (CTRL+N) for next command. You can add these two in the Settings -> Advanced -> Keyboard Shortcuts... menu. The screenshot below shows how the ^P command should look like, after clicking Add New and filling the necessary fields. Don't forget to press Enter in the Data 1 field, otherwise the new shortcut will be lost after closing the window (I know, extremely annoying but that's the way XChat implements it).

That's it for today. In the next part I'll also include several simple scripts and more /SET tips. Also, I recommend to see this page (offsite), it has some great XChat resources, and eventually the XChat scripts and plugins page.

More in Tux Machines

today's howtos

Security Leftovers

  • Java and Python FTP attacks can punch holes through firewalls
    The Java and Python runtimes fail to properly validate FTP URLs, which can potentially allow attackers to punch holes through firewalls to access local networks. On Saturday, security researcher Alexander Klink disclosed an interesting attack where exploiting an XXE (XML External Entity) vulnerability in a Java application can be used to send emails.
  • Microsoft: no plans to patch known bugs before March [Ed: Microsoft is keeping open 'back doors' that are publicly known about, not just secret ones]
    Microsoft has no plans to issue updates for two vulnerabilities, one a zero-day and the other being one publicised by Google, before the scheduled date for its next round of updates rolls around in March. The company did not issue any updates in February, even though it had been scheduled to switch to a new system from this month onwards. It gave no reason for this, apart from saying: "This month, we discovered a last minute issue that could impact some customers and was not resolved in time for our planned updates today. "After considering all options, we made the decision to delay this month’s updates. We apologise for any inconvenience caused by this change to the existing plan." The Google-disclosed bug was made public last week, and is said to be a flaw in the Windows graphic device interface library that can be exploited both locally and remotely to read the contents of a user's memory.
  • Microsoft issues critical security patches, but leaves zero-day flaws at risk
    Microsoft has patched "critical" security vulnerabilities in its browsers, but has left at least two zero-day flaws with public exploit code. The software giant released numerous patches late on Tuesday to fix flaws in Adobe Flash for customers using Internet Explorer on Windows 8.1 and later, as well as Edge for Windows 10.

Red Hat News

  • Why upstream contributions matter when developing open source NFV solutions.
    When software is developed using open source methods, an upstream repository of the code is accessible to all members of the project. Members contribute to the code, test it, write documentation and can create a solution from that code to use or distribute under license. If an organization follows the main stream or branch of the upstream code their solution will receive all the changes and updates created in the upstream repository. Those changes simply “flow down” to the member’s solution. However, if a member organization forks the code — if they create a solution that strays from the main stream — their solution no longer receives updates, fixes and changes from the upstream repository. This organization is now solely responsible for maintaining their solution without the benefit of the upstream community, much like the baby salmon that took a tributary and then have to fend for themselves rather than remain in the main stream and receive the benefit and guidance of the other salmon making their way to the ocean.
  • HPE and Red Hat Join Forces to Give Customers Greater Choice for NFV Deployments
    Hewlett Packard Enterprise ( NYSE : HPE ) and Red Hat, Inc. ( NYSE : RHT ) announced today they are working together to accelerate the deployment of network functions virtualization (NFV) solutions based on fully open, production-ready, standards-based infrastructures. HPE plans to offer ready-to-use, pre-integrated HPE NFV System solutions and HPE Validated Configurations incorporating Red Hat OpenStack Platform and Red Hat Ceph Storage for communications service providers (CSPs).
  • Red Hat Joins the OpenPower Foundation
    As part of our commitment to delivering open technologies across many computing architectures, Red Hat has joined the OpenPOWER Foundation, an open development community based on the POWER microprocessor architecture, at the Platinum level. While we already do build and support open technologies for the POWER architecture, the OpenPOWER Foundation is committed to an open, community-driven technology-creation process – something that we feel is critical to the continued growth of open collaboration around POWER.
  • Buy, Sell or Hold? Analysts Approach: HCA Holdings, Inc. (HCA), Red Hat, Inc. (RHT)?

Linux and FOSS Events