Ymusk

Frequently Asked Questions

Q: Does ymusk runs on Windows?

A: Sure it does. Ymusk runs on anything that runs Perl. But you will have to install Perl and two modules. Which is not hard, really. And while installing Perl is kind of above and beyond the scope of this document, here is some quick and dirty guideline on how to install all those things. Bear in mind I don't have any Windows system near by and am running by memory. Caveat emptor and all that.

  1. First, get the Perl distribution from ActiveState.
  2. Follow the directives on the web page. Download the distribution file and install it. The distribution comes with an installer, so this should be a no brainer.
  3. Supposing that you installed Perl in C:\perl, open the directory C:\perl\bin and clicks on the module manager ppm.bat.
  4. In the window that will open, type install Tk (this will fetch the Tk module from the ActiveState web site and install it on your computer. It may take a little while), then install Net::Telnet (same comment).
  5. Now you can unzip ymusk in a directory (C:\program file\ymusk , for example). Rename the file ymusk to ymusk.pl, and click on it. Ymusk should open. If it does, rejoice!

Q: Can I run multiple sessions on ymusk?

A: Nope. Ymusk's paradigm is one ymusk = one session. However, nothing stops you of opening many ymusks and multitask at your heart content. And no, I don't plan on plan to add a multi-session feature anytiem soon, as it's not something I would use. But if someone would propose a patch, I would gladly accept it. ;)

Q: When using the multitabs scrolling does not work. It seems to default to making me manually move the scrollbar down. If I switch back to having one tab it works fine.

A: It's not a bug, it's a feature. The rationale being this is that I don't want to have hidden tabs scrolling because I could then easily oversee stuff. The active tab still scroll, though.

Q: I play on a mush that uses []s to signify channel chatter rather than <>s. Is there a line somewhere in I could change so it sends output with the []s to the channel tab when I do the multi-windows?

A: You can quite painlessly (well, relatively) have Ymusk recognize bracket-delimited channels by adding this little tidit to your Custom.pm[*]:

$hooks{ qr/^\[/ } = \&Hooks::channel;
sub Hooks::channel
{
        my $line = shift;
        $line =~ /^(\[[^\]]*\])/;
        return ( [ 0, length $1,         'channel-header' ],
                 [ 0, -1 + length $line, 'channel'        ]);
}
1;

This little bit of magic override the pattern that is used to recognize channel output.

[*] Custom.pm must be put in the directory ~/ymusk on unix-like systems, or c:\where\ymusk\is\configuration on Windows. Or you can put it anywhere and call ymusk as 'ymusk -ymuskdir=/path/to/the/config/dir'.

Q: Is it possible to get ymusk to display the time at each line? For example:
{14:42:32}Foobar says, "Hello."

A: Sure. You just have to replace the function w_output in ymusk (yes, my function naming scheme sucks big time) by this version:

sub w_output
{
	my $line = shift;

	my @tags;

	( $line, @tags ) = parse_ansi_line( $line );


	# Hooks.pm stuff
	push @tags, check_hooks( $line );

	# added for Staked, add the time before all lines
	my $time = '{' . join( ':', ( localtime )[2,1,0] ) . '} ';
	$line = $time.$line;
	for( @tags )
	{
		$_->[0] += length $time;
		$_->[1] += length $time;
	}

	# always write to the raw output and $output
	write_to_output_window( $output{raw}, $line, @tags );
	write_to_output_window( $output, $line, @tags );

 	# should we echo to another window?
	my $ic = 1;  # true by default
   foreach my $o ( keys %output )
   {
       if( grep $_->[2] eq $o, @tags )
       {
           write_to_output_window( $output{$o}, $line, @tags );
           $output_nb->pageconfigure( $o, -label => "$o (!)" ) 
		   		unless $output_nb->raised() eq $o;
           $ic = 0;
       }
   }
   if( $ic )
   {
       write_to_output_window( $output{ic}, $line, @tags );
       $output_nb->pageconfigure( 'ic', -label => "ic (!)" );
   }
 }

[ ymusk main page ]