Commit Graph

2295 Commits

Author SHA1 Message Date
Dirk Koopman
e489ed64a0 Merge branch 'master' of /scm/spider 2014-03-08 00:21:38 +00:00
Dirk Koopman
0c963c43ab fix small crash with Spot::dup
This may have something to do with the new wpxloc.raw format that
I am now using (erm.. testing). But if I check for a a duplicate of
the prefix in the remarks, and that "prefix" (char string length <= 4)
contains a space, Spot::dup crashes. Intermittently.
2014-03-08 00:18:18 +00:00
Dirk Koopman
d48efa4255 Merge branch 'master' of /scm/spider 2014-03-07 23:37:07 +00:00
Dirk Koopman
3b2eb091ae add new version of wpxloc.raw 2014-03-07 23:29:48 +00:00
Dirk Koopman
210ee86709 improve the previous fix for import_cmd slightly
Make sure that if a Route::Node disappears and the software clucks
in broadcast_pc92_update/broadcast_pc92_keepalive then STILL update
the timer so that it doesn't continue to cluck every 10 seconds.
2014-01-12 17:59:50 +00:00
Dirk Koopman
536ca8cd58 fix dx and import_cmd problems 2014-01-12 16:43:37 +00:00
Dirk Koopman
b4125d7399 Merge branch 'master' of /scm/spider 2013-12-31 18:35:38 +00:00
Dirk Koopman
94c061b129 add CTY2312 prefix changes 2013-12-30 12:30:39 +00:00
Dirk Koopman
e0529a01be add cty-2311 prefixes 2013-11-19 12:20:25 +00:00
Dirk Koopman
9e086e90d1 add CTY2310 prefix changes 2013-10-09 10:15:45 +01:00
Dirk Koopman
6642c22f0f Merge branch 'master' of /scm/spider 2013-09-13 18:45:26 +01:00
Dirk Koopman
e3994401fa add CTY2309 + wpxloc.raw files 2013-09-13 18:44:47 +01:00
Dirk Koopman
59a8866a3f Merge branch 'master' of /scm/spider 2013-09-12 13:40:58 +01:00
Dirk Koopman
725d28d2eb fix AsyncMsg state handling and sh/qrz 2013-09-12 13:40:05 +01:00
Dirk Koopman
856cb98bb0 Merge branch 'master' of /scm/spider 2013-09-11 16:18:28 +01:00
Dirk Koopman
564b5b3a0c add get/keps command to load AMSAT keps
Fix AsyncMsg to handle basic 302 redirects.
2013-09-11 16:17:30 +01:00
Dirk Koopman
2afa578fe5 get 302 working in AsyncMsg, basic get/keps 2013-09-11 00:36:45 +01:00
Dirk Koopman
b099b4a232 update sh/qrz and start get/keps 2013-09-10 23:42:24 +01:00
Dirk Koopman
e941823af3 fix sh/time undefined $last[0] error 2013-09-10 19:58:18 +01:00
Dirk Koopman
8bb293d5a1 AsyncMsgise sh/db0sdx
Add POST and on_disconnect handlers in AsyncMsg.pm
2013-09-09 15:20:32 +01:00
Dirk Koopman
89eaa6762e AsyncMsgise sh/425 2013-09-08 16:17:17 +01:00
Dirk Koopman
cc83de0d57 AsyncMsgise sh/qrz
Which was quite easy compared to some...
2013-09-07 23:08:15 +01:00
Dirk Koopman
9fc2ec1708 mv HTTPMsg to AsyncMsg, add 'raw' method
Convert sh/wm7d command to AsyncMsg.
Modify all the HTTPMsg converted cmds to use AsyncMsg.

Add a 'raw' 'telnet' handler. This allows one to query things with command
prompts or stuff that isn't a HTTP server. But it ain't always easy. See the
messing around in sh/wm7d I had to do, to get something that is stable given
that the thing that I am looking doesn't have a \n at the end.

It's just a prompt.
2013-09-07 18:47:48 +01:00
Dirk Koopman
1ec21f9257 and also in sh/db0sdx.pl 2013-09-07 00:23:38 +01:00
Dirk Koopman
75c9f67f91 fix missing Net::Telnet in sh/wm7d
temporarily...
2013-09-07 00:21:31 +01:00
Dirk Koopman
fd2d8314dd Add HTTPMsg.pm an async HTTP agent
This is a start of making all the Net::Telnet things redundant.

HTTPMsg.pm is likely to be substantially modified or replaced.

