/[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.2 by pseudo, Tue Oct 19 12:13:33 2010 UTC revision 1.3 by pseudo, Sat Oct 23 11:16:13 2010 UTC
# Line 41  extern time_t now; Line 41  extern time_t now;
41  p_tcl_bind_list bind_table_list;  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_die, H_cron, H_log = NULL;
45  #ifdef TLS  #ifdef TLS
46  p_tcl_bind_list H_tls = NULL;  p_tcl_bind_list H_tls = NULL;
47  static int builtin_idx();  static int builtin_idx();
# Line 241  void init_bind(void) Line 241  void init_bind(void)
241    H_away = add_bind_table("away", HT_STACKABLE, builtin_chat);    H_away = add_bind_table("away", HT_STACKABLE, builtin_chat);
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_die = add_bind_table("die", HT_STACKABLE, builtin_char);
245    H_log = add_bind_table("log", HT_STACKABLE, builtin_log);    H_log = add_bind_table("log", HT_STACKABLE, builtin_log);
246  #ifdef TLS  #ifdef TLS
247    H_tls = add_bind_table("tls", HT_STACKABLE, builtin_idx);    H_tls = add_bind_table("tls", HT_STACKABLE, builtin_idx);
# Line 1180  void check_tcl_cron(struct tm *tm) Line 1181  void check_tcl_cron(struct tm *tm)
1181                   MATCH_CRON | BIND_STACKABLE);                   MATCH_CRON | BIND_STACKABLE);
1182  }  }
1183    
1184  void check_tcl_event(const char *event)  int check_tcl_event(const char *event)
1185  {  {
1186      int x;
1187    
1188    Tcl_SetVar(interp, "_event1", (char *) event, 0);    Tcl_SetVar(interp, "_event1", (char *) event, 0);
1189    check_tcl_bind(H_event, event, 0, " $_event1", MATCH_EXACT | BIND_STACKABLE);    x = check_tcl_bind(H_event, event, 0, " $_event1",
1190                     MATCH_EXACT | BIND_STACKABLE | BIND_WANTRET);
1191      return (x == BIND_EXEC_LOG);
1192    }
1193    
1194    void check_tcl_die(char *reason)
1195    {
1196      Tcl_SetVar(interp, "_die1", reason, 0);
1197      check_tcl_bind(H_die, reason, 0, " $_die1", MATCH_MASK | BIND_STACKABLE);
1198  }  }
1199    
1200  void check_tcl_log(int lv, char *chan, char *msg)  void check_tcl_log(int lv, char *chan, char *msg)

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23