-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.muze.nl/svn/multigate_commands/trunk@9 07fb6d0f-9701-0410-8146-bd1aaf089aca
- Loading branch information
Wieger Opmeer
committed
Oct 15, 2005
1 parent
bd0915a
commit 1c8f47e
Showing
832 changed files
with
58,799 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/perl -w | ||
|
||
use lib '../../lib'; | ||
|
||
#User management from multigate | ||
use Multigate::Users; | ||
use Multigate::Util; | ||
|
||
## Import available environment variables | ||
|
||
my $address = $ENV{'MULTI_USER'}; # address of invoking user | ||
my $user = $ENV{'MULTI_REALUSER'}; # multigate username of invoking user | ||
my $protocol = $ENV{'MULTI_FROM'}; # protocol this command was invoked from | ||
|
||
$address = stripnick($address); #make sure we do not have irc-channels in database | ||
|
||
Multigate::Users::init_users_module(); | ||
|
||
my $result = set_preferred_protocol( $user, $protocol ); | ||
my $result2 = set_main_address( $user, $protocol, $address ); | ||
|
||
print "Setting followme to ($protocol, $address) for $user.\n"; | ||
|
||
Multigate::Users::cleanup_users_module(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
level = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
aankoppel: sets preferred protocol to from_protocol, and main_address to from-address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/usr/bin/perl -w | ||
# Casper Joost Eyckelhof (Titanhead) | ||
# [email protected] | ||
|
||
use LWP::UserAgent; | ||
use HTTP::Cookies; | ||
use strict; | ||
|
||
#### allerlei fijne definities en initialisaties ######## | ||
my $ua = new LWP::UserAgent; | ||
my @agents = ( | ||
"Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)", "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)", | ||
"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" | ||
); | ||
my $agent = @agents[ int( rand(@agents) ) ]; | ||
$ua->agent($agent); | ||
|
||
my $baseurl = "http://www.aex.nl/scripts/pop/kb.asp?taal=nl&alf="; | ||
my $commandline = $ARGV[0]; | ||
|
||
$commandline = "aex" unless ( defined $commandline and ( $commandline ne "" ) ); | ||
|
||
sub getFonds { | ||
my $fonds = shift; | ||
$agent = @agents[ int( rand(@agents) ) ]; | ||
$ua->agent($agent); | ||
my $request = new HTTP::Request( 'GET', $baseurl . $fonds ); | ||
my $response = $ua->request($request); | ||
my $html = $response->content; | ||
|
||
my @lines = split /\n/, $html; | ||
my @values = (); | ||
foreach my $line (@lines) { | ||
if ( $line =~ /^(\d+\.\d{2})/ ) { | ||
push @values, $1; | ||
} | ||
} | ||
my ( $current, $hoog, $laag, $open, $vorigslot ) = ( $values[0], $values[3], $values[4], $values[5], $values[6] ); | ||
my %thisfonds = ( | ||
"naam" => $fonds, | ||
"koers" => $current, | ||
"hoog" => $hoog, | ||
"laag" => $laag, | ||
"vorigslot" => $vorigslot, | ||
"open" => $open | ||
); | ||
return %thisfonds; | ||
} | ||
|
||
sub america { | ||
my $fonds = shift; | ||
|
||
my $url = "http://www.fd.nl/TopMarkets.asp?Context=N%7C0&BgColor=%23E5E4D9"; | ||
|
||
my $request = new HTTP::Request( 'GET', $url ); | ||
my $response = $ua->request($request); | ||
my $html = $response->content; | ||
my @lines = split /\n/, $html; | ||
my %values = (); | ||
foreach my $line (@lines) { | ||
|
||
## print "--> $line\n"; | ||
## AEX</a></td><td class="tabletekst" align="right">281,09</td><td class="tabletekst" align="right"><span style="color: #FF0000">-2,67%</span> | ||
if ( $line =~ | ||
m|(\w+)</a></td><td class="tabletekst" align="right".*?>(\d+.*?,\d{2})</td><td class="tabletekst" align="right".*?><span style="color: #FF0000">(.*?)\%</span>| | ||
) | ||
{ | ||
my $key = lc($1); | ||
my $val = $2; | ||
my $perc = $3; | ||
$val =~ s/\.//g; | ||
$val =~ s/,/./g; | ||
$values{$key} = $val; | ||
|
||
#print "HIT: $key - $val\n"; | ||
|
||
if ( lc($fonds) eq $key ) { | ||
print "$fonds: $val ($perc%)\n"; | ||
exit 0; | ||
} | ||
|
||
} | ||
} | ||
print "Sorry, $fonds niet gevonden\n"; | ||
exit 0; | ||
} | ||
|
||
if ( ( $commandline =~ /^aex/i ) || ( $commandline =~ /^nasd/i ) || ( $commandline =~ /^dow/i ) ) { | ||
my %values = america($commandline); | ||
if ( defined $values{koers} ) { | ||
"$commandline: $values{koers} open=$values{open} hoogste=$values{hoog} laagste=$values{laag} slot vorig=$values{vorigslot} verschil=" | ||
. sprintf( "%.2f", ( $values{koers} - $values{vorigslot} ) ) . "\n"; | ||
} else { | ||
print "Bestaat $commandline wel? Kan het niet vinden.\n"; | ||
} | ||
} else { | ||
my %values = getFonds($commandline); | ||
if ( defined $values{koers} ) { | ||
"$commandline: $values{koers} open=$values{open} hoogste=$values{hoog} laagste=$values{laag} slot vorig=$values{vorigslot} verschil=" | ||
. sprintf( "%.2f", ( $values{koers} - $values{vorigslot} ) ) . "\n"; | ||
} else { | ||
print "Bestaat $commandline wel? Kan het even niet vinden.\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#!/usr/bin/perl -w | ||
# Casper Joost Eyckelhof (Titanhead) | ||
# [email protected] | ||
|
||
use LWP::UserAgent; | ||
use HTTP::Cookies; | ||
use strict; | ||
|
||
#### allerlei fijne definities en initialisaties ######## | ||
my $ua = new LWP::UserAgent; | ||
my @agents = ( | ||
"Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)", "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)", | ||
"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" | ||
); | ||
my $agent = @agents[ int( rand(@agents) ) ]; | ||
$ua->agent($agent); | ||
|
||
my $baseurl = "http://www.aex.nl/scripts/pop/kb.asp?taal=nl&alf="; | ||
my $commandline = $ARGV[0]; | ||
|
||
$commandline = "aex" unless ( defined $commandline ); | ||
|
||
sub getFonds { | ||
my $fonds = shift; | ||
$agent = @agents[ int( rand(@agents) ) ]; | ||
$ua->agent($agent); | ||
my $request = new HTTP::Request( 'GET', $baseurl . $fonds ); | ||
my $response = $ua->request($request); | ||
my $html = $response->content; | ||
|
||
my @lines = split /\n/, $html; | ||
my @values = (); | ||
foreach my $line (@lines) { | ||
if ( $line =~ /^(\d+\.\d{2})/ ) { | ||
push @values, $1; | ||
} | ||
} | ||
my ( $current, $hoog, $laag, $open, $vorigslot ) = ( $values[0], $values[3], $values[4], $values[5], $values[6] ); | ||
my %thisfonds = ( | ||
"naam" => $fonds, | ||
"koers" => $current, | ||
"hoog" => $hoog, | ||
"laag" => $laag, | ||
"vorigslot" => $vorigslot, | ||
"open" => $open | ||
); | ||
return %thisfonds; | ||
} | ||
|
||
sub america { | ||
my $fonds = shift; | ||
|
||
my $url = "http://www.fd.nl/TopMarkets.asp?Context=N%7C0&BgColor=%23E5E4D9"; | ||
|
||
my $request = new HTTP::Request( 'GET', $url ); | ||
my $response = $ua->request($request); | ||
my $html = $response->content; | ||
my @lines = split /\n/, $html; | ||
my %values = (); | ||
foreach my $line (@lines) { | ||
|
||
## print "--> $line\n"; | ||
## AEX</a></td><td class="tabletekst" align="right">281,09</td><td class="tabletekst" align="right"><span style="color: #FF0000">-2,67%</span> | ||
if ( $line =~ | ||
m|(\w+)</a></td><td class="tabletekst" align="right".*?>(\d+.*?,\d{2})</td><td class="tabletekst" align="right".*?><span style="color: #FF0000">(.*?)\%</span>| | ||
) | ||
{ | ||
my $key = lc($1); | ||
my $val = $2; | ||
my $perc = $3; | ||
$val =~ s/\.//g; | ||
$val =~ s/,/./g; | ||
$values{$key} = $val; | ||
|
||
#print "HIT: $key - $val\n"; | ||
|
||
if ( lc($fonds) eq $key ) { | ||
print "$fonds: $val ($perc)\n"; | ||
exit 0; | ||
} | ||
|
||
} | ||
} | ||
print "Sorry, $fonds niet gevonden\n"; | ||
exit 0; | ||
} | ||
|
||
if ( ( $commandline =~ /^aex/i ) || ( $commandline =~ /^nasd/i ) || ( $commandline =~ /^dow/i ) ) { | ||
my %values = america($commandline); | ||
if ( defined $values{koers} ) { | ||
"$commandline: $values{koers} open=$values{open} hoogste=$values{hoog} laagste=$values{laag} slot vorig=$values{vorigslot} verschil=" | ||
. sprintf( "%.2f", ( $values{koers} - $values{vorigslot} ) ) . "\n"; | ||
} else { | ||
print "Bestaat $commandline wel? Kan het niet vinden.\n"; | ||
} | ||
} else { | ||
my %values = getFonds($commandline); | ||
if ( defined $values{koers} ) { | ||
"$commandline: $values{koers} open=$values{open} hoogste=$values{hoog} laagste=$values{laag} slot vorig=$values{vorigslot} verschil=" | ||
. sprintf( "%.2f", ( $values{koers} - $values{vorigslot} ) ) . "\n"; | ||
} else { | ||
print "Bestaat $commandline wel? Kan het even niet vinden.\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
level = 100 | ||
cache = 120 #2 minutes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Geeft de huidige AEX koers weer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/perl -w | ||
## Import available environment variables | ||
|
||
use File::stat; | ||
my $realuser = $ENV{'MULTI_REALUSER'}; # multigate username of invoking user | ||
my $locked = 0; | ||
|
||
# Loek is raar | ||
# Maar Titan kan ook rare regels in een script plakken! | ||
exit 0 if ( lc($realuser) eq "loek" ); | ||
|
||
my $lockfile = "data/$realuser"; | ||
|
||
#check time-lock on this user | ||
if ( -e $lockfile ) { | ||
my $stat = stat $lockfile or die "Error opening lockcheckfile: $!\n"; | ||
$locked = ( $stat->mtime > time() ); | ||
} | ||
|
||
if ($locked) { | ||
|
||
#do we want to refresh our lock?? | ||
#if so: move this statement after lockfilewriting | ||
exit 0; | ||
} | ||
|
||
#create new lockfile | ||
open CACHE, "> $lockfile" or die "cannot write to file!"; | ||
close CACHE; | ||
|
||
#modify time on lockfile | ||
my $cachetime = time + 300; # 5 minutes into the future | ||
utime $cachetime, $cachetime, $lockfile; | ||
|
||
#the thing this command is about: | ||
if ( int( rand(100) ) < 30 ) { | ||
open( MSG, "< afkoppel.txt" ); | ||
my @opties = <MSG>; | ||
close MSG; | ||
|
||
my $antwoord = $opties[ int( rand(@opties) ) ]; | ||
$antwoord =~ s/XX/$realuser/; | ||
print "$antwoord"; | ||
} else { | ||
exit 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Dag XX | ||
Welterusten XX | ||
Doei! | ||
Nou dag hoor XX | ||
Hasta la vista! XX! | ||
Stand clear. Disengaging XX. | ||
Tot zover deze live verbinding met XX. | ||
We'll meet again, XX. | ||
Afkoppel? Afkoppel? Rare XX! | ||
Beaming up XX | ||
Dag XX. | ||
XX: Kom je snel weer terug? | ||
Ciao | ||
A bientot XX. | ||
Auf Wiedersehen. | ||
Selamat jalan. | ||
Adios XX. | ||
Hej d� XX. | ||
Tot de volgende keer maar weer. | ||
Zijn we zo saai XX? | ||
Tot frop! | ||
Nu al? | ||
Dat is vroeg, XX. | ||
Slaap lekker XX. | ||
Alweer? | ||
Zeker weer naar de vb, XX? | ||
Afkoppelen is voor watjes! | ||
Wow XX, zonder typo's :) | ||
Truste XX | ||
En morgen gezond weer op. | ||
An !afkoppel a day, keeps the sleep away | ||
Peer weet je te vinden, XX. | ||
Trossen los. | ||
Niet meer gezellig hier? | ||
See you later, Multigator... | ||
Toedeledokie XX! | ||
Dag Sinterklaasje^WXX | ||
I do wish we could chat longer, but I'm having an old friend for dinner. Bye. | ||
So this is what a chatroom looks like. | ||
You say goodbye and I say hello | ||
aangekoppel ingekoppel vasgekoppel losgekoppel afkoppel saamkoppel | ||
We moeten rennen, springen, vliegen, duiken, vallen, opstaan en weer doorgaan... | ||
We kunnen nu niet blijven, we kunnen nu niet langer blijven staan | ||
Afkicken? go Go GOO XX!!! | ||
*Setting a tracking cookie on XX* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
level = 50 | ||
user = 0 |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
afkoppel geeft aan dat de gebruiker bij zijn terminal weggaat. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/perl -w | ||
print "Telefoonnummer Alex Bierservice: 053 - 4338460\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
level = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Geeft telefoonnummer van Alex Bierservice (053 - 4338460) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
100 |
Oops, something went wrong.