Skip to content

Commit ff9454e

Browse files
author
Robbert Müller
committed
Initial import
* redid the import, now all *.pl *.pm and *.sh files have eol-style: native git-svn-id: https://svn.muze.nl/svn/multigate/trunk@1 04b2d352-0200-0410-bb56-e1875e288fe5
0 parents  commit ff9454e

File tree

229 files changed

+37347
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+37347
-0
lines changed

Artistic

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
3+
4+
5+
The "Artistic License"
6+
7+
Preamble
8+
9+
The intent of this document is to state the conditions under which a
10+
Package may be copied, such that the Copyright Holder maintains some
11+
semblance of artistic control over the development of the package,
12+
while giving the users of the package the right to use and distribute
13+
the Package in a more-or-less customary fashion, plus the right to make
14+
reasonable modifications.
15+
16+
Definitions:
17+
18+
"Package" refers to the collection of files distributed by the
19+
Copyright Holder, and derivatives of that collection of files
20+
created through textual modification.
21+
22+
"Standard Version" refers to such a Package if it has not been
23+
modified, or has been modified in accordance with the wishes
24+
of the Copyright Holder as specified below.
25+
26+
"Copyright Holder" is whoever is named in the copyright or
27+
copyrights for the package.
28+
29+
"You" is you, if you're thinking about copying or distributing
30+
this Package.
31+
32+
"Reasonable copying fee" is whatever you can justify on the
33+
basis of media cost, duplication charges, time of people involved,
34+
and so on. (You will not be required to justify it to the
35+
Copyright Holder, but only to the computing community at large
36+
as a market that must bear the fee.)
37+
38+
"Freely Available" means that no fee is charged for the item
39+
itself, though there may be fees involved in handling the item.
40+
It also means that recipients of the item may redistribute it
41+
under the same conditions they received it.
42+
43+
1. You may make and give away verbatim copies of the source form of the
44+
Standard Version of this Package without restriction, provided that you
45+
duplicate all of the original copyright notices and associated disclaimers.
46+
47+
2. You may apply bug fixes, portability fixes and other modifications
48+
derived from the Public Domain or from the Copyright Holder. A Package
49+
modified in such a way shall still be considered the Standard Version.
50+
51+
3. You may otherwise modify your copy of this Package in any way, provided
52+
that you insert a prominent notice in each changed file stating how and
53+
when you changed that file, and provided that you do at least ONE of the
54+
following:
55+
56+
a) place your modifications in the Public Domain or otherwise make them
57+
Freely Available, such as by posting said modifications to Usenet or
58+
an equivalent medium, or placing the modifications on a major archive
59+
site such as uunet.uu.net, or by allowing the Copyright Holder to include
60+
your modifications in the Standard Version of the Package.
61+
62+
b) use the modified Package only within your corporation or organization.
63+
64+
c) rename any non-standard executables so the names do not conflict
65+
with standard executables, which must also be provided, and provide
66+
a separate manual page for each non-standard executable that clearly
67+
documents how it differs from the Standard Version.
68+
69+
d) make other distribution arrangements with the Copyright Holder.
70+
71+
4. You may distribute the programs of this Package in object code or
72+
executable form, provided that you do at least ONE of the following:
73+
74+
a) distribute a Standard Version of the executables and library files,
75+
together with instructions (in the manual page or equivalent) on where
76+
to get the Standard Version.
77+
78+
b) accompany the distribution with the machine-readable source of
79+
the Package with your modifications.
80+
81+
c) give non-standard executables non-standard names, and clearly
82+
document the differences in manual pages (or equivalent), together
83+
with instructions on where to get the Standard Version.
84+
85+
d) make other distribution arrangements with the Copyright Holder.
86+
87+
5. You may charge a reasonable copying fee for any distribution of this
88+
Package. You may charge any fee you choose for support of this
89+
Package. You may not charge a fee for this Package itself. However,
90+
you may distribute this Package in aggregate with other (possibly
91+
commercial) programs as part of a larger (possibly commercial) software
92+
distribution provided that you do not advertise this Package as a
93+
product of your own. You may embed this Package's interpreter within
94+
an executable of yours (by linking); this shall be construed as a mere
95+
form of aggregation, provided that the complete Standard Version of the
96+
interpreter is so embedded.
97+
98+
6. The scripts and library files supplied as input to or produced as
99+
output from the programs of this Package do not automatically fall
100+
under the copyright of this Package, but belong to whoever generated
101+
them, and may be sold commercially, and may be aggregated with this
102+
Package. If such scripts or library files are aggregated with this
103+
Package via the so-called "undump" or "unexec" methods of producing a
104+
binary executable image, then distribution of such an image shall
105+
neither be construed as a distribution of this Package nor shall it
106+
fall under the restrictions of Paragraphs 3 and 4, provided that you do
107+
not represent such an executable image as a Standard Version of this
108+
Package.
109+
110+
7. C subroutines (or comparably compiled subroutines in other
111+
languages) supplied by you and linked into this Package in order to
112+
emulate subroutines and variables of the language defined by this
113+
Package shall not be considered part of this Package, but are the
114+
equivalent of input as in Paragraph 6, provided these subroutines do
115+
not change the language in any way that would cause it to fail the
116+
regression tests for the language.
117+
118+
8. Aggregation of this Package with a commercial distribution is always
119+
permitted provided that the use of this Package is embedded; that is,
120+
when no overt attempt is made to make this Package's interfaces visible
121+
to the end user of the commercial distribution. Such use shall not be
122+
construed as a distribution of this Package.
123+
124+
9. The name of the Copyright Holder may not be used to endorse or promote
125+
products derived from this software without specific prior written permission.
126+
127+
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
128+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
129+
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
130+
131+
The End

