diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-01-04 01:05:33 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-01-04 01:05:33 +0100 |
commit | 88aa905ee36bdfb631492968eb0f1691beae6235 (patch) | |
tree | 13e811a6e3be16a3ab2da1ff8cff1648b6b1e699 /src/plugins/irc | |
parent | 652bca1ffd565f53414f93e1a73afbe34cbc7923 (diff) | |
download | weechat-88aa905ee36bdfb631492968eb0f1691beae6235.zip |
Remove unused functions and prototypes
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-bar-item.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-channel.c | 45 | ||||
-rw-r--r-- | src/plugins/irc/irc-channel.h | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-config.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-display.c | 31 | ||||
-rw-r--r-- | src/plugins/irc/irc-display.h | 9 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 70 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.h | 19 |
8 files changed, 6 insertions, 176 deletions
diff --git a/src/plugins/irc/irc-bar-item.h b/src/plugins/irc/irc-bar-item.h index 757d66bad..6b79b317f 100644 --- a/src/plugins/irc/irc-bar-item.h +++ b/src/plugins/irc/irc-bar-item.h @@ -22,4 +22,4 @@ extern void irc_bar_item_init (); -#endif /* irc-bar_item.h */ +#endif /* irc-bar-item.h */ diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 8c02fd66c..daf9adced 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -209,51 +209,6 @@ irc_channel_search (struct t_irc_server *server, const char *channel_name) } /* - * irc_channel_search_any: returns pointer on a channel with name - */ - -struct t_irc_channel * -irc_channel_search_any (struct t_irc_server *server, const char *channel_name) -{ - struct t_irc_channel *ptr_channel; - - if (!server || !channel_name) - return NULL; - - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (weechat_strcasecmp (ptr_channel->name, channel_name) == 0) - return ptr_channel; - } - return NULL; -} - -/* - * irc_channel_search_any_without_buffer: returns pointer on a channel with name - * looks only for channels without buffer - */ - -struct t_irc_channel * -irc_channel_search_any_without_buffer (struct t_irc_server *server, - const char *channel_name) -{ - struct t_irc_channel *ptr_channel; - - if (!server || !channel_name) - return NULL; - - for (ptr_channel = server->channels; ptr_channel; - ptr_channel = ptr_channel->next_channel) - { - if (!ptr_channel->buffer - && (weechat_strcasecmp (ptr_channel->name, channel_name) == 0)) - return ptr_channel; - } - return NULL; -} - -/* * irc_channel_is_channel: returns 1 if string is channel */ diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index fed2c653d..c6c36160a 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -81,10 +81,6 @@ extern void irc_channel_free (struct t_irc_server *server, extern void irc_channel_free_all (struct t_irc_server *server); extern struct t_irc_channel *irc_channel_search (struct t_irc_server *server, const char *channel_name); -extern struct t_irc_channel *irc_channel_search_any (struct t_irc_server *server, - const char *channel_name); -extern struct t_irc_channel *irc_channel_search_any_without_buffer (struct t_irc_server *server, - const char *channel_name); extern int irc_channel_is_channel (const char *string); extern void irc_channel_remove_away (struct t_irc_channel *channel); extern void irc_channel_check_away (struct t_irc_server *server, diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index f5bddbf86..f12115958 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -74,8 +74,6 @@ extern struct t_config_option *irc_config_server_default[]; extern void irc_config_server_change_cb (void *data, struct t_config_option *option); -extern void irc_config_server_delete_cb (void *data, - struct t_config_option *option); struct t_config_option *irc_config_server_new_option (struct t_config_file *config_file, struct t_config_section *section, int index_option, diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index e803a51b1..c804a6dcc 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -113,37 +113,6 @@ irc_display_away (struct t_irc_server *server, const char *string1, const char * } /* - * irc_display_mode: display IRC message for mode change - */ - -void -irc_display_mode (struct t_gui_buffer *buffer, - const char *channel_name, const char *nick_name, - char set_flag, const char *symbol, const char *nick_host, - const char *message, const char *param) -{ - weechat_printf (buffer, - "%s[%s%s%s/%s%c%s%s] %s%s %s%s%s%s%s", - IRC_COLOR_CHAT_DELIMITERS, - (channel_name) ? - IRC_COLOR_CHAT_CHANNEL : - IRC_COLOR_CHAT_NICK, - (channel_name) ? channel_name : nick_name, - IRC_COLOR_CHAT, - IRC_COLOR_CHAT_CHANNEL, - set_flag, - symbol, - IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT_NICK, - nick_host, - IRC_COLOR_CHAT, - message, - (param) ? " " : "", - (param) ? IRC_COLOR_CHAT_NICK : "", - (param) ? param : ""); -} - -/* * irc_display_server: display server description */ diff --git a/src/plugins/irc/irc-display.h b/src/plugins/irc/irc-display.h index 739acbe4b..7f320bf61 100644 --- a/src/plugins/irc/irc-display.h +++ b/src/plugins/irc/irc-display.h @@ -21,17 +21,8 @@ #define __WEECHAT_IRC_DISPLAY_H 1 extern void irc_display_hide_password (char *string, int look_for_nickserv); -extern void irc_display_nick (struct t_gui_buffer *buffer, - struct t_irc_nick *nick, const char *nickname, - int type, int display_around, - const char *force_color, int no_nickmode); extern void irc_display_away (struct t_irc_server *server, const char *string1, const char *string2); -extern void irc_display_mode (struct t_gui_buffer *buffer, - const char *channel_name, const char *nick_name, - char set_flag, const char *symbol, - const char *nick_host, const char *message, - const char *param); extern void irc_display_server (struct t_irc_server *server, int with_detail); #endif /* irc-display.h */ diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index e160bbde7..0a8ed6065 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -62,6 +62,11 @@ char *irc_server_option_default[IRC_SERVER_NUM_OPTIONS] = }; +void irc_server_reconnect (struct t_irc_server *server); +void irc_server_check_away (); +void irc_server_free_data (struct t_irc_server *server); + + /* * irc_server_valid: check if a server pointer exists * return 1 if server exists @@ -673,71 +678,6 @@ irc_server_free_all () } /* - * irc_server_new: creates a new server, and initialize it - */ -/* -struct t_irc_server * -irc_server_new (const char *name, int autoconnect, int autoreconnect, - int autoreconnect_delay, const char *proxy, - const char *addresses, int ipv6, int ssl, - const char *password, const char *nicks, - const char *username, const char *realname, - const char *local_hostname, const char *command, - int command_delay, const char *autojoin, int autorejoin) -{ - struct t_irc_server *new_server; - - if (!name || !addresses) - return NULL; - - if (weechat_irc_plugin->debug) - { - weechat_log_printf ("Creating new server (name:%s, proxy:%s, " - "addresses:%s, pwd:%s, nicks:%s, username:%s, " - "realname:%s, local_hostname: %s, command:%s, " - "autojoin:%s, autorejoin:%s)", - name, proxy, addresses, (password) ? password : "", - (nicks) ? nicks : "", (username) ? username : "", - (realname) ? realname : "", - (local_hostname) ? local_hostname : "", - (command) ? command : "", - (autojoin) ? autojoin : "", - (autorejoin) ? "on" : "off"); - } - - new_server = irc_server_alloc (name); - if (new_server) - { - new_server->autoconnect = autoconnect; - new_server->autoreconnect = autoreconnect; - new_server->autoreconnect_delay = autoreconnect_delay; - new_server->proxy = (proxy) ? strdup (proxy) : NULL; - irc_server_set_addresses (new_server, addresses); - new_server->ipv6 = ipv6; - new_server->ssl = ssl; - new_server->password = (password) ? strdup (password) : strdup (""); - irc_server_set_nicks (new_server, - (nicks) ? nicks : IRC_SERVER_DEFAULT_NICKS); - new_server->username = - (username) ? strdup (username) : strdup ("weechat"); - new_server->realname = - (realname) ? strdup (realname) : strdup ("realname"); - new_server->local_hostname = - (local_hostname) ? strdup (local_hostname) : NULL; - new_server->command = - (command) ? strdup (command) : NULL; - new_server->command_delay = command_delay; - new_server->autojoin = - (autojoin) ? strdup (autojoin) : NULL; - new_server->autorejoin = autorejoin; - } - else - return NULL; - - return new_server; -} -*/ -/* * irc_server_copy: copy a server * return: pointer to new server, NULL if error */ diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 739bd02d3..63aeeb140 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -181,22 +181,6 @@ extern void irc_server_set_nick (struct t_irc_server *server, const char *nick); extern struct t_irc_server *irc_server_alloc (const char *name); extern int irc_server_alloc_with_url (const char *irc_url); extern void irc_server_free_all (); -extern struct t_irc_server *irc_server_new (const char *name, int autoconnect, - int autoreconnect, - int autoreconnect_delay, - const char *proxy, - const char *addresses, - int ipv6, - int ssl, - const char *password, - const char *nicks, - const char *username, - const char *realname, - const char *hostname, - const char *command, - int command_delay, - const char *autojoin, - int autorejoin); extern struct t_irc_server *irc_server_copy (struct t_irc_server *server, const char *new_name); extern int irc_server_rename (struct t_irc_server *server, const char *new_name); @@ -221,12 +205,9 @@ extern int irc_server_get_pv_count (struct t_irc_server *server); extern void irc_server_set_away (struct t_irc_server *server, const char *nick, int is_away); extern void irc_server_remove_away (); -extern void irc_server_check_away (); -extern void irc_server_reconnect (struct t_irc_server *server); extern void irc_server_disconnect (struct t_irc_server *server, int reconnect); extern void irc_server_disconnect_all (); extern void irc_server_free (struct t_irc_server *server); -extern void irc_server_free_data (struct t_irc_server *server); extern int irc_server_xfer_send_ready_cb (void *data, const char *signal, const char *type_data, void *signal_data); extern int irc_server_xfer_resume_ready_cb (void *data, const char *signal, |