User Tools

This is an old revision of the document!


xchat perl

Here is a simple Perl script to change your nickname when going away or back.

Installation

create a file named like “myscript.pl” in your ~/.xchat2 folder and paste the code inside

Usage

/iway or /iback

Script

#!/usr/bin/perl

### Xchat registers and hooks.
Xchat::register("Ssm's away script", "1.0", "Ssm's away script", "");
Xchat::hook_command("iaway", "setaway");
Xchat::hook_command("iback", "setback");

use warnings;
use strict;

### Main routine.


sub setaway {
  Xchat::set_context("#mychannel", "[Banned-URL]");
  Xchat::command("NICK ssm2017[Away]");
  Xchat::command("AWAY Zzzz...");
}

sub setback {
  Xchat::set_context("#mychannel", "[Banned-URL]");
  Xchat::command("NICK ssm2017");
  Xchat::command("BACK");
}

Sources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information