add logging of PC92A ip addresses
[spider.git] / perl / Local.pm
1 #
2 # This is a template Local module
3 #
4 # DON'T CHANGE THIS, copy it to ../local/ and change it
5 # there
6 #
7 # You can add whatever code you like in here, you can also declare
8 # new subroutines in addition to the ones here, include other packages
9 # or do whatever you like. This is your spring board.
10 #
11
12 package Local;
13
14 use DXVars;
15 use DXDebug;
16 use DXUtil;
17
18 # DON'T REMOVE THIS LINE
19 use strict;
20
21
22 # declare any global variables you use in here
23 use vars qw{ };
24
25 # called at initialisation time
26 #sub init
27 #{
28 #
29 #}
30
31 # called once every second
32 #sub process
33 #{
34 #
35 #}
36
37 # called just before the ending of the program
38 #sub finish
39 #{
40 #
41 #}
42
43 # called after an incoming PC line has been split up, return 0 if you want to
44 # continue and 1 if you wish the PC Protocol line to be ignored completely
45 #
46 # Parameters:-
47 # $self      - the DXChannel object
48 # $pcno      - the no of the PC field
49 # $line      - the actual incoming line with its hop count already decremented
50 # @field     - the spot exactly as is, split up into fields
51 #              $field[0] will be PC11 or PC26
52 #sub pcprot
53 #{
54
55 #       my ($self, $pcno, $line, @field) = @_;
56
57         # take out any switches that aren't interesting to you.
58 # SWITCH: {
59 #               if ($pcno == 10) {              # incoming talk
60 #                       last SWITCH;
61 #               }
62
63 #               if ($pcno == 11 || $pcno == 26) { # dx spot
64 #                       last SWITCH;
65 #               }
66
67 #               if ($pcno == 12) {              # announces
68 #                       last SWITCH;
69 #               }
70
71 #               if ($pcno == 13) {
72 #                       last SWITCH;
73 #               }
74 #               if ($pcno == 14) {
75 #                       last SWITCH;
76 #               }
77 #               if ($pcno == 15) {
78 #                       last SWITCH;
79 #               }
80
81 #               if ($pcno == 16) {              # add a user
82 #                       last SWITCH;
83 #               }
84
85 #               if ($pcno == 17) {              # remove a user
86 #                       last SWITCH;
87 #               }
88
89 #               if ($pcno == 18) {              # link request
90 #                       last SWITCH;
91 #               }
92
93 #               if ($pcno == 19) {              # incoming cluster list
94 #                       last SWITCH;
95 #               }
96
97 #               if ($pcno == 20) {              # send local configuration
98 #                       last SWITCH;
99 #               }
100
101 #               if ($pcno == 21) {              # delete a cluster from the list
102 #                       last SWITCH;
103 #               }
104
105 #               if ($pcno == 22) {
106 #                       last SWITCH;
107 #               }
108
109 #               if ($pcno == 23 || $pcno == 27) { # WWV info
110 #                       last SWITCH;
111 #               }
112
113 #               if ($pcno == 24) {              # set here status
114 #                       last SWITCH;
115 #               }
116
117 #               if ($pcno == 25) {      # merge request
118 #                       last SWITCH;
119 #               }
120
121 #               if (($pcno >= 28 && $pcno <= 33) || $pcno == 40 || $pcno == 42 || $pcno == 49) { # mail/file handling
122 #                       last SWITCH;
123 #               }
124
125 #               if ($pcno == 34 || $pcno == 36) { # remote commands (incoming)
126 #                       last SWITCH;
127 #               }
128
129 #               if ($pcno == 35) {              # remote command replies
130 #                       last SWITCH;
131 #               }
132
133 #               if ($pcno == 37) {
134 #                       last SWITCH;
135 #               }
136
137 #               if ($pcno == 38) {              # node connected list from neighbour
138 #                       last SWITCH;
139 #               }
140
141 #               if ($pcno == 39) {              # incoming disconnect
142 #                       last SWITCH;
143 #               }
144
145 #               if ($pcno == 41) {              # user info
146 #                       last SWITCH;
147 #               }
148 #               if ($pcno == 43) {
149 #                       last SWITCH;
150 #               }
151 #               if ($pcno == 44) {
152 #                       last SWITCH;
153 #               }
154 #               if ($pcno == 45) {
155 #                       last SWITCH;
156 #               }
157 #               if ($pcno == 46) {
158 #                       last SWITCH;
159 #               }
160 #               if ($pcno == 47) {
161 #                       last SWITCH;
162 #               }
163 #               if ($pcno == 48) {
164 #                       last SWITCH;
165 #               }
166
167 #               if ($pcno == 50) {              # keep alive/user list
168 #                       last SWITCH;
169 #               }
170
171 #               if ($pcno == 51) {              # incoming ping requests/answers
172 #                       last SWITCH;
173 #               }
174 #       }
175 #       return 0;
176 #}
177
178 # called after the spot has been stored but before it is broadcast,
179 # you can do funky routing here that is non-standard. 0 carries on
180 # after this, 1 stops dead and no routing is done (this could mean
181 # that YOU have done some routing or other instead
182 #
183 # Parameters:-
184 # $self      - the DXChannel object
185 # $freq      - frequency
186 # $spotted   - the spotted callsign
187 # $d         - the date in unix time format
188 # $text      - the text of the spot
189 # $spotter   - who spotted it
190 # $orignode  - the originating node
191 #
192 #sub spot
193 #{
194 #       return 0;
195 #}
196
197 # called after the announce has been stored but before it is broadcast,
198 # you can do funky routing here that is non-standard. 0 carries on
199 # after this, 1 stops dead and no routing is done (this could mean
200 # that YOU have done some routing or other instead
201 #
202 # Parameters:-
203 # $self      - the DXChannel object
204 # $line      - the input PC12 line
205 # $announcer - the call that announced this
206 # $via       - the destination * = everywhere, callsign - just to that node
207 # $text      - the text of the chat
208 # $flag      - ' ' - normal announce, * - SYSOP, else CHAT group
209 # $origin    - originating node
210 # $wx        - 0 - normal, 1 - WX
211 #sub ann
212 #{
213 #       return 0;
214 #}
215
216
217 # called after the wwv has been stored but before it is broadcast,
218 # you can do funky routing here that is non-standard. 0 carries on
219 # after this, 1 stops dead and no routing is done (this could mean
220 # that YOU have done some routing or other instead
221 #
222 # Parameters:-
223 # $self      - the DXChannel object
224 # The rest the same as for Geomag::update
225 #sub wwv
226 #{
227 #       return 0;
228 #}
229
230 # same for wcy broadcasts
231 #sub wcy
232 #{
233 #       return 0;
234 #}
235
236 # no idea what or when these are called yet
237 #sub userstart
238 #{
239 #       return 0;
240 #}
241
242 #sub userline
243 #{
244 #       return 0;
245 #}
246
247 #sub userfinish
248 #{
249 #       return 0;
250 #}
251 1;
252 __END__