W.I.P
2013-09-07 00:10:36 +01:00
Dirk Koopman
a55492232d update Changes 2013-09-06 14:26:47 +01:00
Dirk Koopman
c675748ded added support for subroutines in commands
Traditionally, a command is a piece of perl that is a simple
in line lump of code e.g (blank.pl):

		my ($self, $line) = @_;
		my $lines = 1;
		my $data = ' ';
		my @f = split /\s+/, $line;
		if (@f && $f[0] !~ /^\d+$/) {
			$data = shift @f;
			$data = $data x int(($self->width-1) / length($data));
			$data .= substr $data, 0, int(($self->width-1) % length($data))
		}
		if (@f && $f[0] =~ /^\d+$/) {
			$lines = shift @f;
			$lines = 9 if $lines > 9;
			$lines = 1 if $lines < 1;
		}
		my @out;
		push @out, $data for (1..$lines);
		return (1, @out);

It is now possible to have a 'handler' and any other code you like in
a command file, for instance (again blank.pl):

sub this {}

sub that {}

sub another {}

sub handle
{
		my ($self, $line) = @_;
		my $lines = 1;
		my $data = ' ';
		my @f = split /\s+/, $line;
		if (@f && $f[0] !~ /^\d+$/) {
			$data = shift @f;
			$data = $data x int(($self->width-1) / length($data));
			$data .= substr $data, 0, int(($self->width-1) % length($data))
		}
		if (@f && $f[0] =~ /^\d+$/) {
			$lines = shift @f;
			$lines = 9 if $lines > 9;
			$lines = 1 if $lines < 1;
		}
		my @out;
		push @out, $data for (1..$lines);
		return (1, @out);
}

The 'sub handle' being the cue that distiguishes one form from the other.

The first form has the 'sub handle { <code> }' wrapped around it so, internally
they are treated the same. Each command is placed in its own DXCommandmode sub
package with a standard set of packages "use"d in front of it.

For now (at least) any functions you declare are just that. "$self" is a DXCommandmode
not a blessed reference to this command's full package name, you cannot use things like

$self->this() or $self->that()

they must be called as local functions.

This may change in the future.

Conflicts:

	perl/DXChannel.pm
	perl/Version.pm
2013-09-06 14:22:38 +01:00
Dirk Koopman
f67292b60a fix sh/contest and add CTY2308 prefixes 2013-09-06 13:42:02 +01:00
Dirk Koopman
0417a5b163 Alter default addr in client.c to "127.0.0.1"
This now matches the default in DXVars.pm.
2013-07-24 09:11:30 +01:00
Dirk Koopman
7f7535c09c Make peerhost data more consistent 2013-07-21 23:38:24 +01:00
Dirk Koopman
503168fd0f add ip address to links command 2013-07-21 23:17:46 +01:00
Dirk Koopman
4dad3e88c8 add new prefixes from cty2307 2013-07-21 22:52:07 +01:00
Dirk Koopman
385440511e fix ipv6 crash in Msg.pm 2013-07-21 22:46:18 +01:00
Dirk Koopman
e49fbae200 updates ands for 4mm and prefix data 2013-06-06 09:19:14 +01:00
Dirk Koopman
a7b139d6ce try again with cty2210 2012-05-31 17:08:50 +01:00
Dirk Koopman
2321d9d1b5 Add CTY2210 prefix changes 2012-05-31 09:49:01 +01:00
Dirk Koopman
996671c938 add cty2209 prefix changes 2012-05-29 11:37:57 +01:00
Dirk Koopman
96c0247dec add DXSql/Pg.pm and CTY-2206 Prefix changes 2012-04-10 14:50:26 +01:00
Dirk Koopman
b2aa9a9839 add new wpxloc.raw + CTY2204 prefix changes 2012-03-13 18:31:26 +00:00
Dirk Koopman
427bd0165d alter index adding dbg statement order 2012-03-12 23:41:57 +00:00
Dirk Koopman
61885d0dba breath on database storage engines
Check that Mysql / sqlite databases work
Add ipaddr column to spot table if required
from now on add ip addresses to table if present (NULL otherwise)
2012-03-12 23:26:55 +00:00
Dirk Koopman
e1de45af27 fix (different) pc34 UNIVERSAL typo in DXProt 2012-03-09 22:51:01 +00:00
Dirk Koopman
a50f4484d8 fix DXUser UNIVERSAL::isa typo 2012-03-09 22:42:35 +00:00
Dirk Koopman
40953f6b16 add yet more changes in pc34 2012-03-09 22:15:30 +00:00
Dirk Koopman
dabf8497c5 try to fix unblessed refs in PC34s 2012-03-09 22:13:29 +00:00
Dirk Koopman
7060bb41e3 update version 2012-02-15 15:44:26 +00:00
Dirk Koopman
4cb816f890 add CTY-2202 prefix data
and also fix mysql show tables
2012-02-15 15:43:50 +00:00
Dirk Koopman
9ab4359792 er.. actually generate the CTY-2201 prefixes 2012-01-29 10:41:58 +00:00
Dirk Koopman
449de811da add CTY-2201 prefixes 2012-01-29 10:41:23 +00:00