]> dxcluster.org Git - spider.git/commitdiff
sort a load of gitignores on a real server
authordirk <dirk@server.tobit.co.uk>
Thu, 14 Jun 2007 21:33:41 +0000 (23:33 +0200)
committerdirk <dirk@server.tobit.co.uk>
Thu, 14 Jun 2007 21:33:41 +0000 (23:33 +0200)
13 files changed:
.gitignore [new file with mode: 0644]
connect/.gitignore [new file with mode: 0644]
data/.gitignore [new file with mode: 0644]
filter/.gitignore [new file with mode: 0644]
html/.gitignore [new file with mode: 0644]
html/home.html
html/newprot.html
mrtg/.gitignore [new file with mode: 0644]
msg/.gitignore [new file with mode: 0644]
perl/EphMsg.pm [new file with mode: 0644]
scripts/.gitignore [new file with mode: 0644]
src/.gitignore [new file with mode: 0644]
techdoc/.gitignore [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..1ca43b0
--- /dev/null
@@ -0,0 +1,16 @@
+local*
+*~
+*.[oa]
+*.tmp
+CVS
+tmp
+*.bak
+.#*
+*#
+*gz
+*zip
+.*
+!.gitignore
+packclus
+tutor*
+db
diff --git a/connect/.gitignore b/connect/.gitignore
new file mode 100644 (file)
index 0000000..16112e1
--- /dev/null
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!*.issue
diff --git a/data/.gitignore b/data/.gitignore
new file mode 100644 (file)
index 0000000..6027afd
--- /dev/null
@@ -0,0 +1,13 @@
+bad*
+debug
+*.db
+*.v?
+spots
+user*
+dupefile
+log
+wwv
+wcy
+motd*
+issue
+logout
diff --git a/filter/.gitignore b/filter/.gitignore
new file mode 100644 (file)
index 0000000..bbfa3dc
--- /dev/null
@@ -0,0 +1,2 @@
+*.pl
+*.pl.o
diff --git a/html/.gitignore b/html/.gitignore
new file mode 100644 (file)
index 0000000..4cb187e
--- /dev/null
@@ -0,0 +1,2 @@
+mrtg
+client
index e77c09cd8a43294c7b59482a201ac96d7236bacc..dd6fcc1f4dea182bccff0f73df09bbb5f38ede54 100644 (file)
@@ -25,7 +25,6 @@ Here are various jumping off points:-
 <!-- Standard Footer!! -->                                                              <p>&nbsp;</p>
         <p>                                                                               <FONT COLOR="#606060"><hr></font>
         <font color="#FF0000" size=-2>                                                    Copyright &copy; 1998 by Dirk Koopman G1TLH. All Rights Reserved<br>
-        </font>                                                                         <font color="#000000" size=-2>$Id: index.html,v 1.19 2001/04/17 20:44:11
- g0vgs Exp $
+        </font>                                                                         <font color="#000000" size=-2>$Id$
 </body>
 </html>
index 1bb84fe237ba78ed4528e3097ba45f77ee01bbff..a0e40c863b01a47bab31825d3cd63ca2f7ad1d1c 100644 (file)
@@ -208,6 +208,5 @@ sufficient!</p>
 <span class="copy">Copyright © 2001 by Dirk Koopman G1TLH. All Rights
 Reserved</span>
  <br>
-<span class="id">$Id: index.html,v 1.19 2001/04/17 20:44:11 g0vgs Exp
-$</span></body>
+<span class="id">$Id$</span></body>
 </html>
diff --git a/mrtg/.gitignore b/mrtg/.gitignore
new file mode 100644 (file)
index 0000000..d6b7ef3
--- /dev/null
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/msg/.gitignore b/msg/.gitignore
new file mode 100644 (file)
index 0000000..16112e1
--- /dev/null
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!*.issue
diff --git a/perl/EphMsg.pm b/perl/EphMsg.pm
new file mode 100644 (file)
index 0000000..eabba93
--- /dev/null
@@ -0,0 +1,186 @@
+#
+# This class is the internal subclass that deals with 'Ephmeral'
+# communications like: querying http servers and other network
+# connected data services and using Msg.pm
+#
+# An instance of this is setup by a command together with a load
+# of callbacks and then runs with a state machine until completion
+#
+# $Id$
+#
+# Copyright (c) 2001 - Dirk Koopman G1TLH
+#
+
+package EphMsg;
+
+use strict;
+use Msg;
+use DXVars;
+use DXUtil;
+use DXDebug;
+use IO::File;
+use IO::Socket;
+use IPC::Open3;
+
+use vars qw(@ISA $deftimeout);
+
+@ISA = qw(Msg);
+$deftimeout = 60;
+
+
+sub new
+{
+
+}
+
+# we probably won't use the normal format
+sub enqueue
+{
+       my ($conn, $msg) = @_;
+       push (@{$conn->{outqueue}}, $msg . $conn->{lineend});
+}
+
+sub dequeue
+{
+       my $conn = shift;
+       my $msg;
+
+       if ($conn->{csort} eq 'ax25' && exists $conn->{msg}) {
+               $conn->{msg} =~ s/\cM/\cJ/g;
+       }
+
+       if ($conn->{state} eq 'WC') {
+               $conn->to_connected($conn->{call}, 'O', $conn->{csort});
+       }
+
+       if ($conn->{msg} =~ /\cJ/) {
+               my @lines =  $conn->{msg} =~ /([^\cM\cJ]*)\cM?\cJ/g;
+               if ($conn->{msg} =~ /\cJ$/) {
+                       delete $conn->{msg};
+               } else {
+                       $conn->{msg} =~ s/([^\cM\cJ]*)\cM?\cJ//g;
+               }
+
+               while (defined ($msg = shift @lines)) {
+                       dbg("connect $conn->{cnum}: $msg") if $conn->{state} ne 'C' && isdbg('connect');
+
+                       $msg =~ s/\xff\xfa.*\xff\xf0|\xff[\xf0-\xfe].//g; # remove telnet options
+
+                       &{$conn->{rproc}}($conn, $msg);
+               }
+       }
+}
+
+sub to_connected
+{
+       my ($conn, $call, $dir, $sort) = @_;
+       $conn->{state} = 'C';
+       $conn->conns($call);
+       delete $conn->{cmd};
+       $conn->{timeout}->del if $conn->{timeout};
+       delete $conn->{timeout};
+       $conn->nolinger;
+       &{$conn->{rproc}}($conn, "$dir$call|$sort");
+}
+
+
+sub start_connect
+{
+       my $call = shift;
+       my $fn = shift;
+       my $conn = ExtMsg->new(\&main::new_channel);
+       $conn->{outgoing} = 1;
+       $conn->conns($call);
+
+       my $f = new IO::File $fn;
+       push @{$conn->{cmd}}, <$f>;
+       $f->close;
+       $conn->{state} = 'WC';
+       $conn->_dotimeout($deftimeout);
+}
+
+sub _doconnect
+{
+       my ($conn, $sort, $line) = @_;
+       my $r;
+
+       $sort = lc $sort;                       # in this case telnet, ax25 or prog
+       dbg("CONNECT $conn->{cnum} sort: $sort command: $line") if isdbg('connect');
+       if ($sort eq 'telnet') {
+               # this is a straight network connect
+               my ($host, $port) = split /\s+/, $line;
+               $port = 23 if !$port;
+               $r = $conn->connect($host, $port);
+               if ($r) {
+                       dbg("Connected $conn->{cnum} to $host $port") if isdbg('connect');
+               } else {
+                       dbg("***Connect $conn->{cnum} Failed to $host $port $!") if isdbg('connect');
+               }
+       } elsif ($sort eq 'prog') {
+               $r = $conn->start_program($line, $sort);
+       } else {
+               dbg("invalid type of connection ($sort)");
+       }
+       $conn->disconnect unless $r;
+       return $r;
+}
+
+sub _doabort
+{
+       my $conn = shift;
+       my $string = shift;
+       dbg("connect $conn->{cnum}: abort $string") if isdbg('connect');
+       $conn->{abort} = $string;
+}
+
+sub _dotimeout
+{
+       my $conn = shift;
+       my $val = shift;
+       dbg("connect $conn->{cnum}: timeout set to $val") if isdbg('connect');
+       $conn->{timeout}->del if $conn->{timeout};
+       $conn->{timeval} = $val;
+       $conn->{timeout} = Timer->new($val, sub{ &_timedout($conn) });
+}
+
+
+sub _timedout
+{
+       my $conn = shift;
+       dbg("connect $conn->{cnum}: timed out after $conn->{timeval} seconds") if isdbg('connect');
+       $conn->disconnect;
+}
+
+# handle callsign and connection type firtling
+sub _doclient
+{
+       my $conn = shift;
+       my $line = shift;
+       my @f = split /\s+/, $line;
+       my $call = uc $f[0] if $f[0];
+       $conn->conns($call);
+       $conn->{csort} = $f[1] if $f[1];
+       $conn->{state} = 'C';
+       &{$conn->{rproc}}($conn, "O$call|$conn->{csort}");
+       delete $conn->{cmd};
+       $conn->{timeout}->del if $conn->{timeout};
+}
+
+sub _send_file
+{
+       my $conn = shift;
+       my $fn = shift;
+
+       if (-e $fn) {
+               my $f = new IO::File $fn;
+               if ($f) {
+                       while (<$f>) {
+                               chomp;
+                               my $l = $_;
+                               dbg("connect $conn->{cnum}: $l") if isdbg('connll');
+                               $conn->send_raw($l . $conn->{lineend});
+                       }
+                       $f->close;
+               }
+       }
+}
diff --git a/scripts/.gitignore b/scripts/.gitignore
new file mode 100644 (file)
index 0000000..4b9ad3b
--- /dev/null
@@ -0,0 +1,3 @@
+*
+!.gitignore
+*.issue
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644 (file)
index 0000000..c5926d9
--- /dev/null
@@ -0,0 +1,2 @@
+client
+dbg
diff --git a/techdoc/.gitignore b/techdoc/.gitignore
new file mode 100644 (file)
index 0000000..1abc35a
--- /dev/null
@@ -0,0 +1,4 @@
+*
+!Makefile
+!*.pod
+!.gitignore