Commit Graph

132 Commits

Author SHA1 Message Date
Dirk Koopman
770092d94f fixed duplicate spot, always make clean ending
Try to make sure that the user file is always close regardless of
what happens to cause the program to end/stop/crash.
2022-01-28 00:06:22 +00:00
Dirk Koopman
2ff41cd156 add missing K field definition 2022-01-21 23:17:51 +00:00
Dirk Koopman
f63d598af3 add DXCIDR, fix version no tracking
Add more mojo code compatibility
2022-01-20 18:36:58 +00:00
Dirk Koopman
4b207544da mega-merge of major parts of mojo
The point of this is to make it easier to maintain both branches.

DXProt (DXProtHandle has already been copied) route/* DXChannel
DXCommandmode and console.pl have been either copied wholesale,
where necessary, modified to use the old Msg based networking stack.
2022-01-07 23:47:56 +00:00
Dirk Koopman
74db48555c fiz console.pl resizing 2021-12-10 16:34:48 +00:00
Dirk Koopman
ec2bc54f84 back port registration from mojo 2021-12-10 10:45:23 +00:00
Dirk Koopman
2e3638e69f backport mojo console.pl width/scolling changes 2021-12-08 13:34:39 +00: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
a48eea32af Limit depth of recursion for route finding
The limit is 20 levels, which should be enough for anybody.
Add CTY-1804 data
Start the process of allowing filtering on PC92 (w.i.p)
2008-05-26 16:58:15 +01:00
Dirk Koopman
8b21846900 add disc users|nodes|all to disconnect cmd 2008-05-13 12:53:47 +01:00
Dirk Koopman
82aac01bdf Fix crash on sending an invalid rcmd 2008-02-29 22:47:43 +00:00
Dirk Koopman
2c50f9b4b2 new keepalive system + timings for PC92 C recs
Added the new K record for keepalives.
Increased the PC92 C interval to 24 hours.
Increased dependent node C interval to 2 hours.
PC50 can reset obs.
PC50 now routed everywhere without filters except isolation,
this may change back in time, when K record is ubiquitous.

Still need to actually issue K record
2007-09-17 22:44:15 +01:00
Dirk Koopman
c6552c92e3 remove rspf, add pc10 eph_dup, tidy up eph_dups 2007-07-09 22:34:16 +01:00
Dirk Koopman
fd0a34c34a remove all $Id$ strings 2007-06-24 02:17:43 +01:00
Dirk Koopman
d3641e4f28 Rearrange startup PC92 arrangements
This is an attempt to cut down on the number PC92Cs that are flying
around. It does this be storing the last PC92C and only sending
it (which should be ignored by other people if broadcast) and
a PC92A. It does mean that the PC92C could be quite out of date
but a fresher will be along soon(ish)

I have also increase the pc92 update time to one hour and
randomised it to one hour - upto 1/4 of the update time.

It will also do each node separately, rather than all together in
one big gob.
2007-06-23 12:54:02 +01:00
Dirk Koopman
776d7bb927 Merge branch 'master' into SIMPLEROUTE
Conflicts:

	Changes
	cmd/Aliases
	perl/DXChannel.pm
	perl/DXProt.pm
	perl/DXSql/SQLite.pm
	perl/DXSql/mysql.pm
	perl/DXXml.pm
	perl/DXXml/Cmd.pm
	perl/DXXml/IM.pm
	perl/DXXml/Text.pm
	perl/Msg.pm
	perl/Route/Node.pm
	perl/Version.pm

fix conflicts from merge
2007-06-14 16:16:43 +01:00
Dirk Koopman
b9dffeff72 Prepare for git repository
remove all the versioning from the code and introduce Version.pm
fix some niffnaffs
2007-06-14 12:08:12 +01:00
Dirk Koopman
7b9256cead Prepare for SIMPLEROUTE merge (more files) 2007-06-13 22:30:38 +01:00
minima
cbda6153fa change do_pc92 to do_pc9x 2007-01-22 13:59:59 +00:00
minima
aeb4c8591d add pc93 talk messages 2007-01-22 12:55:10 +00:00
minima
3d7b8f73c5 fix (very) rare disconnect user just before disconnecting node bug. 2007-01-15 20:00:30 +00:00
minima
ad7e69f78e add dxver to these routines 2007-01-08 10:46:29 +00:00
minima
dab9e3607e chop out all the external linking and add prototype pc92 sentence. 2006-12-15 13:19:20 +00:00
minima
57a2e501a5 fix typo 2006-07-21 21:19:36 +00:00
minima
1483f78fa8 a pretty nearly working gtkconsole... 2006-07-21 18:02:26 +00:00
minima
ae313f260d add some flesh to a gtk based console program 2006-07-19 23:51:19 +00:00
minima
edfc155838 fix xml ambiqueties. 2006-06-04 17:04:08 +00:00
minima
0148e301a4 Change buddy message. 2006-06-03 18:39:03 +00:00
minima
9b47e7023d reduce the amount of POSIX loaded.
display buddies online at logon.
2006-03-26 18:36:01 +00:00
minima
9a12175ae9 add node to call in tell_login and tell_buddies. 2006-03-07 18:21:42 +00:00
minima
679037f49e add set/buddy.
add set/local_node.
fix warning for empty version in PC19.
2006-03-06 09:09:36 +00:00
minima
b359511572 get the basic (r)cmd thing working. 2006-01-23 23:37:19 +00:00
minima
4937d077fd fix badspotters and local ann/full.
do more development work on XML Interface, get pings basically working.
2006-01-11 20:21:50 +00:00
minima
dc305f992d clean up various things and add the DXXml.pm module 2006-01-09 23:07:45 +00:00
minima
dce19df96e fix DXChannel->get to DXChannel::get 2005-03-13 11:14:31 +00:00
minima
6f20114b03 start the Aranea additions 2005-01-24 09:08:54 +00:00
minima
5f2487385b added inscript test to selected commands
fixed problem with dxcommandmode in perl < 5.8
added spanish translations for script commands
2005-01-15 22:03:46 +00:00
minima
aad4e36d37 1. Add $main::bumpexisting variable which allows a new connection for a user
call to disconnect an existing connection with the same call. The default for
this variable is 'true' (1). This means that existing behaviour has changed.
set/var $main::bumpexisting = 0 to return to original behaviour.
2. Remind a user every hour (as default) that they have new messages.
set/var $DXCommandmode::msgpolltime = 3*3600 to set it to 3 hours.
3. Allow some substitutions in set/prompt (call, date, time and
cluster call) and add dxspider just before the > as standard.
4. Add $main::allowdxby variable so that sysops can switch off the
'DX BY <othercall' command. It is set to 0 (ie disabled) by default. This
is for sysops who don't want to bump privilege to allow it. That still works
as before.
5. Fix the bug in 'dx by <call>' that causes only the first word of the
comment to be recorded.
2005-01-12 12:33:48 +00:00
minima
080b937d5e added changes for VE7CC's windows programs. There may be more soon. 2004-12-17 11:51:57 +00:00
minima
0e1727bfb2 fix // in talk
s/bestdxchan/dxchan/ in rspfcheck
2004-07-30 16:55:51 +00:00
minima
23d5848190 added Investigate and believing 2004-07-28 14:07:45 +00:00
minima
28788cb9ae fix problem with things banging out and leaving stuff in the input queue 2003-01-17 16:18:09 +00:00
minima
7b616aeabc 1. tidy up AUTOLOAD
2. make sure empty PC16s are not sent out on startup
2003-01-16 03:54:06 +00:00
minima
1256794cae fix some errors in sh/c 2003-01-05 10:55:17 +00:00
minima
8178d787d7 added the state filtering stuff
tried to speed up the AUTOLOADING
tried to fix the near dupe check again
2002-10-13 19:35:41 +00:00
minima
dbf7523a9b remove warnings from $BRANCH lines for 5.8.0 2002-07-29 15:41:49 +00:00
minima
70908cf7f6 version with the 'final' version of PC90 line in it 2002-07-05 14:33:29 +00:00
minima
f0323dc530 Added set/prompt (and unset/prompt) command so that Stephan can fool some
external programs into thinking it is talking to clx.
2001-12-17 19:06:00 +00:00
minima
6ca6747769 fix K1XX's problem with node eq user callsigns on PC11s 2001-11-04 16:35:08 +00:00
minima
579810d363 added registration
revamped the password handling
2001-10-24 20:47:07 +00:00