Esempio n. 1
0
int
irc_debug_signal_debug_dump_cb (void *data, const char *signal,
                                const char *type_data, void *signal_data)
{
    /* make C compiler happy */
    (void) data;
    (void) signal;
    (void) type_data;

    if (!signal_data
        || (weechat_strcasecmp ((char *)signal_data, IRC_PLUGIN_NAME) == 0))
    {
        weechat_log_printf ("");
        weechat_log_printf ("***** \"%s\" plugin dump *****",
                            weechat_plugin->name);

        irc_server_print_log ();
        irc_ignore_print_log ();
        irc_redirect_pattern_print_log ();

        weechat_log_printf ("");
        weechat_log_printf ("***** End of \"%s\" plugin dump *****",
                            weechat_plugin->name);
    }

    return WEECHAT_RC_OK;
}
Esempio n. 2
0
void silc_plugin_connected(SilcClient client, SilcClientConnection conn, SilcClientConnectionStatus status,
        SilcStatus error, const char *message, void *context) {
    SilcConnectionContext connContext;
    SilcPluginServerList server;

    server = find_server_for_buffer(context);

    if (status == SILC_CLIENT_CONN_DISCONNECTED) {
        weechat_log_printf("Disconnected: %s", message ? message : "");
        weechat_buffer_close(context);
        remove_server(server);
        return;
    }

    if (status != SILC_CLIENT_CONN_SUCCESS && status != SILC_CLIENT_CONN_SUCCESS_RESUME) {
        weechat_log_printf("Error connecting to server: %d", status);
        return;
    }
    connContext = malloc(sizeof(SilcConnectionContext));
    connContext->server_buffer = context;

    conn->context = connContext;

    server->connection = conn;

    weechat_log_printf("connection successfull");
}
Esempio n. 3
0
int
relay_debug_dump_cb (const void *pointer, void *data,
                     const char *signal, const char *type_data,
                     void *signal_data)
{
    /* make C compiler happy */
    (void) pointer;
    (void) data;
    (void) signal;
    (void) type_data;

    if (!signal_data
        || (weechat_strcasecmp ((char *)signal_data, RELAY_PLUGIN_NAME) == 0))
    {
        weechat_log_printf ("");
        weechat_log_printf ("***** \"%s\" plugin dump *****",
                            weechat_plugin->name);

        relay_server_print_log ();
        relay_client_print_log ();

        weechat_log_printf ("");
        weechat_log_printf ("***** End of \"%s\" plugin dump *****",
                            weechat_plugin->name);
    }

    return WEECHAT_RC_OK;
}
Esempio n. 4
0
int
trigger_debug_dump_cb (void *data, const char *signal, const char *type_data,
                       void *signal_data)
{
    /* make C compiler happy */
    (void) data;
    (void) signal;
    (void) type_data;

    if (!signal_data
        || (weechat_strcasecmp ((char *)signal_data, TRIGGER_PLUGIN_NAME) == 0))
    {
        weechat_log_printf ("");
        weechat_log_printf ("***** \"%s\" plugin dump *****",
                            weechat_plugin->name);

        trigger_print_log ();

        weechat_log_printf ("");
        weechat_log_printf ("***** End of \"%s\" plugin dump *****",
                            weechat_plugin->name);
    }

    return WEECHAT_RC_OK;
}
Esempio n. 5
0
void silc_channel_message(SilcClient client, SilcClientConnection conn, SilcClientEntry sender,
        SilcChannelEntry channel, SilcMessagePayload payload, SilcChannelPrivateKey key,
        SilcMessageFlags flags, const unsigned char *message, SilcUInt32 message_len) {
    struct t_gui_buffer *channel_buffer = channel->context;

    if (channel_buffer == NULL) {
        weechat_log_printf("BUG: received message on channel we don't know about! channel: %s, server: %s, message: %s, sender: %s",
               channel->channel_name, channel->server, message, sender->nickname);
    } else {
        weechat_printf(channel_buffer, "%s\t%s", sender->nickname, message);
        weechat_buffer_set(channel_buffer, "hotlist", WEECHAT_HOTLIST_MESSAGE);
        weechat_log_printf("TODO - handle message flags: %d", flags);
    }
}
Esempio n. 6
0
int weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char *argv[]) {
    weechat_plugin = plugin;
    SilcClientParams params;

    if (silc_plugin_config_init() < 0) {
        weechat_log_printf("could not initialize SILC plugin config");
        return WEECHAT_RC_ERROR;
    }

    if (silc_plugin_config_read() < 0) {
        weechat_log_printf("could not read SILC plugin config file");
        return WEECHAT_RC_ERROR;
    }

    memset(&params, 0, sizeof(params));
    params.threads = TRUE;

    silc_plugin = silc_calloc(1, sizeof(*silc_plugin));
    if (!silc_plugin) {
        weechat_log_printf("could not allocate plugin context");
        return WEECHAT_RC_ERROR;
    }
    weechat_log_printf("SILC plugin context allocated");

    silc_plugin->client = silc_client_alloc(&ops, &params, silc_plugin, NULL);
    if (!silc_plugin->client) {
        weechat_log_printf("could not allocate SILC client");
        return WEECHAT_RC_ERROR;
    }
    weechat_log_printf("SILC client allocated");

    if (!silc_client_init(silc_plugin->client, weechat_config_string(option_default_username),
                silc_net_localhost(), weechat_config_string(option_default_realname), silc_running, silc_plugin)) {
        weechat_log_printf("could not initialize SILC client");
        return WEECHAT_RC_ERROR;
    }
    // tick the client once to complete the initialization
    silc_client_run_one(silc_plugin->client);
    weechat_log_printf("SILC client initialized");

    silc_plugin_get_keypair("weechat", "", 1, &silc_plugin->public_key, &silc_plugin->private_key);

    server_list = malloc(sizeof(struct SilcPluginServer));
    memset(server_list, 0, sizeof(struct SilcPluginServer));

    weechat_hook_command("silc", "This is the SILC plugin", "", "", NULL, &command_silc, NULL);
    weechat_hook_timer(50, 0, 0, &timer_silc, NULL);

    silc_bar_init();

    return WEECHAT_RC_OK;
}
Esempio n. 7
0
void
irc_notify_print_log (struct t_irc_server *server)
{
    struct t_irc_notify *ptr_notify;

    for (ptr_notify = server->notify_list; ptr_notify;
         ptr_notify = ptr_notify->next_notify)
    {
        weechat_log_printf ("");
        weechat_log_printf ("  => notify (addr:0x%lx):", ptr_notify);
        weechat_log_printf ("       server. . . . . . . : 0x%lx", ptr_notify->server);
        weechat_log_printf ("       nick. . . . . . . . : '%s'",  ptr_notify->nick);
        weechat_log_printf ("       check_away. . . . . : %d",    ptr_notify->check_away);
        weechat_log_printf ("       is_on_server. . . . : %d",    ptr_notify->is_on_server);
        weechat_log_printf ("       away_message. . . . : '%s'",  ptr_notify->away_message);
        weechat_log_printf ("       ison_received . . . : %d",    ptr_notify->ison_received);
        weechat_log_printf ("       prev_notify . . . . : 0x%lx", ptr_notify->prev_notify);
        weechat_log_printf ("       next_notify . . . . : 0x%lx", ptr_notify->next_notify);
    }
}
Esempio n. 8
0
void
irc_redirect_pattern_print_log ()
{
    struct t_irc_redirect_pattern *ptr_redirect_pattern;

    for (ptr_redirect_pattern = irc_redirect_patterns; ptr_redirect_pattern;
         ptr_redirect_pattern = ptr_redirect_pattern->next_redirect)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[redirect_pattern (addr:0x%lx)]", ptr_redirect_pattern);
        weechat_log_printf ("  name . . . . . . . . : '%s'",  ptr_redirect_pattern->name);
        weechat_log_printf ("  temp_pattern . . . . : %d",    ptr_redirect_pattern->temp_pattern);
        weechat_log_printf ("  timeout. . . . . . . : %d",    ptr_redirect_pattern->timeout);
        weechat_log_printf ("  cmd_start. . . . . . : '%s'",  ptr_redirect_pattern->cmd_start);
        weechat_log_printf ("  cmd_stop . . . . . . : '%s'",  ptr_redirect_pattern->cmd_stop);
        weechat_log_printf ("  cmd_extra. . . . . . : '%s'",  ptr_redirect_pattern->cmd_extra);
        weechat_log_printf ("  prev_redirect. . . . : 0x%lx", ptr_redirect_pattern->prev_redirect);
        weechat_log_printf ("  next_redirect. . . . : 0x%lx", ptr_redirect_pattern->next_redirect);
    }
}
Esempio n. 9
0
void silc_verify_public_key(SilcClient client, SilcClientConnection conn, SilcConnectionType conn_type, SilcPublicKey public_key, SilcVerifyPublicKey completion, void *context) {
    SilcPluginServerList server;

    weechat_log_printf("silc_verify_public_key was called");

    server = find_server_for_buffer(context);
    if (server != NULL) {
        server->server_key = public_key;
    }

    completion(TRUE, context);
}
Esempio n. 10
0
void
relay_server_print_log ()
{
    struct t_relay_server *ptr_server;

    for (ptr_server = relay_servers; ptr_server;
         ptr_server = ptr_server->next_server)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server);
        weechat_log_printf ("  protocol. . . . . . : %d (%s)",
                            ptr_server->protocol,
                            relay_protocol_string[ptr_server->protocol]);
        weechat_log_printf ("  protocol_args . . . : '%s'",  ptr_server->protocol_args);
        weechat_log_printf ("  port. . . . . . . . : %d",    ptr_server->port);
        weechat_log_printf ("  sock. . . . . . . . : %d",    ptr_server->sock);
        weechat_log_printf ("  hook_fd . . . . . . : 0x%lx", ptr_server->hook_fd);
        weechat_log_printf ("  start_time. . . . . : %ld",   ptr_server->start_time);
        weechat_log_printf ("  prev_server . . . . : 0x%lx", ptr_server->prev_server);
        weechat_log_printf ("  next_server . . . . : 0x%lx", ptr_server->next_server);
    }
}
Esempio n. 11
0
void
irc_ignore_print_log ()
{
    struct t_irc_ignore *ptr_ignore;

    for (ptr_ignore = irc_ignore_list; ptr_ignore;
         ptr_ignore = ptr_ignore->next_ignore)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[ignore (addr:0x%lx)]", ptr_ignore);
        weechat_log_printf ("  number . . . . . . . : %d",    ptr_ignore->number);
        weechat_log_printf ("  mask . . . . . . . . : '%s'",  ptr_ignore->mask);
        weechat_log_printf ("  regex_mask . . . . . : 0x%lx", ptr_ignore->regex_mask);
        weechat_log_printf ("  server . . . . . . . : '%s'",  ptr_ignore->server);
        weechat_log_printf ("  channel. . . . . . . : '%s'",  ptr_ignore->channel);
        weechat_log_printf ("  prev_ignore. . . . . : 0x%lx", ptr_ignore->prev_ignore);
        weechat_log_printf ("  next_ignore. . . . . : 0x%lx", ptr_ignore->next_ignore);
    }
}
Esempio n. 12
0
void
relay_weechat_print_log (struct t_relay_client *client)
{
    if (client->protocol_data)
    {
        weechat_log_printf ("    password_ok. . . . . . : %d",   RELAY_WEECHAT_DATA(client, password_ok));
        weechat_log_printf ("    compression. . . . . . : %d",   RELAY_WEECHAT_DATA(client, compression));
        weechat_log_printf ("    buffers_sync . . . . . : 0x%lx (hashtable: '%s')",
                            RELAY_WEECHAT_DATA(client, buffers_sync),
                            weechat_hashtable_get_string (RELAY_WEECHAT_DATA(client, buffers_sync),
                                                          "keys_values"));
        weechat_log_printf ("    hook_signal_buffer . . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_signal_buffer));
        weechat_log_printf ("    hook_hsignal_nicklist. : 0x%lx", RELAY_WEECHAT_DATA(client, hook_hsignal_nicklist));
        weechat_log_printf ("    hook_signal_upgrade. . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_signal_upgrade));
        weechat_log_printf ("    buffers_nicklist . . . : 0x%lx (hashtable: '%s')",
                            RELAY_WEECHAT_DATA(client, buffers_nicklist),
                            weechat_hashtable_get_string (RELAY_WEECHAT_DATA(client, buffers_nicklist),
                                                          "keys_values"));
        weechat_log_printf ("    hook_timer_nicklist. . : 0x%lx", RELAY_WEECHAT_DATA(client, hook_timer_nicklist));
    }
}
Esempio n. 13
0
void
rmodifier_print_log ()
{
    struct t_rmodifier *ptr_rmodifier;
    int i;

    for (ptr_rmodifier = rmodifier_list; ptr_rmodifier;
         ptr_rmodifier = ptr_rmodifier->next_rmodifier)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[rmodifier %s (addr:0x%lx)]", ptr_rmodifier->name, ptr_rmodifier);
        weechat_log_printf ("  modifiers. . . . . . : '%s'",  ptr_rmodifier->modifiers);
        weechat_log_printf ("  hooks. . . . . . . . : 0x%lx", ptr_rmodifier->hooks);
        for (i = 0; i < ptr_rmodifier->hooks_count; i++)
        {
            weechat_log_printf ("    hooks[%03d] . . . . : 0x%lx", i, ptr_rmodifier->hooks[i]);
        }
        weechat_log_printf ("  hooks_count. . . . . : %d",    ptr_rmodifier->hooks_count);
        weechat_log_printf ("  str_regex. . . . . . : '%s'",  ptr_rmodifier->str_regex);
        weechat_log_printf ("  regex. . . . . . . . : 0x%lx", ptr_rmodifier->regex);
        weechat_log_printf ("  groups . . . . . . . : '%s'",  ptr_rmodifier->groups);
        weechat_log_printf ("  prev_rmodifier . . . : 0x%lx", ptr_rmodifier->prev_rmodifier);
        weechat_log_printf ("  next_rmodifier . . . : 0x%lx", ptr_rmodifier->next_rmodifier);
    }
}
Esempio n. 14
0
void silc_ask_passphrase(SilcClient client, SilcClientConnection conn, SilcAskPassphrase completion, void *context) {
    weechat_log_printf("silc_ask_passphrase was called");
}
Esempio n. 15
0
void silc_stopped(SilcClient client, void *application) {
    weechat_log_printf("SILC stopped");
    silc_plugin->running = 0;
    silc_client_free(silc_plugin->client);
    silc_free(silc_plugin);
}
Esempio n. 16
0
void silc_running(SilcClient client, void *application) {
    weechat_log_printf("SILC initialized");
    silc_plugin->running = 1;
}
Esempio n. 17
0
void
exec_print_log ()
{
    struct t_exec_cmd *ptr_exec_cmd;

    for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd;
         ptr_exec_cmd = ptr_exec_cmd->next_cmd)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[exec command (addr:0x%lx)]", ptr_exec_cmd);
        weechat_log_printf ("  number. . . . . . . . . . : %d",    ptr_exec_cmd->number);
        weechat_log_printf ("  name. . . . . . . . . . . : '%s'",  ptr_exec_cmd->name);
        weechat_log_printf ("  hook. . . . . . . . . . . : 0x%lx", ptr_exec_cmd->hook);
        weechat_log_printf ("  command . . . . . . . . . : '%s'",  ptr_exec_cmd->command);
        weechat_log_printf ("  pid . . . . . . . . . . . : %d",    ptr_exec_cmd->pid);
        weechat_log_printf ("  detached. . . . . . . . . : %d",    ptr_exec_cmd->detached);
        weechat_log_printf ("  start_time. . . . . . . . : %lld",  (long long)ptr_exec_cmd->start_time);
        weechat_log_printf ("  end_time. . . . . . . . . : %lld",  (long long)ptr_exec_cmd->end_time);
        weechat_log_printf ("  output_to_buffer. . . . . : %d",    ptr_exec_cmd->output_to_buffer);
        weechat_log_printf ("  output_to_buffer_exec_cmd : %d",    ptr_exec_cmd->output_to_buffer_exec_cmd);
        weechat_log_printf ("  buffer_full_name. . . . . : '%s'",  ptr_exec_cmd->buffer_full_name);
        weechat_log_printf ("  line_numbers. . . . . . . : %d",    ptr_exec_cmd->line_numbers);
        weechat_log_printf ("  display_rc. . . . . . . . : %d",    ptr_exec_cmd->display_rc);
        weechat_log_printf ("  output_line_nb. . . . . . : %d",    ptr_exec_cmd->output_line_nb);
        weechat_log_printf ("  output_size[stdout] . . . : %d",    ptr_exec_cmd->output_size[EXEC_STDOUT]);
        weechat_log_printf ("  output[stdout]. . . . . . : '%s'",  ptr_exec_cmd->output[EXEC_STDOUT]);
        weechat_log_printf ("  output_size[stderr] . . . : %d",    ptr_exec_cmd->output_size[EXEC_STDERR]);
        weechat_log_printf ("  output[stderr]. . . . . . : '%s'",  ptr_exec_cmd->output[EXEC_STDERR]);
        weechat_log_printf ("  return_code . . . . . . . : %d",    ptr_exec_cmd->return_code);
        weechat_log_printf ("  pipe_command. . . . . . . : '%s'",  ptr_exec_cmd->pipe_command);
        weechat_log_printf ("  hsignal . . . . . . . . . : '%s'",  ptr_exec_cmd->hsignal);
        weechat_log_printf ("  prev_cmd. . . . . . . . . : 0x%lx", ptr_exec_cmd->prev_cmd);
        weechat_log_printf ("  next_cmd. . . . . . . . . : 0x%lx", ptr_exec_cmd->next_cmd);
    }
}
Esempio n. 18
0
void silc_key_agreement(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, const char *hostname, SilcUInt16 protocol, SilcUInt16 port) {
    weechat_log_printf("silc_key_agreement was called");
}
Esempio n. 19
0
void silc_command_reply(SilcClient client, SilcClientConnection conn, SilcCommand command, SilcStatus status, SilcStatus error, va_list ap) {
    // "infrastructure"
    struct t_gui_buffer *channelbuffer, *serverbuffer;
    SilcConnectionContext ctx = conn->context;
    //SilcPluginChannelList channel;
    struct SilcChannelContext *chanCtx;

    // possible args
    char *str, *topic, *cipher, *hmac;
    SilcChannelEntry channel_entry;
    SilcUInt32 mode, userlimit;
    SilcHashTableList *userlist;
    SilcPublicKey key;
    SilcDList pubkeys;

    size_t strsize;

    // needed for the nicklist
    SilcClientEntry user_client;
    SilcChannelUser user;
    struct t_gui_nick *nick = NULL;

    switch (command) {
        case SILC_COMMAND_JOIN:
            str = va_arg(ap, char *);
            channel_entry = va_arg(ap, SilcChannelEntry);
            mode = va_arg(ap, SilcUInt32);
            userlist = va_arg(ap, SilcHashTableList *);
            topic = va_arg(ap, char *);
            cipher = va_arg(ap, char *);
            hmac = va_arg(ap, char *);
            key = va_arg(ap, SilcPublicKey);
            pubkeys = va_arg(ap, SilcDList);
            userlimit = va_arg(ap, SilcUInt32);

            chanCtx = malloc(sizeof(struct SilcChannelContext));
            chanCtx->channel_name = str;
            chanCtx->channel_entry = channel_entry;
            chanCtx->connection = conn;

            strsize = strlen(channel_entry->channel_name) + strlen(channel_entry->server) + 1;
            str = malloc(strsize+1);
            snprintf(str, strsize, "%s.%s", channel_entry->channel_name, channel_entry->server);

            // create a regular chat buffer and set some senible values
            channelbuffer = weechat_buffer_new(str, &silc_plugin_channel_input, chanCtx, NULL, NULL);
            weechat_buffer_set(channelbuffer, "name", str);
            weechat_buffer_set(channelbuffer, "short_name", channel_entry->channel_name);
            weechat_buffer_set(channelbuffer, "title", topic);
            weechat_buffer_set(channelbuffer, "hotlist", WEECHAT_HOTLIST_LOW);
            weechat_buffer_set(channelbuffer, "nicklist", "1");

            chanCtx->channel_buffer = channelbuffer;
            channel_entry->context = channelbuffer;

            serverbuffer = ctx->server_buffer;

            add_channel(channel_entry->channel_name, find_server_for_buffer(serverbuffer), channel_entry, NULL, channelbuffer);

            // fill the nicklist with users currently on the channel
            while (silc_hash_table_get(userlist, (void **)&user_client, (void **)&user)) {
                nick = silc_nicklist_add(user);
            }
            break;
        default:
            weechat_log_printf("unhandled command reply for %d", command);
            break;
    }
}
Esempio n. 20
0
void
trigger_print_log ()
{
    struct t_trigger *ptr_trigger;
    int i;

    for (ptr_trigger = triggers; ptr_trigger;
         ptr_trigger = ptr_trigger->next_trigger)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[trigger (addr:0x%lx)]", ptr_trigger);
        weechat_log_printf ("  name. . . . . . . . . . : '%s'",  ptr_trigger->name);
        weechat_log_printf ("  enabled . . . . . . . . : %d",
                            weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_ENABLED]));
        weechat_log_printf ("  hook . .  . . . . . . . : %d ('%s')",
                            weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_HOOK]),
                            trigger_hook_type_string[weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_HOOK])]);
        weechat_log_printf ("  arguments . . . . . . . : '%s'",
                            weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_ARGUMENTS]));
        weechat_log_printf ("  conditions. . . . . . . : '%s'",
                            weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_CONDITIONS]));
        weechat_log_printf ("  regex . . . . . . . . . : '%s'",
                            weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_REGEX]));
        weechat_log_printf ("  command . . . . . . . . : '%s'",
                            weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_COMMAND]));
        weechat_log_printf ("  return_code . . . . . . : %d ('%s')",
                            weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_RETURN_CODE]),
                            trigger_return_code_string[weechat_config_integer (ptr_trigger->options[TRIGGER_OPTION_RETURN_CODE])]);
        weechat_log_printf ("  hooks_count . . . . . . : %d",    ptr_trigger->hooks_count);
        weechat_log_printf ("  hooks . . . . . . . . . : 0x%lx", ptr_trigger->hooks);
        for (i = 0; i < ptr_trigger->hooks_count; i++)
        {
            weechat_log_printf ("    hooks[%03d]. . . . . . : 0x%lx",
                                i, ptr_trigger->hooks[i]);
        }
        weechat_log_printf ("  hook_count_cb . . . . . : %lu",   ptr_trigger->hook_count_cb);
        weechat_log_printf ("  hook_count_cmd. . . . . : %lu",   ptr_trigger->hook_count_cmd);
        weechat_log_printf ("  hook_running. . . . . . : %d",    ptr_trigger->hook_running);
        weechat_log_printf ("  hook_print_buffers. . . : '%s'",  ptr_trigger->hook_print_buffers);
        weechat_log_printf ("  regex_count . . . . . . : %d",    ptr_trigger->regex_count);
        weechat_log_printf ("  regex . . . . . . . . . : 0x%lx", ptr_trigger->regex);
        for (i = 0; i < ptr_trigger->regex_count; i++)
        {
            weechat_log_printf ("    regex[%03d].variable . . . : '%s'",
                                i, ptr_trigger->regex[i].variable);
            weechat_log_printf ("    regex[%03d].str_regex. . . : '%s'",
                                i, ptr_trigger->regex[i].str_regex);
            weechat_log_printf ("    regex[%03d].regex. . . . . : 0x%lx",
                                i, ptr_trigger->regex[i].regex);
            weechat_log_printf ("    regex[%03d].replace. . . . : '%s'",
                                i, ptr_trigger->regex[i].replace);
            weechat_log_printf ("    regex[%03d].replace_escaped: '%s'",
                                i, ptr_trigger->regex[i].replace_escaped);
        }
        weechat_log_printf ("  commands_count. . . . . : %d",    ptr_trigger->commands_count);
        weechat_log_printf ("  commands. . . . . . . . : 0x%lx", ptr_trigger->commands);
        if (ptr_trigger->commands)
        {
            for (i = 0; ptr_trigger->commands[i]; i++)
            {
                weechat_log_printf ("    commands[%03d] . . . . : '%s'",
                                    i, ptr_trigger->commands[i]);
            }
        }
        weechat_log_printf ("  prev_trigger. . . . . . : 0x%lx", ptr_trigger->prev_trigger);
        weechat_log_printf ("  next_trigger. . . . . . : 0x%lx", ptr_trigger->next_trigger);
    }
}
Esempio n. 21
0
void silc_ftp(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, SilcUInt32 session_id, const char *hostname, SilcUInt16 port) {
    weechat_log_printf("silc_ftp was called");
}
Esempio n. 22
0
void
relay_client_print_log ()
{
    struct t_relay_client *ptr_client;

    for (ptr_client = relay_clients; ptr_client;
         ptr_client = ptr_client->next_client)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[relay client (addr:0x%lx)]", ptr_client);
        weechat_log_printf ("  id. . . . . . . . . . : %d",   ptr_client->id);
        weechat_log_printf ("  sock. . . . . . . . . : %d",   ptr_client->sock);
        weechat_log_printf ("  address . . . . . . . : '%s'", ptr_client->address);
        weechat_log_printf ("  status. . . . . . . . : %d (%s)",
                            ptr_client->status,
                            relay_client_status_string[ptr_client->status]);
        weechat_log_printf ("  protocol. . . . . . . : %d (%s)",
                            ptr_client->protocol,
                            relay_protocol_string[ptr_client->protocol]);
        weechat_log_printf ("  protocol_args . . . . : '%s'",  ptr_client->protocol_args);
        weechat_log_printf ("  listen_start_time . . : %ld",   ptr_client->listen_start_time);
        weechat_log_printf ("  start_time. . . . . . : %ld",   ptr_client->start_time);
        weechat_log_printf ("  end_time. . . . . . . : %ld",   ptr_client->end_time);
        weechat_log_printf ("  hook_fd . . . . . . . : 0x%lx", ptr_client->hook_fd);
        weechat_log_printf ("  last_activity . . . . : %ld",   ptr_client->last_activity);
        weechat_log_printf ("  bytes_recv. . . . . . : %lu",   ptr_client->bytes_recv);
        weechat_log_printf ("  bytes_sent. . . . . . : %lu",   ptr_client->bytes_sent);
        weechat_log_printf ("  protocol_data . . . . : 0x%lx", ptr_client->protocol_data);
        switch (ptr_client->protocol)
        {
            case RELAY_PROTOCOL_WEECHAT:
                relay_weechat_print_log (ptr_client);
                break;
            case RELAY_PROTOCOL_IRC:
                relay_irc_print_log (ptr_client);
                break;
            case RELAY_NUM_PROTOCOLS:
                break;
        }
        weechat_log_printf ("  prev_client . . . . . : 0x%lx", ptr_client->prev_client);
        weechat_log_printf ("  next_client . . . . . : 0x%lx", ptr_client->next_client);
    }
}
Esempio n. 23
0
void silc_get_auth_method(SilcClient client, SilcClientConnection conn, char *hostname, SilcUInt16 port, SilcAuthMethod auth_method, SilcGetAuthMeth completion, void *context) {
    weechat_log_printf("silc_get_auth_method was called");
    completion(SILC_AUTH_NONE, NULL, 0, context);
}
Esempio n. 24
0
void
relay_server_print_log ()
{
    struct t_relay_server *ptr_server;

    for (ptr_server = relay_servers; ptr_server;
         ptr_server = ptr_server->next_server)
    {
        weechat_log_printf ("");
        weechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server);
        weechat_log_printf ("  protocol_string . . . : '%s'",  ptr_server->protocol_string);
        weechat_log_printf ("  protocol. . . . . . . : %d (%s)",
                            ptr_server->protocol,
                            relay_protocol_string[ptr_server->protocol]);
        weechat_log_printf ("  protocol_args . . . . : '%s'",  ptr_server->protocol_args);
        weechat_log_printf ("  port. . . . . . . . . : %d",    ptr_server->port);
        weechat_log_printf ("  path. . . . . . . . . : %s",    ptr_server->path);
        weechat_log_printf ("  ipv4. . . . . . . . . : %d",    ptr_server->ipv4);
        weechat_log_printf ("  ipv6. . . . . . . . . : %d",    ptr_server->ipv6);
        weechat_log_printf ("  ssl . . . . . . . . . : %d",    ptr_server->ssl);
        weechat_log_printf ("  unix_socket . . . . . : %d",    ptr_server->unix_socket);
        weechat_log_printf ("  sock. . . . . . . . . : %d",    ptr_server->sock);
        weechat_log_printf ("  hook_fd . . . . . . . : 0x%lx", ptr_server->hook_fd);
        weechat_log_printf ("  start_time. . . . . . : %lld",  (long long)ptr_server->start_time);
        weechat_log_printf ("  last_client_disconnect: %lld",  (long long)ptr_server->last_client_disconnect);
        weechat_log_printf ("  prev_server . . . . . : 0x%lx", ptr_server->prev_server);
        weechat_log_printf ("  next_server . . . . . : 0x%lx", ptr_server->next_server);
    }
}
void
plugin_script_callback_print_log (struct t_weechat_plugin *weechat_plugin,
                                  struct t_plugin_script_cb *script_callback)
{
    weechat_log_printf ("");
    weechat_log_printf ("  [callback (addr:0x%lx)]",       script_callback);
    weechat_log_printf ("    script. . . . . . . : 0x%lx", script_callback->script);
    weechat_log_printf ("    function. . . . . . : '%s'",  script_callback->function);
    weechat_log_printf ("    data. . . . . . . . : '%s'",  script_callback->data);
    weechat_log_printf ("    config_file . . . . : 0x%lx", script_callback->config_file);
    weechat_log_printf ("    config_section. . . : 0x%lx", script_callback->config_section);
    weechat_log_printf ("    config_option . . . : 0x%lx", script_callback->config_option);
    weechat_log_printf ("    hook. . . . . . . . : 0x%lx", script_callback->hook);
    weechat_log_printf ("    buffer. . . . . . . : 0x%lx", script_callback->buffer);
    weechat_log_printf ("    bar_item. . . . . . : 0x%lx", script_callback->bar_item);
    weechat_log_printf ("    upgrade_file. . . . : 0x%lx", script_callback->upgrade_file);
    weechat_log_printf ("    prev_callback . . . : 0x%lx", script_callback->prev_callback);
    weechat_log_printf ("    next_callback . . . : 0x%lx", script_callback->next_callback);
}
Esempio n. 26
0
void
irc_redirect_print_log (struct t_irc_server *server)
{
    struct t_irc_redirect *ptr_redirect;

    for (ptr_redirect = server->redirects; ptr_redirect;
         ptr_redirect = ptr_redirect->next_redirect)
    {
        weechat_log_printf ("");
        weechat_log_printf ("  => redirect (addr:0x%lx):", ptr_redirect);
        weechat_log_printf ("       server. . . . . . . : 0x%lx ('%s')",
                            ptr_redirect->server, ptr_redirect->server->name);
        weechat_log_printf ("       pattern . . . . . . : '%s'",  ptr_redirect->pattern);
        weechat_log_printf ("       signal. . . . . . . : '%s'",  ptr_redirect->signal);
        weechat_log_printf ("       count . . . . . . . : %d",    ptr_redirect->count);
        weechat_log_printf ("       current_count . . . : %d",    ptr_redirect->current_count);
        weechat_log_printf ("       string. . . . . . . : '%s'",  ptr_redirect->string);
        weechat_log_printf ("       timeout . . . . . . : %d",    ptr_redirect->timeout);
        weechat_log_printf ("       command . . . . . . : '%s'",  ptr_redirect->command);
        weechat_log_printf ("       assigned_to_command : %d",    ptr_redirect->assigned_to_command);
        weechat_log_printf ("       start_time. . . . . : %ld",   ptr_redirect->start_time);
        weechat_log_printf ("       cmd_start . . . . . : 0x%lx (hashtable: '%s')",
                            ptr_redirect->cmd_start,
                            weechat_hashtable_get_string (ptr_redirect->cmd_start, "keys_values"));
        weechat_log_printf ("       cmd_stop. . . . . . : 0x%lx (hashtable: '%s')",
                            ptr_redirect->cmd_stop,
                            weechat_hashtable_get_string (ptr_redirect->cmd_stop, "keys_values"));
        weechat_log_printf ("       cmd_extra . . . . . : 0x%lx (hashtable: '%s')",
                            ptr_redirect->cmd_extra,
                            weechat_hashtable_get_string (ptr_redirect->cmd_extra, "keys_values"));
        weechat_log_printf ("       cmd_start_received. : %d",    ptr_redirect->cmd_start_received);
        weechat_log_printf ("       cmd_stop_received . : %d",    ptr_redirect->cmd_stop_received);
        weechat_log_printf ("       cmd_filter. . . . . : 0x%lx (hashtable: '%s')",
                            ptr_redirect->cmd_filter,
                            weechat_hashtable_get_string (ptr_redirect->cmd_filter, "keys_values"));
        weechat_log_printf ("       output. . . . . . . : '%s'",  ptr_redirect->output);
        weechat_log_printf ("       output_size . . . . : %d",    ptr_redirect->output_size);
        weechat_log_printf ("       prev_redirect . . . : 0x%lx", ptr_redirect->prev_redirect);
        weechat_log_printf ("       next_redirect . . . : 0x%lx", ptr_redirect->next_redirect);
    }
}
Esempio n. 27
0
void silc_command(SilcClient client, SilcClientConnection conn, SilcBool success, SilcCommand command, SilcStatus status, SilcUInt32 argc, unsigned char **argv) {
    weechat_log_printf("SILC command %d was called. Success: %x", command, success);
}