equal
deleted
inserted
replaced
1 # vim: set et nosta sw=4 ts=4 : |
1 # vim: set et nosta sw=4 ts=4 : |
2 # |
2 # |
3 # Copyright (c) 2018-2020, Mahlon E. Smith <mahlon@martini.nu> |
3 # Copyright (c) 2018-2021, Mahlon E. Smith <mahlon@martini.nu> |
4 # All rights reserved. |
4 # All rights reserved. |
5 # Redistribution and use in source and binary forms, with or without |
5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are met: |
6 # modification, are permitted provided that the following conditions are met: |
7 # |
7 # |
8 # * Redistributions of source code must retain the above copyright |
8 # * Redistributions of source code must retain the above copyright |
29 |
29 |
30 |
30 |
31 import |
31 import |
32 db_postgres, |
32 db_postgres, |
33 json, |
33 json, |
34 math, |
|
35 nativesockets, |
34 nativesockets, |
36 net, |
35 net, |
37 parseopt, |
36 parseopt, |
38 posix, |
37 posix, |
|
38 std/exitprocs, |
39 strutils, |
39 strutils, |
40 strformat, |
40 strformat, |
41 tables, |
41 tables, |
42 terminal, |
42 terminal, |
43 times |
43 times |
380 |
380 |
381 of cmdEnd: assert( false ) # shouldn't reach here ever |
381 of cmdEnd: assert( false ) # shouldn't reach here ever |
382 |
382 |
383 |
383 |
384 when isMainModule: |
384 when isMainModule: |
385 system.addQuitProc( resetAttributes ) |
385 addExitProc( resetAttributes ) |
386 conf = parse_cmdline() |
386 conf = parse_cmdline() |
387 if conf.debug: echo hl( $conf, fgYellow ) |
387 if conf.debug: echo hl( $conf, fgYellow ) |
388 serverloop( conf ) |
388 serverloop( conf ) |
389 |
389 |