Beispiel #1
0
void _moddeinit()
{
	command_delete(&ns_acc, ns_cmdtree);
	help_delentry(ns_helptree, "ACC");
	command_delete(&ns_status, ns_cmdtree);
	help_delentry(ns_helptree, "STATUS");
}
Beispiel #2
0
void _moddeinit()
{
	command_delete(&ns_drop, ns_cmdtree);
	command_delete(&ns_fdrop, ns_cmdtree);
	help_delentry(ns_helptree, "DROP");
	help_delentry(ns_helptree, "FDROP");
}
Beispiel #3
0
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");
}
Beispiel #4
0
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");
}
Beispiel #5
0
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");
}
Beispiel #7
0
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;
}
Beispiel #8
0
//在队列中删除命令解释器
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;
}
Beispiel #9
0
void _moddeinit()
{
	command_delete(&ns_set_privmsg, ns_set_cmdtree);
	help_delentry(ns_helptree, "SET PRIVMSG");

	use_privmsg--;
}
Beispiel #10
0
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");
}
Beispiel #11
0
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;
		}
	}
}
Beispiel #13
0
static void mod_deinit()
{
	command_delete(&ns_regain, ns_cmdtree);
	help_delentry(ns_helptree, "REGAIN");
}
Beispiel #14
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&bs_set_nobot, *bs_set_cmdtree);
}
Beispiel #15
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&gs_set_channel, gs_set_cmdtree);
}
Beispiel #16
0
void _moddeinit()
{
	command_delete(&cs_fflags, cs_cmdtree);
	help_delentry(cs_helptree, "FFLAGS");
}
Beispiel #17
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&ns_set_email, *ns_set_cmdtree);
}
Beispiel #18
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&cs_set_private, *cs_set_cmdtree);

	use_channel_private--;
}
Beispiel #19
0
void _moddeinit()
{
	command_delete(&ns_freeze, ns_cmdtree);
	help_delentry(ns_helptree, "FREEZE");
}
Beispiel #20
0
void _moddeinit()
{
	command_delete(&cs_set_url, *cs_set_cmdtree);
}
Beispiel #21
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&ns_set_nevergroup, *ns_set_cmdtree);

	list_unregister("nevergroup");
}
Beispiel #22
0
void _moddeinit()
{
	command_delete(&cs_set_restricted, *cs_set_cmdtree);
}
Beispiel #23
0
void _moddeinit()
{
	command_delete(&os_update, os_cmdtree);
	help_delentry(os_helptree, "UPDATE");
}
Beispiel #24
0
void _moddeinit()
{
	command_delete(&cs_drop, cs_cmdtree);
	help_delentry(cs_helptree, "DROP");
}
Beispiel #25
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&cs_set_fantasy, *cs_set_cmdtree);

	hook_del_config_ready(cs_set_fantasy_config_ready);
}
Beispiel #26
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&cs_set_restricted, *cs_set_cmdtree);
}
Beispiel #27
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&gs_set_joinflags, gs_set_cmdtree);
}
Beispiel #28
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&cs_set_topiclock, *cs_set_cmdtree);
}
Beispiel #29
0
void _moddeinit(module_unload_intent_t intent)
{
	command_delete(&cs_set_entrymsg, *cs_set_cmdtree);
}
Beispiel #30
0
void _moddeinit(void)
{
	command_delete(&ns_set_password, *ns_set_cmdtree);
}