Beispiel #1
0
static void cmd_network(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
{
	if (*data == '\0')
		cmd_network_list();
	else
		command_runsub("network", data, server, item);
}
Beispiel #2
0
static void cmd_script(const char *data, SERVER_REC *server, void *item)
{
	if (*data == '\0')
                data = "list";

	command_runsub("script", data, server, item);
}
Beispiel #3
0
static void cmd_server(const char *data, SERVER_REC *server, void *item)
{
	GHashTable *optlist;
	char *addr;
	void *free_arg;

	if (*data == '\0') {
		print_servers();
		print_lookup_servers();
		print_reconnects();

		signal_stop();
		return;
	}

	if (g_strncasecmp(data, "add ", 4) == 0 ||
	    g_strncasecmp(data, "remove ", 7) == 0 ||
	    g_strcasecmp(data, "list") == 0 ||
	    g_strncasecmp(data, "list ", 5) == 0) {
		command_runsub("server", data, server, item);
		signal_stop();
		return;
	}

	if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS,
			    "connect", &optlist, &addr))
		return;

	if (*addr == '\0' || strcmp(addr, "+") == 0)
		cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
	if (*addr == '+') window_create(NULL, FALSE);

	cmd_params_free(free_arg);
}
Beispiel #4
0
static void cmd_log(const char *data, SERVER_REC *server, void *item)
{
	if (*data == '\0')
		cmd_log_list();
	else
		command_runsub("log", data, server, item);
}
Beispiel #5
0
static void cmd_default(const char *data, SERVER_REC *server, void *item)
{
    if (!*data)
        data = "list";

    command_runsub("py", data, server, item);
}
Beispiel #6
0
static void cmd_ircnet(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
{
	if (*data == '\0')
		cmd_ircnet_list();
	else
		command_runsub("ircnet", data, server, item);
}
Beispiel #7
0
static void cmd_window(const char *data, void *server, WI_ITEM_REC *item)
{
	if (is_numeric(data, 0)) {
                signal_emit("command window refnum", 3, data, server, item);
		return;
	}

	command_runsub("window", data, server, item);
}
Beispiel #8
0
/* SYNTAX: WINDOW MOVE <number>|<direction> */
static void cmd_window_move(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
{
	if (!is_numeric(data, 0)) {
		command_runsub("window move", data, server, item);
                return;
	}

	active_window_move_to(atoi(data));
}
Beispiel #9
0
static void cmd_window_item(const char *data, void *server, WI_ITEM_REC *item)
{
        while (*data == ' ') data++;

	if (is_numeric(data, '\0'))
		signal_emit("command window item goto", 3, data, server, item);
	else
		command_runsub("window item", data, server, item);
}
Beispiel #10
0
/* SYNTAX: PRESENCE */
static void
cmd_presence(const char *data, XMPP_SERVER_REC *server, WI_ITEM_REC *item)
{
	CMD_XMPP_SERVER(server);
	if (*data == '\0')
		cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
	else
		command_runsub(xmpp_commands[XMPP_COMMAND_PRESENCE], data,
		    server, item);
}
Beispiel #11
0
static void cmd_channel(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
{
	if (*data == '\0')
		cmd_channel_list_joined();
	else if (server != NULL && server_ischannel(server, data)) {
		signal_emit("command join", 3, data, server, item);
	} else {
		command_runsub("channel", data, server, item);
	}
}
Beispiel #12
0
/* SYNTAX: ROSTER */
static void
cmd_roster(const char *data, XMPP_SERVER_REC *server, WI_ITEM_REC *item)
{
	CMD_XMPP_SERVER(server);
	if (*data == '\0')
		signal_emit("xmpp roster show", 1, server);
	else
		command_runsub(xmpp_commands[XMPP_COMMAND_ROSTER], data,
		    server, item);
}
Beispiel #13
0
static void cmd_window(const char *data, void *server, WI_ITEM_REC *item)
{
        while (*data == ' ') data++;

	if (*data == '\0')
                cmd_window_info(active_win);
	else if (is_numeric(data, 0))
                signal_emit("command window refnum", 3, data, server, item);
        else
		command_runsub("window", data, server, item);
}
Beispiel #14
0
static void cmd_layout(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
{
	command_runsub("layout", data, server, item);
}
Beispiel #15
0
static void cmd_scrollback(const char *data, SERVER_REC *server,
			   WI_ITEM_REC *item)
{
	command_runsub("scrollback", data, server, item);
}
Beispiel #16
0
static void cmd_window(const char *data, void *server, WI_ITEM_REC *item)
{
	command_runsub("window", data, server, item);
}
Beispiel #17
0
static void cmd_dcc(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item)
{
	command_runsub("dcc", data, server, item);
}
Beispiel #18
0
static void cmd_foreach(const char *data, SERVER_REC *server,
			WI_ITEM_REC *item)
{
	command_runsub("foreach", data, server, item);
}
Beispiel #19
0
static void cmd_rawlog(const char *data, SERVER_REC *server, void *item)
{
	command_runsub("rawlog", data, server, item);
}