Browse Source

*** empty log message ***

master
milkbone57 22 years ago
parent
commit
55642de994
  1. 3
      mosh.conf
  2. 34
      mosh.pl
  3. 34
      plugins/Mosh.pl

3
mosh.conf

@ -0,0 +1,3 @@
Plugins Mosh, Counterstrike, Net-OSCAR
Port 5190
HeavyLogging 0

34
mosh.pl

@ -0,0 +1,34 @@
#!/usr/bin/perl
# simplified milkbone shell
use 5.006; # milkbone might work on 5.004 or lower; someone should find out...
use warnings;
use strict;
use lib 'lib';
use lib '.';
use Milkbone;
$| = 1;
sub main
{
Milkbone->init();
hook("load_options", -file => 'mosh.conf');
hook("load_plugins");
hook("pre_mainloop");
hook("create_logon_prompt");
MOSLoop;
hook("post_mainloop");
}
# off it goes...
main();

34
plugins/Mosh.pl

@ -0,0 +1,34 @@
package Mosh;
use Milkbone;
register_hook("signed_in", sub {
register_hook("tick", sub {
print "% ";
my $input = <STDIN>;
eval "use Milkbone::AllHooks; use base 'Milkbone::AllHooks'; $input" or print $@;
});
});
register_hook("create_logon_prompt", sub {
my ($user, $pass);
print "Username: ";
$user = <STDIN>;
chomp $user;
print "Password: ";
system('stty -echo');
$pass = <STDIN>;
system('stty echo');
chomp $pass;
hook("protocol_signon", -user => $user, -pass => $pass);
});
register_hook('reload_mosh', sub { reload_plugin('Mosh'); });
register_hook('msg_in', sub {
print $ARGS{-msg};
});
Loading…
Cancel
Save