~ubuntu-branches/ubuntu/oneiric/eggdrop/oneiric

« back to all changes in this revision

Viewing changes to src/tclmisc.c

  • Committer: Bazaar Package Importer
  • Author(s): Guilherme de S. Pastore
  • Date: 2004-06-17 09:15:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040617091528-64rrw1sa33lkfhmh
Tags: 1.6.16-2
* Fixed typo on README.Debian
* Fixed hyphens in manual page
* Converted debian/rules to CDBS
* Set path to binary on example config file
* Changed LANGDIR on src/eggdrop.h (Closes: #254824)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * tclmisc.c -- handles:
3
3
 *   Tcl stubs for everything else
4
4
 *
5
 
 * $Id: tclmisc.c,v 1.29 2002/01/02 03:46:36 guppy Exp $
 
5
 * $Id: tclmisc.c,v 1.50 2004/05/26 00:20:19 wcc Exp $
6
6
 */
7
7
/*
8
8
 * Copyright (C) 1997 Robey Pointer
9
 
 * Copyright (C) 1999, 2000, 2001, 2002 Eggheads Development Team
 
9
 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eggheads Development Team
10
10
 *
11
11
 * This program is free software; you can redistribute it and/or
12
12
 * modify it under the terms of the GNU General Public License
23
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
24
 */
25
25
 
26
 
#include <sys/stat.h>
27
26
#include "main.h"
28
27
#include "modules.h"
29
28
#include "tandem.h"
30
29
#include "md5/md5.h"
 
30
#ifdef TIME_WITH_SYS_TIME
 
31
# include <sys/time.h>
 
32
# include <time.h>
 
33
#else
 
34
# ifdef HAVE_SYS_TIME_H
 
35
#  include <sys/time.h>
 
36
# else
 
37
#  include <time.h>
 
38
# endif
 
39
#endif
 
40
#include <sys/stat.h>
31
41
#ifdef HAVE_UNAME
32
42
#include <sys/utsname.h>
33
43
#endif
34
44
 
35
 
extern p_tcl_bind_list   bind_table_list;
36
 
extern tcl_timer_t      *timer, *utimer;
37
 
extern struct dcc_t     *dcc;
38
 
extern char              origbotname[], botnetnick[], quit_msg[];
39
 
extern struct userrec   *userlist;
40
 
extern time_t            now;
41
 
extern module_entry     *module_list;
 
45
extern p_tcl_bind_list bind_table_list;
 
46
extern tcl_timer_t *timer, *utimer;
 
47
extern struct dcc_t *dcc;
 
48
extern char origbotname[], botnetnick[], quit_msg[];
 
49
extern struct userrec *userlist;
 
50
extern time_t now;
 
51
extern module_entry *module_list;
42
52
extern int max_logs;
43
53
extern log_t *logs;
44
54
extern Tcl_Interp *interp;
66
76
  char s[151];
67
77
 
68
78
  BADARGS(1, 4, " ?logModes channel logFile?");
 
79
 
69
80
  if (argc == 1) {
70
81
    /* They just want a list of the logfiles and modes */
71
82
    for (i = 0; i < max_logs; i++)
72
83
      if (logs[i].filename != NULL) {
73
 
        strcpy(s, masktype(logs[i].mask));
74
 
        strcat(s, " ");
75
 
        strcat(s, logs[i].chname);
76
 
        strcat(s, " ");
77
 
        strcat(s, logs[i].filename);
78
 
        Tcl_AppendElement(interp, s);
 
84
        strcpy(s, masktype(logs[i].mask));
 
85
        strcat(s, " ");
 
86
        strcat(s, logs[i].chname);
 
87
        strcat(s, " ");
 
88
        strcat(s, logs[i].filename);
 
89
        Tcl_AppendElement(interp, s);
79
90
      }
80
 
    return TCL_OK;
 
91
      return TCL_OK;
81
92
  }
 
93
 
82
94
  BADARGS(4, 4, " ?logModes channel logFile?");
 
95
 
83
96
  for (i = 0; i < max_logs; i++)
84
97
    if ((logs[i].filename != NULL) && (!strcmp(logs[i].filename, argv[3]))) {
85
98
      logs[i].flags &= ~LF_EXPIRING;
87
100
      nfree(logs[i].chname);
88
101
      logs[i].chname = NULL;
89
102
      if (!logs[i].mask) {
90
 
        /* ending logfile */
91
 
        nfree(logs[i].filename);
92
 
        logs[i].filename = NULL;
93
 
        if (logs[i].f != NULL) {
94
 
          fclose(logs[i].f);
95
 
          logs[i].f = NULL;
96
 
        }
 
103
        /* ending logfile */
 
104
        nfree(logs[i].filename);
 
105
        logs[i].filename = NULL;
 
106
        if (logs[i].f != NULL) {
 
107
          fclose(logs[i].f);
 
108
          logs[i].f = NULL;
 
109
        }
97
110
        logs[i].flags = 0;
98
111
      } else {
99
 
        logs[i].chname = (char *) nmalloc(strlen(argv[2]) + 1);
100
 
        strcpy(logs[i].chname, argv[2]);
 
112
        logs[i].chname = (char *) nmalloc(strlen(argv[2]) + 1);
 
113
        strcpy(logs[i].chname, argv[2]);
101
114
      }
102
115
      Tcl_AppendResult(interp, argv[3], NULL);
103
116
      return TCL_OK;
104
117
    }
105
118
  /* Do not add logfiles without any flags to log ++rtc */
106
 
  if (!logmodes (argv [1])) {
107
 
    Tcl_AppendResult (interp, "can't remove \"", argv[3],
 
119
  if (!logmodes(argv[1])) {
 
120
    Tcl_AppendResult(interp, "can't remove \"", argv[3],
108
121
                     "\" from list: no such logfile", NULL);
109
122
    return TCL_ERROR;
110
123
  }
128
141
  char logtext[501];
129
142
 
130
143
  BADARGS(2, 2, " text");
 
144
 
131
145
  strncpyz(logtext, argv[1], sizeof logtext);
132
146
  putlog(LOG_MISC, "*", "%s", logtext);
133
147
  return TCL_OK;
138
152
  char logtext[501];
139
153
 
140
154
  BADARGS(2, 2, " text");
 
155
 
141
156
  strncpyz(logtext, argv[1], sizeof logtext);
142
157
  putlog(LOG_CMDS, "*", "%s", logtext);
143
158
  return TCL_OK;
148
163
  char logtext[501];
149
164
 
150
165
  BADARGS(2, 2, " text");
 
166
 
151
167
  strncpyz(logtext, argv[1], sizeof logtext);
152
168
  putlog(LOG_FILES, "*", "%s", logtext);
153
169
  return TCL_OK;
159
175
  char logtext[501];
160
176
 
161
177
  BADARGS(4, 4, " level channel text");
 
178
 
162
179
  lev = logmodes(argv[1]);
163
180
  if (!lev) {
164
181
    Tcl_AppendResult(irp, "No valid log-level given", NULL);
165
182
    return TCL_ERROR;
166
183
  }
167
184
  strncpyz(logtext, argv[3], sizeof logtext);
 
185
 
168
186
  putlog(lev, argv[2], "%s", logtext);
169
187
  return TCL_OK;
170
188
}
171
189
 
172
190
static int tcl_binds STDVAR
173
191
{
174
 
  tcl_bind_list_t       *tl, *tl_kind;
175
 
  tcl_bind_mask_t       *tm;
176
 
  tcl_cmd_t             *tc;
177
 
  char                  *list[5], *g, flg[100], hits[11];
178
 
  int                    matching = 0;
 
192
  int matching = 0;
 
193
  char *g, flg[100], hits[11];
 
194
  EGG_CONST char *list[5];
 
195
  tcl_bind_list_t *tl, *tl_kind;
 
196
  tcl_bind_mask_t *tm;
 
197
  tcl_cmd_t *tc;
179
198
 
180
199
  BADARGS(1, 2, " ?type/mask?");
 
200
 
181
201
  if (argv[1])
182
202
    tl_kind = find_bind_table(argv[1]);
183
203
  else
190
210
      continue;
191
211
    for (tm = tl->first; tm; tm = tm->next) {
192
212
      if (tm->flags & TBM_DELETED)
193
 
        continue;
 
213
        continue;
194
214
      for (tc = tm->first; tc; tc = tc->next) {
195
 
        if (tc->attributes & TC_DELETED)
196
 
          continue;
 
215
        if (tc->attributes & TC_DELETED)
 
216
          continue;
197
217
        if (matching &&
198
 
            !wild_match(argv[1], tl->name) &&
199
 
            !wild_match(argv[1], tm->mask) &&
200
 
            !wild_match(argv[1], tc->func_name))
 
218
            !wild_match_per(argv[1], tl->name) &&
 
219
            !wild_match_per(argv[1], tm->mask) &&
 
220
            !wild_match_per(argv[1], tc->func_name))
201
221
          continue;
202
 
        build_flags(flg, &(tc->flags), NULL);
 
222
        build_flags(flg, &(tc->flags), NULL);
203
223
        egg_snprintf(hits, sizeof hits, "%i", (int) tc->hits);
204
224
        list[0] = tl->name;
205
225
        list[1] = flg;
221
241
  char s[16];
222
242
 
223
243
  BADARGS(3, 3, " minutes command");
 
244
 
224
245
  if (atoi(argv[1]) < 0) {
225
246
    Tcl_AppendResult(irp, "time value must be positive", NULL);
226
247
    return TCL_ERROR;
239
260
  char s[16];
240
261
 
241
262
  BADARGS(3, 3, " seconds command");
 
263
 
242
264
  if (atoi(argv[1]) < 0) {
243
265
    Tcl_AppendResult(irp, "time value must be positive", NULL);
244
266
    return TCL_ERROR;
254
276
static int tcl_killtimer STDVAR
255
277
{
256
278
  BADARGS(2, 2, " timerID");
 
279
 
257
280
  if (strncmp(argv[1], "timer", 5)) {
258
281
    Tcl_AppendResult(irp, "argument is not a timerID", NULL);
259
282
    return TCL_ERROR;
267
290
static int tcl_killutimer STDVAR
268
291
{
269
292
  BADARGS(2, 2, " timerID");
 
293
 
270
294
  if (strncmp(argv[1], "timer", 5)) {
271
295
    Tcl_AppendResult(irp, "argument is not a timerID", NULL);
272
296
    return TCL_ERROR;
280
304
static int tcl_timers STDVAR
281
305
{
282
306
  BADARGS(1, 1, "");
 
307
 
283
308
  list_timers(irp, timer);
284
309
  return TCL_OK;
285
310
}
287
312
static int tcl_utimers STDVAR
288
313
{
289
314
  BADARGS(1, 1, "");
 
315
 
290
316
  list_timers(irp, utimer);
291
317
  return TCL_OK;
292
318
}
297
323
  unsigned long sec, tmp;
298
324
 
299
325
  BADARGS(2, 2, " seconds");
 
326
 
300
327
  if (atol(argv[1]) <= 0) {
301
328
    Tcl_AppendResult(irp, "0 seconds", NULL);
302
329
    return TCL_OK;
303
330
  }
304
331
  sec = atol(argv[1]);
 
332
 
305
333
  s[0] = 0;
306
334
  if (sec >= 31536000) {
307
335
    tmp = (sec / 31536000);
332
360
    tmp = (sec);
333
361
    sprintf(&s[strlen(s)], "%lu second%s", tmp, (tmp == 1) ? "" : "s");
334
362
  }
 
363
  if (strlen(s) > 0 && s[strlen(s) - 1] == ' ')
 
364
    s[strlen(s) - 1] = 0;
335
365
  Tcl_AppendResult(irp, s, NULL);
336
366
  return TCL_OK;
337
367
}
339
369
static int tcl_unixtime STDVAR
340
370
{
341
371
  char s[11];
 
372
  time_t now2 = time(NULL);
342
373
 
343
374
  BADARGS(1, 1, "");
344
 
  egg_snprintf(s, sizeof s, "%lu", (unsigned long) now);
 
375
 
 
376
  egg_snprintf(s, sizeof s, "%lu", (unsigned long) now2);
345
377
  Tcl_AppendResult(irp, s, NULL);
346
378
  return TCL_OK;
347
379
}
352
384
  char s[25];
353
385
 
354
386
  BADARGS(2, 2, " unixtime");
 
387
 
355
388
  tt = (time_t) atol(argv[1]);
356
389
  strncpyz(s, ctime(&tt), sizeof s);
357
390
  Tcl_AppendResult(irp, s, NULL);
365
398
  time_t t;
366
399
 
367
400
  BADARGS(2, 3, " format ?time?");
 
401
 
368
402
  if (argc == 3)
369
403
    t = atol(argv[2]);
370
404
  else
371
405
    t = now;
372
 
    tm1 = localtime(&t);
 
406
  tm1 = localtime(&t);
373
407
  if (egg_strftime(buf, sizeof(buf) - 1, argv[1], tm1)) {
374
408
    Tcl_AppendResult(irp, buf, NULL);
375
409
    return TCL_OK;
383
417
  char s[16];
384
418
 
385
419
  BADARGS(1, 1, "");
 
420
 
386
421
  egg_snprintf(s, sizeof s, "%lu", iptolong(getmyip()));
387
422
  Tcl_AppendResult(irp, s, NULL);
388
423
  return TCL_OK;
394
429
  char s[11];
395
430
 
396
431
  BADARGS(2, 2, " limit");
 
432
 
397
433
  if (atol(argv[1]) <= 0) {
398
434
    Tcl_AppendResult(irp, "random limit must be greater than zero", NULL);
399
435
    return TCL_ERROR;
400
436
  }
401
 
  x = random() % (atol(argv[1]));
 
437
 
 
438
  x = randint((unsigned long) (atol(argv[1])));
 
439
 
402
440
  egg_snprintf(s, sizeof s, "%lu", x);
403
441
  Tcl_AppendResult(irp, s, NULL);
404
442
  return TCL_OK;
409
447
  char s[5], from[NOTENAMELEN + 1], to[NOTENAMELEN + 1], msg[451];
410
448
 
411
449
  BADARGS(4, 4, " from to message");
 
450
 
412
451
  strncpyz(from, argv[1], sizeof from);
413
452
  strncpyz(to, argv[2], sizeof to);
414
453
  strncpyz(msg, argv[3], sizeof msg);
420
459
static int tcl_dumpfile STDVAR
421
460
{
422
461
  char nick[NICKLEN];
423
 
  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
 
462
  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
424
463
 
425
464
  BADARGS(3, 3, " nickname filename");
 
465
 
426
466
  strncpyz(nick, argv[1], sizeof nick);
427
467
  get_user_flagrec(get_user_by_nick(nick), &fr, NULL);
428
468
  showhelp(argv[1], argv[2], &fr, HELP_TEXT);
432
472
static int tcl_dccdumpfile STDVAR
433
473
{
434
474
  int idx, i;
435
 
  struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
 
475
  struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0 };
436
476
 
437
477
  BADARGS(3, 3, " idx filename");
 
478
 
438
479
  i = atoi(argv[1]);
439
480
  idx = findidx(i);
440
481
  if (idx < 0) {
442
483
    return TCL_ERROR;
443
484
  }
444
485
  get_user_flagrec(get_user_by_handle(userlist, dcc[idx].nick), &fr, NULL);
 
486
 
445
487
  tellhelp(idx, argv[2], &fr, HELP_TEXT);
446
488
  return TCL_OK;
447
489
}
449
491
static int tcl_backup STDVAR
450
492
{
451
493
  BADARGS(1, 1, "");
 
494
 
452
495
  call_hook(HOOK_BACKUP);
453
496
  return TCL_OK;
454
497
}
458
501
  char s[1024];
459
502
 
460
503
  BADARGS(1, 2, " ?reason?");
 
504
 
461
505
  if (argc == 2) {
462
506
    egg_snprintf(s, sizeof s, "BOT SHUTDOWN (%s)", argv[1]);
463
507
    strncpyz(quit_msg, argv[1], 1024);
474
518
  const char *p;
475
519
 
476
520
  BADARGS(2, 2, " module-name");
 
521
 
477
522
  p = module_load(argv[1]);
478
523
  if (p && strcmp(p, MOD_ALREADYLOAD) && !strcmp(argv[0], "loadmodule"))
479
524
    putlog(LOG_MISC, "*", "%s %s: %s", MOD_CANTLOADMOD, argv[1], p);
484
529
static int tcl_unloadmodule STDVAR
485
530
{
486
531
  BADARGS(2, 2, " module-name");
 
532
 
487
533
  Tcl_AppendResult(irp, module_unload(argv[1], botnetnick), NULL);
488
534
  return TCL_OK;
489
535
}
510
556
 
511
557
static int tcl_modules STDVAR
512
558
{
 
559
  int i;
 
560
  char *p, s[24], s2[24];
 
561
  EGG_CONST char *list[100], *list2[2];
 
562
  dependancy *dep;
513
563
  module_entry *current;
514
 
  dependancy *dep;
515
 
  char *list[100], *list2[2], *p;
516
 
  char s[24], s2[24];
517
 
  int i;
518
564
 
519
565
  BADARGS(1, 1, "");
 
566
 
520
567
  for (current = module_list; current; current = current->next) {
521
568
    list[0] = current->name;
522
569
    egg_snprintf(s, sizeof s, "%d.%d", current->major, current->minor);
524
571
    i = 2;
525
572
    for (dep = dependancy_list; dep && (i < 100); dep = dep->next) {
526
573
      if (dep->needing == current) {
527
 
        list2[0] = dep->needed->name;
528
 
        egg_snprintf(s2, sizeof s2, "%d.%d", dep->major, dep->minor);
529
 
        list2[1] = s2;
530
 
        list[i] = Tcl_Merge(2, list2);
531
 
        i++;
 
574
        list2[0] = dep->needed->name;
 
575
        egg_snprintf(s2, sizeof s2, "%d.%d", dep->major, dep->minor);
 
576
        list2[1] = s2;
 
577
        list[i] = Tcl_Merge(2, list2);
 
578
        i++;
532
579
      }
533
580
    }
534
581
    p = Tcl_Merge(i, list);
545
592
static int tcl_loadhelp STDVAR
546
593
{
547
594
  BADARGS(2, 2, " helpfile-name");
 
595
 
548
596
  add_help_reference(argv[1]);
549
597
  return TCL_OK;
550
598
}
552
600
static int tcl_unloadhelp STDVAR
553
601
{
554
602
  BADARGS(2, 2, " helpfile-name");
 
603
 
555
604
  rem_help_reference(argv[1]);
556
605
  return TCL_OK;
557
606
}
559
608
static int tcl_reloadhelp STDVAR
560
609
{
561
610
  BADARGS(1, 1, "");
 
611
 
562
612
  reload_help_data();
563
613
  return TCL_OK;
564
614
}
566
616
static int tcl_callevent STDVAR
567
617
{
568
618
  BADARGS(2, 2, " event");
 
619
 
569
620
  check_tcl_event(argv[1]);
570
621
  return TCL_OK;
571
622
}
572
623
 
573
 
#if (TCL_MAJOR_VERSION >= 8)
 
624
#ifdef USE_TCL_OBJ
574
625
static int tcl_md5(cd, irp, objc, objv)
575
626
ClientData cd;
576
627
Tcl_Interp *irp;
580
631
#else
581
632
static int tcl_md5 STDVAR
582
633
{
583
 
#endif
584
 
  MD5_CTX       md5context;
 
634
#endif /* USE_TCL_OBJ */
 
635
  MD5_CTX md5context;
585
636
  char digest_string[33], *string;
586
637
  unsigned char digest[16];
587
638
  int i, len;
588
639
 
589
 
#if (TCL_MAJOR_VERSION >= 8)
 
640
#ifdef USE_TCL_OBJ
590
641
  if (objc != 2) {
591
642
    Tcl_WrongNumArgs(irp, 1, objv, "string");
592
643
    return TCL_ERROR;
593
644
  }
594
 
 
595
 
#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 1)
 
645
#  ifdef USE_TCL_BYTE_ARRAYS
 
646
  string = (unsigned char *)Tcl_GetByteArrayFromObj(objv[1], &len);
 
647
#  else
596
648
  string = Tcl_GetStringFromObj(objv[1], &len);
597
 
#else
598
 
  string = Tcl_GetByteArrayFromObj(objv[1], &len);
599
 
#endif
600
 
 
601
 
#else
 
649
#  endif /* USE_TCL_BYTE_ARRAYS */
 
650
#else /* USE_TCL_OBJ */
602
651
  BADARGS(2, 2, " string");
 
652
 
603
653
  string = argv[1];
604
654
  len = strlen(argv[1]);
605
 
#endif
 
655
#endif /* USE_TCL_OBJ */
606
656
 
607
657
  MD5_Init(&md5context);
608
 
  MD5_Update(&md5context, (unsigned char *)string, len);
 
658
  MD5_Update(&md5context, (unsigned char *) string, len);
609
659
  MD5_Final(digest, &md5context);
610
 
  for(i=0; i<16; i++)
611
 
    sprintf(digest_string + (i*2), "%.2x", digest[i]);
 
660
  for (i = 0; i < 16; i++)
 
661
    sprintf(digest_string + (i * 2), "%.2x", digest[i]);
612
662
  Tcl_AppendResult(irp, digest_string, NULL);
613
663
  return TCL_OK;
614
664
}
615
665
 
616
 
tcl_cmds tclmisc_objcmds[] =
617
 
{
618
 
#if (TCL_MAJOR_VERSION >= 8)
619
 
  {"md5",       tcl_md5},
620
 
#endif
621
 
  {NULL,        NULL}
 
666
tcl_cmds tclmisc_objcmds[] = {
 
667
#ifdef USE_TCL_OBJ
 
668
  {"md5", tcl_md5},
 
669
#endif /* USE_TCL_OBJ */
 
670
  {NULL,     NULL}
622
671
};
623
672
 
624
 
tcl_cmds tclmisc_cmds[] =
625
 
{
 
673
tcl_cmds tclmisc_cmds[] = {
626
674
  {"logfile",           tcl_logfile},
627
 
  {"putlog",            tcl_putlog},
628
 
  {"putcmdlog",         tcl_putcmdlog},
629
 
  {"putxferlog",        tcl_putxferlog},
630
 
  {"putloglev",         tcl_putloglev},
631
 
  {"timer",             tcl_timer},
632
 
  {"utimer",            tcl_utimer},
633
 
  {"killtimer",         tcl_killtimer},
634
 
  {"killutimer",        tcl_killutimer},
635
 
  {"timers",            tcl_timers},
636
 
  {"utimers",           tcl_utimers},
637
 
  {"unixtime",          tcl_unixtime},
638
 
  {"strftime",          tcl_strftime},
639
 
  {"ctime",             tcl_ctime},
640
 
  {"myip",              tcl_myip},
641
 
  {"rand",              tcl_rand},
642
 
  {"sendnote",          tcl_sendnote},
643
 
  {"dumpfile",          tcl_dumpfile},
644
 
  {"dccdumpfile",       tcl_dccdumpfile},
645
 
  {"backup",            tcl_backup},
646
 
  {"exit",              tcl_die},
647
 
  {"die",               tcl_die},
648
 
  {"unames",            tcl_unames},
649
 
  {"unloadmodule",      tcl_unloadmodule},
650
 
  {"loadmodule",        tcl_loadmodule},
651
 
  {"checkmodule",       tcl_loadmodule},
652
 
  {"modules",           tcl_modules},
653
 
  {"loadhelp",          tcl_loadhelp},
654
 
  {"unloadhelp",        tcl_unloadhelp},
655
 
  {"reloadhelp",        tcl_reloadhelp},
656
 
  {"duration",          tcl_duration},
657
 
#if (TCL_MAJOR_VERSION < 8)
658
 
  {"md5",               tcl_md5},
659
 
#endif
660
 
  {"binds",             tcl_binds},
661
 
  {"callevent",         tcl_callevent},
662
 
  {NULL,                NULL}
 
675
  {"putlog",             tcl_putlog},
 
676
  {"putcmdlog",       tcl_putcmdlog},
 
677
  {"putxferlog",     tcl_putxferlog},
 
678
  {"putloglev",       tcl_putloglev},
 
679
  {"timer",               tcl_timer},
 
680
  {"utimer",             tcl_utimer},
 
681
  {"killtimer",       tcl_killtimer},
 
682
  {"killutimer",     tcl_killutimer},
 
683
  {"timers",             tcl_timers},
 
684
  {"utimers",           tcl_utimers},
 
685
  {"unixtime",         tcl_unixtime},
 
686
  {"strftime",         tcl_strftime},
 
687
  {"ctime",               tcl_ctime},
 
688
  {"myip",                 tcl_myip},
 
689
  {"rand",                 tcl_rand},
 
690
  {"sendnote",         tcl_sendnote},
 
691
  {"dumpfile",         tcl_dumpfile},
 
692
  {"dccdumpfile",   tcl_dccdumpfile},
 
693
  {"backup",             tcl_backup},
 
694
  {"exit",                  tcl_die},
 
695
  {"die",                   tcl_die},
 
696
  {"unames",             tcl_unames},
 
697
  {"unloadmodule", tcl_unloadmodule},
 
698
  {"loadmodule",     tcl_loadmodule},
 
699
  {"checkmodule",    tcl_loadmodule},
 
700
  {"modules",           tcl_modules},
 
701
  {"loadhelp",         tcl_loadhelp},
 
702
  {"unloadhelp",     tcl_unloadhelp},
 
703
  {"reloadhelp",     tcl_reloadhelp},
 
704
  {"duration",         tcl_duration},
 
705
#ifndef USE_TCL_OBJ
 
706
  {"md5",                   tcl_md5},
 
707
#endif /* USE_TCL_OBJ */
 
708
  {"binds",               tcl_binds},
 
709
  {"callevent",       tcl_callevent},
 
710
  {NULL,                       NULL}
663
711
};