For those coming from the Windows OS which are probably used to mIRC, here is a short Perl script for XChat which will do the same thing as /HOP in mIRC, and that is, it will part and rejoin a channel immediately.
By default, XChat provides the /HOP command, which is used to give chanhalf-op to the provided nickname. We will not replace this command as it still may be useful on some networks, instead we will use a new command, say /PJ (or any other you like).
The script
Here's how the script looks like:
Basically, the first command will tell XChat the information about the script (name, version number, description). The second one will declare the command /PJ and the subroutine to use when it's triggered, cmd_pj. The body under sub cmd_pj contains what the command will actually do, and that's to get the name of the current channel, part it and rejoin.
Save the script under any name, say pj.pl, and put it under your ~/.xchat2/ directory, where ~ is your home directory. The script will be automatically loaded each time XChat starts.Source URL: http://ashesgarrett.blogspot.com/2009/01/tip-of-day-make-perl-script-for-xchat_12.html
Visit ashes garrett for Daily Updated Hairstyles Collection
By default, XChat provides the /HOP command, which is used to give chanhalf-op to the provided nickname. We will not replace this command as it still may be useful on some networks, instead we will use a new command, say /PJ (or any other you like).
The script
Here's how the script looks like:
What does it do?
Xchat::register ("PJ", "0.1.0", "Part/Join");
Xchat::hook_command ("PJ", cmd_pj);
Xchat::command ("ECHO PART/JOIN script loaded. Use it typing /PJ.");
sub cmd_pj
{
$chan = Xchat::get_info ("channel");
Xchat::command ("PART $chan");
Xchat::command ("JOIN $chan");
return Xchat::EAT_ALL;
}
Basically, the first command will tell XChat the information about the script (name, version number, description). The second one will declare the command /PJ and the subroutine to use when it's triggered, cmd_pj. The body under sub cmd_pj contains what the command will actually do, and that's to get the name of the current channel, part it and rejoin.
Save the script under any name, say pj.pl, and put it under your ~/.xchat2/ directory, where ~ is your home directory. The script will be automatically loaded each time XChat starts.Source URL: http://ashesgarrett.blogspot.com/2009/01/tip-of-day-make-perl-script-for-xchat_12.html
Visit ashes garrett for Daily Updated Hairstyles Collection