/[cvs]/eggdrop1.8/src/tclhash.c
ViewVC logotype

Diff of /eggdrop1.8/src/tclhash.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by simple, Mon Jul 26 21:11:06 2010 UTC revision 1.2 by pseudo, Tue Oct 19 12:13:33 2010 UTC
# Line 42  p_tcl_bind_list bind_table_list; Line 42  p_tcl_bind_list bind_table_list;
42  p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof, H_load, H_unld, H_link,  p_tcl_bind_list H_chat, H_act, H_bcst, H_chon, H_chof, H_load, H_unld, H_link,
43                  H_disc, H_dcc, H_chjn, H_chpt, H_bot, H_time, H_nkch, H_away,                  H_disc, H_dcc, H_chjn, H_chpt, H_bot, H_time, H_nkch, H_away,
44                  H_note, H_filt, H_event, H_cron, H_log = NULL;                  H_note, H_filt, H_event, H_cron, H_log = NULL;
45    #ifdef TLS
46    p_tcl_bind_list H_tls = NULL;
47    static int builtin_idx();
48    #endif
49    
50  static int builtin_2char();  static int builtin_2char();
51  static int builtin_3char();  static int builtin_3char();
# Line 238  void init_bind(void) Line 242  void init_bind(void)
242    H_act = add_bind_table("act", HT_STACKABLE, builtin_chat);    H_act = add_bind_table("act", HT_STACKABLE, builtin_chat);
243    H_event = add_bind_table("evnt", HT_STACKABLE, builtin_char);    H_event = add_bind_table("evnt", HT_STACKABLE, builtin_char);
244    H_log = add_bind_table("log", HT_STACKABLE, builtin_log);    H_log = add_bind_table("log", HT_STACKABLE, builtin_log);
245    #ifdef TLS
246      H_tls = add_bind_table("tls", HT_STACKABLE, builtin_idx);
247    #endif
248    add_builtins(H_dcc, C_dcc);    add_builtins(H_dcc, C_dcc);
249    Context;    Context;
250  }  }
# Line 687  static int builtin_log STDVAR Line 694  static int builtin_log STDVAR
694    return TCL_OK;    return TCL_OK;
695  }  }
696    
697    #ifdef TLS
698    static int builtin_idx STDVAR
699    {
700      Function F = (Function) cd;
701    
702      BADARGS(2, 2, " idx");
703    
704      CHECKVALIDITY(builtin_idx);
705      F(atoi(argv[1]));
706      return TCL_OK;
707    }
708    #endif
709    
710  /* Trigger (execute) a Tcl proc  /* Trigger (execute) a Tcl proc
711   *   *
712   * Note: This is INLINE code for check_tcl_bind().   * Note: This is INLINE code for check_tcl_bind().
# Line 1178  void check_tcl_log(int lv, char *chan, c Line 1198  void check_tcl_log(int lv, char *chan, c
1198                   MATCH_MASK | BIND_STACKABLE);                   MATCH_MASK | BIND_STACKABLE);
1199  }  }
1200    
1201    #ifdef TLS
1202    int check_tcl_tls(int sock)
1203    {
1204      int x;
1205      char s[11];
1206    
1207      egg_snprintf(s, sizeof s, "%d", sock);
1208      Tcl_SetVar(interp, "_tls", s, 0);
1209      x = check_tcl_bind(H_tls, s, 0, " $_tls", MATCH_MASK | BIND_STACKABLE |
1210                         BIND_WANTRET);
1211      return (x == BIND_EXEC_LOG);
1212    }
1213    #endif
1214    
1215  void tell_binds(int idx, char *par)  void tell_binds(int idx, char *par)
1216  {  {
1217    tcl_bind_list_t *tl, *tl_kind;    tcl_bind_list_t *tl, *tl_kind;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23