Difference between revisions of "MERVBot script"

From ASSS Wiki
Jump to: navigation, search
(a script for running mervbot in linux. taken from mgb forums.)
 
 
Line 1: Line 1:
 +
Below is a Perl script for running [[MERVBot]] under [[Wine]] on Linux.
 +
 
<pre>
 
<pre>
 
#!/usr/bin/perl -w
 
#!/usr/bin/perl -w
Line 24: Line 26:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
[[Category: Bots]]

Latest revision as of 17:37, 29 September 2007

Below is a Perl script for running MERVBot under Wine on Linux.

#!/usr/bin/perl -w
#Zim: http://forums.minegoboom.com/viewtopic.php?p=34608#34608

use strict;
use warnings;

my $pid;

if ($pid = fork)
{
  #parent
}
else
{
die "CANNOT FORK!!\n" unless defined $pid;
open(STDIN, "/dev/tty1");  # get it a real tty for input
open(STDOUT, "/dev/null"); # suppress output
open(STDERR, "/dev/null"); # suppress output
{
  system("wineconsole /home/MERVBot/MERVBot.exe");
};
exit(1);
}