#include <eggdrop/eggdrop.h>
#include "core_binds.h"
Go to the source code of this file.
Functions | |
int | core_binds_init (void) |
int | core_binds_shutdown (void) |
void | check_bind_init (void) |
void | check_bind_shutdown (void) |
void | check_bind_time (struct tm *tm) |
void | check_bind_secondly () |
void | check_bind_status (partymember_t *p, const char *text) |
Variables | |
static bind_table_t * | BT_time = NULL |
static bind_table_t * | BT_secondly = NULL |
static bind_table_t * | BT_status = NULL |
static bind_table_t * | BT_init = NULL |
static bind_table_t * | BT_shutdown = NULL |
void check_bind_init | ( | void | ) |
Definition at line 129 of file core_binds.c.
References bind_check(), egg_assert, and NULL.
Referenced by core_init().
00130 { 00131 egg_assert(BT_init != NULL); 00132 00133 bind_check (BT_init, NULL, NULL); 00134 }
void check_bind_secondly | ( | ) |
Definition at line 151 of file core_binds.c.
References bind_check(), and NULL.
Referenced by core_secondly().
00152 { 00153 bind_check(BT_secondly, NULL, NULL); 00154 }
void check_bind_shutdown | ( | void | ) |
Definition at line 136 of file core_binds.c.
References bind_check(), egg_assert, and NULL.
Referenced by core_shutdown_or_restart().
00137 { 00138 egg_assert(BT_shutdown != NULL); 00139 00140 bind_check (BT_shutdown, NULL, NULL); 00141 }
void check_bind_status | ( | partymember_t * | p, | |
const char * | text | |||
) |
Definition at line 156 of file core_binds.c.
References bind_check(), and NULL.
Referenced by party_status().
00157 { 00158 bind_check(BT_status, NULL, NULL, p, text); 00159 }
void check_bind_time | ( | struct tm * | tm | ) |
Definition at line 143 of file core_binds.c.
References bind_check(), and NULL.
Referenced by core_secondly().
00144 { 00145 char full[32]; 00146 00147 sprintf(full, "%02d %02d %02d %02d %04d", tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900); 00148 bind_check(BT_time, NULL, full, tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon + 1, tm->tm_year + 1900); 00149 }
int core_binds_init | ( | void | ) |
Definition at line 107 of file core_binds.c.
References BIND_STACKABLE, bind_table_add(), BTN_CORE_INIT, BTN_CORE_SECONDLY, BTN_CORE_SHUTDOWN, BTN_CORE_STATUS, BTN_CORE_TIME, MATCH_MASK, and MATCH_NONE.
Referenced by core_init().
00108 { 00109 BT_init = bind_table_add (BTN_CORE_INIT, 0, "", MATCH_NONE, BIND_STACKABLE); /* DDD */ 00110 BT_shutdown = bind_table_add (BTN_CORE_SHUTDOWN, 0, "", MATCH_NONE, BIND_STACKABLE); /* DDD */ 00111 BT_time = bind_table_add(BTN_CORE_TIME, 5, "iiiii", MATCH_MASK, BIND_STACKABLE); /* DDD */ 00112 BT_secondly = bind_table_add(BTN_CORE_SECONDLY, 0, "", MATCH_NONE, BIND_STACKABLE); /* DDD */ 00113 BT_status = bind_table_add(BTN_CORE_STATUS, 2, "Ps", MATCH_NONE, BIND_STACKABLE); /* DDD */ 00114 00115 return (0); 00116 }
int core_binds_shutdown | ( | void | ) |
Definition at line 118 of file core_binds.c.
References bind_table_del().
Referenced by core_shutdown_or_restart().
00119 { 00120 bind_table_del(BT_status); 00121 bind_table_del(BT_secondly); 00122 bind_table_del(BT_time); 00123 bind_table_del(BT_shutdown); 00124 bind_table_del(BT_init); 00125 00126 return (0); 00127 }
bind_table_t* BT_init = NULL [static] |
Definition at line 90 of file core_binds.c.
bind_table_t* BT_secondly = NULL [static] |
Definition at line 59 of file core_binds.c.
bind_table_t* BT_shutdown = NULL [static] |
Definition at line 105 of file core_binds.c.
bind_table_t* BT_status = NULL [static] |
partymember | The partymember who typed ".status" on the partyline. | |
string | Whatever the user typed after ".status". |
Definition at line 75 of file core_binds.c.
bind_table_t* BT_time = NULL [static] |
int | The "minute" field of the match string. | |
int | The "hour" field of the match string. | |
int | The "day" field of the match string. | |
int | The "month" field of the match string. | |
int | The "year" field of the match string. |
Definition at line 42 of file core_binds.c.