KNOWN_BUGS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
- Somewhere in Dispatch.pm a check for multicast is done the wrong way
3+
around, resulting in a condition that makes it possible to bypass
4+
spam-protection
5+
6+
- Occassionally (about once a year) triggers a coredump of perl 5.6
7+
8+
- The IRC wrapper sometimes keeps producing (empty) logfiles for channels it
9+
is no longer on. A restart will fix that.

LICENSE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
Multigate 3.0
3+
==============================================================================
4+
5+
Multigate is distributed under the Artistic License, see the Artistic file
6+
for the full text.

changelog.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
version - date - main changes
2+
------------------------------------------------------------------------------------------------
3+
- Fix in Debug to avoid strange perl(?) bugs
4+
Introduction of CommandSimple => support in Dispatch
5+
New scheduler
6+
Fixes in Console (start/stop/restart for non-wrappers)
7+
Dispatch: different way of loading Command module
8+
Command: no more caching of failed commands
9+
max_lines_multicast introduced
10+
11+
3.0.pre4,5,6 - - Extra functions in Users
12+
Small bugfixes in groups
13+
followme-functions enhanced: change main address too
14+
accounting added (commands and protocols)
15+
logging added (accountlog/*)
16+
group-protocols added
17+
Bugfix in (s|g|uns)et methods in Users.pm for group-protocol
18+
19+
3.0.pre3- 03/03/2003 - Bug triggered by very long messages fixed, NBRead enhanced
20+
Groups introduced
21+
Small fixes in Config and Users
22+
23+
3.0.pre2- - Big rewrite of Dispatch and Command: cleanup and
24+
hooks for Groups and Accounting
25+
ENV{'MULTI_IS_MULTICAST'} introduced
26+
Restartable wrappers
27+
Do not send empty messages from Dispatch to Wrapper
28+
Bug in Command regarding ordering of arguments fixed
29+
30+
31+
32+
3.0.pre - - Bug in Command regarding ordering of arguments fixed
33+
Bug in Command with arguments being '0'
34+
Ugly bugs fixed in scheduler.pl and Scheduler.pm (DoS)
35+
Minor updates on Console.pm and Multigate.pm (concerning scheduler)
36+
37+
2.4.x - - Cleanup of lib/ , using default debian libs if possible
38+
39+
2.4 - 25/10/2002 - CGI-like environment for commands
40+
Some cleanups in Command.pm
41+
42+
2.3.x - default protocols moved to multi.conf
43+
database name now in multi.conf
44+
Command cleanup + new caching mechanism
45+
46+
2.3 - 02/09/2002 - caching for commands
47+
48+
2.2 - 09/08/2002 - new Command.pm framework
49+
per command config
50+
global config used for wrappers etc.
51+
Util.pm
52+
53+
2.1.1 - 16/05/2002 - Fixes in Wrapper for full pipes
54+
55+
2.1 - 14/05/2002 - Console module
56+
non-blocking reads
57+
Minor fixes in Command and Dispatcher
58+
Changes in Scheduler
59+
60+
2.0.1 - 13/05/2002 - Minor fixes in Command and Dispatcher
61+
62+
2.0 - 14/02/2002 - Debug module
63+
Scheduler

cleanup_tree.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#
3+
# (C) 2000 - 2005 Wieger Opmeer, Casper Joost Eyckelhof, Yvo Brevoort
4+
#
5+
# This package is free software; you can redistribute it and/or modify it
6+
# under the terms of the "Artistic License".
7+
#
8+
9+
# Eerst backup files met een ~ verwijderen:
10+
find . -name '*~' | xargs --no-run-if-empty /bin/rm
11+
12+
# Alle .pl en .pm files perltidy-en; als er een ERR ontstaat x.pl.tdy niet moven naar x.pl
13+
find . -type d -name .svn -prune -o -name '*.pl' -exec perltidy '{}' ';' -and -exec /usr/bin/test ! -f '{}.ERR' ';' -and -exec /bin/mv -f '{}.tdy' '{}' ';'
14+
find . -type d -name .svn -prune -o -name '*.pm' -exec perltidy '{}' ';' -and -exec /usr/bin/test ! -f '{}.ERR' ';' -and -exec /bin/mv -f '{}.tdy' '{}' ';'
15+
16+
# Overgebleven .ERR en tdy weghalen
17+
find . -type d -name .svn -prune -o -name '*.ERR' | xargs --no-run-if-empty /bin/rm
18+
find . -type d -name .svn -prune -o -name '*.tdy' | xargs --no-run-if-empty /bin/rm

clear_cache.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
#
3+
# (C) 2000 - 2005 Wieger Opmeer, Casper Joost Eyckelhof, Yvo Brevoort
4+
#
5+
# This package is free software; you can redistribute it and/or modify it
6+
# under the terms of the "Artistic License".
7+
#
8+
9+
# Delete all regular files which data was last modified more than 0 minutes ago
10+
#find ./cache/ -mmin +0 -type f -exec echo '{}' ';'
11+
find ./cache/ -type d -name .svn -prune -o -mmin +0 -type f -exec rm '{}' ';' -and -exec echo 'deleted {}' ';'

commands/aankoppel/aankoppel.pl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/perl -w
2+
3+
use lib '../../lib';
4+
5+
#User management from multigate
6+
use Multigate::Users;
7+
use Multigate::Util;
8+
9+
## Import available environment variables
10+
11+
my $address = $ENV{'MULTI_USER'}; # address of invoking user
12+
my $user = $ENV{'MULTI_REALUSER'}; # multigate username of invoking user
13+
my $protocol = $ENV{'MULTI_FROM'}; # protocol this command was invoked from
14+
15+
$address =
16+
stripnick($address); #make sure we do not have irc-channels in database
17+
18+
Multigate::Users::init_users_module();
19+
20+
my $result = set_preferred_protocol( $user, $protocol );
21+
my $result2 = set_main_address( $user, $protocol, $address );
22+
23+
print "Setting followme to ($protocol, $address) for $user.\n";
24+
25+
Multigate::Users::cleanup_users_module();

commands/aankoppel/command.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
level = 50

commands/aankoppel/help.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aankoppel: sets preferred protocol to from_protocol, and main_address to from-address

commands/afkoppel/afkoppel.pl

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/perl -w
2+
## Import available environment variables
3+
4+
use File::stat;
5+
my $realuser = $ENV{'MULTI_REALUSER'}; # multigate username of invoking user
6+
my $locked = 0;
7+
8+
# Loek is raar
9+
# Maar Titan kan ook rare regels in een script plakken!
10+
exit 0 if ( lc($realuser) eq "loek" );
11+
12+
my $lockfile = "data/$realuser";
13+
14+
#check time-lock on this user
15+
if ( -e $lockfile ) {
16+
my $stat = stat $lockfile or die "Error opening lockcheckfile: $!\n";
17+
$locked = ( $stat->mtime > time() );
18+
}
19+
20+
if ($locked) {
21+
22+
#do we want to refresh our lock??
23+
#if so: move this statement after lockfilewriting
24+
exit 0;
25+
}
26+
27+
#create new lockfile
28+
open CACHE, "> $lockfile" or die "cannot write to file!";
29+
close CACHE;
30+
31+
#modify time on lockfile
32+
my $cachetime = time + 300; # 5 minutes into the future
33+
utime $cachetime, $cachetime, $lockfile;
34+
35+
#the thing this command is about:
36+
if ( int( rand(100) ) < 30 ) {
37+
open( MSG, "< afkoppel.txt" );
38+
my @opties = <MSG>;
39+
close MSG;
40+
41+
my $antwoord = $opties[ int( rand(@opties) ) ];
42+
$antwoord =~ s/XX/$realuser/;
43+
print "$antwoord";
44+
}
45+
else {
46+
exit 0;
47+
}

commands/afkoppel/afkoppel.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Dag XX
2+
Welterusten XX
3+
Doei!
4+
Nou dag hoor XX
5+
Hasta la vista! XX!
6+
Stand clear. Disengaging XX.
7+
Tot zover deze live verbinding met XX.
8+
We'll meet again, XX.
9+
Afkoppel? Afkoppel? Rare XX!
10+
Beaming up XX
11+
Dag XX.
12+
XX: Kom je snel weer terug?
13+
Ciao
14+
A bientot XX.
15+
Auf Wiedersehen.
16+
Selamat jalan.
17+
Adios XX.
18+
Hej d� XX.
19+
Tot de volgende keer maar weer.
20+
Zijn we zo saai XX?
21+
Tot frop!
22+
Nu al?
23+
Dat is vroeg, XX.
24+
Slaap lekker XX.
25+
Alweer?
26+
Zeker weer naar de vb, XX?
27+
Afkoppelen is voor watjes!
28+
Wow XX, zonder typo's :)
29+
Truste XX
30+
En morgen gezond weer op.
31+
An !afkoppel a day, keeps the sleep away
32+
Peer weet je te vinden, XX.
33+
Trossen los.
34+
Niet meer gezellig hier?
35+
See you later, Multigator...
36+
Toedeledokie XX!
37+
Dag Sinterklaasje^WXX
38+
I do wish we could chat longer, but I'm having an old friend for dinner. Bye.
39+
So this is what a chatroom looks like.
40+
You say goodbye and I say hello
41+
aangekoppel ingekoppel vasgekoppel losgekoppel afkoppel saamkoppel
42+
We moeten rennen, springen, vliegen, duiken, vallen, opstaan en weer doorgaan...
43+
We kunnen nu niet blijven, we kunnen nu niet langer blijven staan
44+
Afkicken? go Go GOO XX!!!
45+
*Setting a tracking cookie on XX*

commands/afkoppel/command.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
level = 50
2+
user = 0

commands/afkoppel/help.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
afkoppel geeft aan dat de gebruiker bij zijn terminal weggaat.

0 commit comments

Comments
 (0)