本文整理汇总了C++中command_delete函数的典型用法代码示例。如果您正苦于以下问题:C++ command_delete函数的具体用法?C++ command_delete怎么用?C++ command_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了command_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _moddeinit
void _moddeinit()
{
command_delete(&ns_acc, ns_cmdtree);
help_delentry(ns_helptree, "ACC");
command_delete(&ns_status, ns_cmdtree);
help_delentry(ns_helptree, "STATUS");
}
示例2: _moddeinit
void _moddeinit()
{
command_delete(&ns_drop, ns_cmdtree);
command_delete(&ns_fdrop, ns_cmdtree);
help_delentry(ns_helptree, "DROP");
help_delentry(ns_helptree, "FDROP");
}
示例3: _moddeinit
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");
}
示例4: _moddeinit
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");
}
示例5: _moddeinit
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");
}
}
示例6: _moddeinit
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");
}
示例7: decode_command
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;
}
示例8: command_object_delete
//在队列中删除命令解释器
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;
}
示例9: _moddeinit
void _moddeinit()
{
command_delete(&ns_set_privmsg, ns_set_cmdtree);
help_delentry(ns_helptree, "SET PRIVMSG");
use_privmsg--;
}
示例10: _moddeinit
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");
}
示例11: set_deinit
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);
}
示例12: _process_connection
/**
* @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;
}
}
}
示例13: mod_deinit
static void mod_deinit()
{
command_delete(&ns_regain, ns_cmdtree);
help_delentry(ns_helptree, "REGAIN");
}
示例14: _moddeinit
void _moddeinit(module_unload_intent_t intent)
{
command_delete(&bs_set_nobot, *bs_set_cmdtree);
}
示例15: _moddeinit
void _moddeinit(module_unload_intent_t intent)
{
command_delete(&gs_set_channel, gs_set_cmdtree);
}