void _moddeinit() { command_delete(&ns_acc, ns_cmdtree); help_delentry(ns_helptree, "ACC"); command_delete(&ns_status, ns_cmdtree); help_delentry(ns_helptree, "STATUS"); }
void _moddeinit() { command_delete(&ns_drop, ns_cmdtree); command_delete(&ns_fdrop, ns_cmdtree); help_delentry(ns_helptree, "DROP"); help_delentry(ns_helptree, "FDROP"); }
void _moddeinit(void) { command_delete(&hs_on, hs_cmdtree); command_delete(&hs_off, hs_cmdtree); help_delentry(hs_helptree, "ON"); help_delentry(hs_helptree, "OFF"); }
void _moddeinit() { command_delete(&cs_topic, cs_cmdtree); command_delete(&cs_topicappend, cs_cmdtree); fcommand_delete(&fc_topic, cs_fcmdtree); fcommand_delete(&fc_topicappend, cs_fcmdtree); help_delentry(cs_helptree, "TOPIC"); help_delentry(cs_helptree, "TOPICAPPEND"); }
void _moddeinit() { command_delete(&cmd_eightball, gs_cmdtree); help_delentry(gs_helptree, "EIGHTBALL"); if (cs_registered) { command_delete(&cmd_eightball, cs_cmdtree); help_delentry(cs_helptree, "EIGHTBALL"); } }
void _moddeinit() { command_delete(&cs_halfop, cs_cmdtree); command_delete(&cs_dehalfop, cs_cmdtree); fcommand_delete(&fc_halfop, cs_fcmdtree); fcommand_delete(&fc_hop, cs_fcmdtree); fcommand_delete(&fc_dehalfop, cs_fcmdtree); fcommand_delete(&fc_dehop, cs_fcmdtree); help_delentry(cs_helptree, "HALFOP"); help_delentry(cs_helptree, "DEHALFOP"); }
static int decode_command (int argc, char *argv[], ProgEnv *env) { int opt_idx; for (opt_idx = 0; opt_idx < argc; opt_idx++) { if (strcmp (argv[opt_idx], "add") == 0) { ++opt_idx; opt_idx += command_add (argc - opt_idx, argv + opt_idx, env); } else if (strcmp (argv[opt_idx], "add-list") == 0) { ++opt_idx; opt_idx += command_add_list (argc - opt_idx, argv + opt_idx, env); } else if (strcmp (argv[opt_idx], "delete") == 0) { ++opt_idx; opt_idx += command_delete (argc - opt_idx, argv + opt_idx, env); } else if (strcmp (argv[opt_idx], "delete-list") == 0) { ++opt_idx; opt_idx += command_delete_list (argc - opt_idx, argv + opt_idx, env); } else if (strcmp (argv[opt_idx], "query") == 0) { ++opt_idx; opt_idx += command_query (argc - opt_idx, argv + opt_idx, env); } else if (strcmp (argv[opt_idx], "list") == 0) { ++opt_idx; opt_idx += command_list (argc - opt_idx, argv + opt_idx, env); } else { fprintf (stderr, "Unknown command: %s\n", argv[opt_idx]); return EXIT_FAILURE; } } return EXIT_SUCCESS; }
//在队列中删除命令解释器 int command_object_delete(struct command *object) { int delete_id = -1; for(int i = 0; i < command_object_buffer_count ; i++) if(command_object_buffer[i] == object) { delete_id = i; break; } if(delete_id == -1 ) //未找到删除的对象:指针错误 return -1; command_delete(command_object_buffer[delete_id]); //从队列中删除对象指针 for(int i = delete_id; i < command_object_buffer_count - 1; i++) command_object_buffer[i] = command_object_buffer[i+1]; command_object_buffer_count--; // 减少计数 return 0; }
void _moddeinit() { command_delete(&ns_set_privmsg, ns_set_cmdtree); help_delentry(ns_helptree, "SET PRIVMSG"); use_privmsg--; }
void _moddeinit() { command_delete(&bs_set, bs_cmdtree); help_delentry(bs_helptree, "SET"); help_delentry(bs_helptree, "SET FANTASY"); help_delentry(bs_helptree, "SET NOBOT"); help_delentry(bs_helptree, "SET PRIVATE"); }
void set_deinit(void) { service_unbind_command(groupsvs, &gs_set); command_delete(&gs_set_email, gs_set_cmdtree); command_delete(&gs_set_url, gs_set_cmdtree); command_delete(&gs_set_description, gs_set_cmdtree); command_delete(&gs_set_channel, gs_set_cmdtree); command_delete(&gs_set_open, gs_set_cmdtree); command_delete(&gs_set_public, gs_set_cmdtree); mowgli_patricia_destroy(gs_set_cmdtree, NULL, NULL); }
/** * @function _process_connection * Handle and process an incoming connection. * @param thread Pointer to the thread's structure. */ static void _process_connection(comm_thread_t *thread) { uint8_t cmd; // loop on incoming requests for (; ; ) { // read command byte if (read(thread->client_sock, &cmd, sizeof(cmd)) <= 0) { close(thread->client_sock); break; } // interpret command switch (cmd) { case PROTO_PUT: command_put(thread); break; case PROTO_DELETE: command_delete(thread); break; case PROTO_GET: command_get(thread); break; } } }
static void mod_deinit() { command_delete(&ns_regain, ns_cmdtree); help_delentry(ns_helptree, "REGAIN"); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&bs_set_nobot, *bs_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&gs_set_channel, gs_set_cmdtree); }
void _moddeinit() { command_delete(&cs_fflags, cs_cmdtree); help_delentry(cs_helptree, "FFLAGS"); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&ns_set_email, *ns_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&cs_set_private, *cs_set_cmdtree); use_channel_private--; }
void _moddeinit() { command_delete(&ns_freeze, ns_cmdtree); help_delentry(ns_helptree, "FREEZE"); }
void _moddeinit() { command_delete(&cs_set_url, *cs_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&ns_set_nevergroup, *ns_set_cmdtree); list_unregister("nevergroup"); }
void _moddeinit() { command_delete(&cs_set_restricted, *cs_set_cmdtree); }
void _moddeinit() { command_delete(&os_update, os_cmdtree); help_delentry(os_helptree, "UPDATE"); }
void _moddeinit() { command_delete(&cs_drop, cs_cmdtree); help_delentry(cs_helptree, "DROP"); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&cs_set_fantasy, *cs_set_cmdtree); hook_del_config_ready(cs_set_fantasy_config_ready); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&cs_set_restricted, *cs_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&gs_set_joinflags, gs_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&cs_set_topiclock, *cs_set_cmdtree); }
void _moddeinit(module_unload_intent_t intent) { command_delete(&cs_set_entrymsg, *cs_set_cmdtree); }
void _moddeinit(void) { command_delete(&ns_set_password, *ns_set_cmdtree); }