X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2FNotes.txt;h=4e23e1306b4766c82d8f5be07b060b945a849254;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=3768d2c389c38275320a284eb4b8e8e50c9e6065;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/Notes.txt b/cmd/Notes.txt index 3768d2c3..4e23e130 100644 --- a/cmd/Notes.txt +++ b/cmd/Notes.txt @@ -1,4 +1,4 @@ -Programming Notes ($Id$) +Programming Notes * Every command that can used on the command line lives in either this directory ('cmd') or in a local version ('local_cmd'). You are cajoled or @@ -43,12 +43,13 @@ Programming Notes ($Id$) * slash characters are replaced by '_' so the equivalent name for 'show/qth' is 'Emb_show_qth'. -* you would normally do a 'my $self = shift;' as the first thing. There +* you would normally do a 'my ($self, $line) = @_;' as the first thing. There are a complete set of accessors for DXUser, DXCommandmode and DXChannel classes and these are the recommended way of getting at these classes. A fairly standard start might be:- - $self = shift; + my ($self, $line) = @_; + @args = split /\s+/, $line; $call = $self->call; $user = $self->user; @@ -61,7 +62,9 @@ Programming Notes ($Id$) * The normal privilege levels are:- 0 - user privilege. + 1 - remote user user privilege 5 - sysop privilege. + 8 - maximum recommended remote sysop privilege 9 - console privilege. The sysop privilege is for things that you are prepared for remote @@ -79,6 +82,42 @@ Programming Notes ($Id$) of an element (the client will put the correct one in if required [but see below]). +* As this is perl and it is very easy to alter stuff to get it correct, + I would like to see some intelligent argument processing, e.g. if + you can have one callsign, you can have several. Interpret your + arguments; so for example:- + + set/qra jo02lq - sets your own locator to JO02LQ + set/qra g1tlh jo02lq - sets G1TLH's locator (if you are allowed) + + or + + show/qra in92jo - displays the bearing and distance to + IN92JO using your lat/long or locator + show/qra jn56in in92jo - bearing and distance between two + locators + +* It is important that you remember when you have tie hashes using MLDBM + et al. If you do a DXUser::get($call) you will get a different (older) + thing than the one in $self->$user. This is almost certainly NOT what + you want if want to modify a user that is currently connected. + +* If you want to debug something, start the cluster.pl up thus:- + + perl -d cluster.pl + dbg> r + + Then you can go into debug mode at anytime by using the command :- + + debug + + or you can put the line:- + + $DB::single = 1; + + in an appropriate place in a command. This will only have an effect + if you are running in perl debug mode. + * Anything you output with a > as the last character is taken to mean that this is a prompt and will not have a \r or \n appended to it. @@ -87,3 +126,6 @@ Programming Notes ($Id$) have a '.hlp' appended to the command name rather than a '.pl'. All in the help file are sent to the user except those starting with a '#' character. + +* PLEASE add your new commands to the Commands_*.hlp file so that + people know about and how to use them!