diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/Makefile.am | 3 | ||||
-rw-r--r-- | src/irc/irc-channel.c | 5 | ||||
-rw-r--r-- | src/irc/irc-commands.c | 7 | ||||
-rw-r--r-- | src/irc/irc-display.c | 7 | ||||
-rw-r--r-- | src/irc/irc-nick.c | 5 | ||||
-rw-r--r-- | src/irc/irc-recv.c | 15 | ||||
-rw-r--r-- | src/irc/irc-send.c | 11 | ||||
-rw-r--r-- | src/irc/irc-server.c | 9 |
8 files changed, 42 insertions, 20 deletions
diff --git a/src/irc/Makefile.am b/src/irc/Makefile.am index d7e85d1ee..c316c6a89 100644 --- a/src/irc/Makefile.am +++ b/src/irc/Makefile.am @@ -17,7 +17,8 @@ noinst_LIBRARIES = lib_weechat_irc.a -lib_weechat_irc_a_SOURCES = irc-commands.c \ +lib_weechat_irc_a_SOURCES = irc.h \ + irc-commands.c \ irc-send.c \ irc-recv.c \ irc-server.c \ diff --git a/src/irc/irc-channel.c b/src/irc/irc-channel.c index 7d426210c..a21d8465a 100644 --- a/src/irc/irc-channel.c +++ b/src/irc/irc-channel.c @@ -19,10 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-channel.c: manages a chat (channel or private chat) */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <string.h> diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c index ae0854181..2a234871c 100644 --- a/src/irc/irc-commands.c +++ b/src/irc/irc-commands.c @@ -19,11 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-commands.c: implementation of IRC commands, according to RFC 1459,2810,2811,2812 */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "../common/weechat.h" #include "irc.h" #include "../common/command.h" @@ -157,7 +160,7 @@ t_irc_command irc_commands[] = { "privmsg", N_("message received"), "", "", 0, 0, 1, NULL, NULL, irc_cmd_recv_privmsg }, - { "quit", N_("close all connections & quit " WEECHAT_NAME), + { "quit", N_("close all connections & quit " PACKAGE_NAME), N_("[quit_message]"), N_("quit_message: quit message (displayed to other users)"), 0, MAX_ARGS, 0, NULL, irc_cmd_send_quit, irc_cmd_recv_quit }, diff --git a/src/irc/irc-display.c b/src/irc/irc-display.c index 69ca1dea7..9b7a80275 100644 --- a/src/irc/irc-display.c +++ b/src/irc/irc-display.c @@ -19,10 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-display.c: display functions for IRC */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <unistd.h> #include <stdio.h> @@ -30,7 +33,7 @@ #include "../common/weechat.h" #include "irc.h" -#include "../common/config.h" +#include "../common/weeconfig.h" #include "../gui/gui.h" diff --git a/src/irc/irc-nick.c b/src/irc/irc-nick.c index 4365ce23f..c0104a0d7 100644 --- a/src/irc/irc-nick.c +++ b/src/irc/irc-nick.c @@ -19,10 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-nick.c: manages nick list for channels */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <string.h> #include <limits.h> diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index ccd6832c8..d5b2213e3 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -19,11 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-recv.c: implementation of IRC commands (server to client), according to RFC 1459,2810,2811,2812 */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <unistd.h> #include <stdio.h> @@ -35,7 +38,7 @@ #include "../common/weechat.h" #include "irc.h" #include "../common/command.h" -#include "../common/config.h" +#include "../common/weeconfig.h" #include "../gui/gui.h" @@ -838,7 +841,7 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments) _("NOTICE %s :%sVERSION %s v%s" " compiled on %s, host \"%s\" is running " "%s %s / %s%s"), - host, "\01", WEECHAT_NAME, WEECHAT_VERSION, __DATE__, + host, "\01", PACKAGE_NAME, PACKAGE_VERSION, __DATE__, &buf->nodename, &buf->sysname, &buf->release, &buf->machine, "\01\r\n"); free (buf); @@ -2418,7 +2421,7 @@ irc_cmd_recv_433 (t_irc_server *server, char *host, char *arguments) gui_printf (server->window, _("%s: nickname \"%s\" is already in use, " "trying 2nd nickname \"%s\"\n"), - WEECHAT_NAME, server->nick, server->nick2); + PACKAGE_NAME, server->nick, server->nick2); free (server->nick); server->nick = strdup (server->nick2); } @@ -2429,7 +2432,7 @@ irc_cmd_recv_433 (t_irc_server *server, char *host, char *arguments) gui_printf (server->window, _("%s: nickname \"%s\" is already in use, " "trying 3rd nickname \"%s\"\n"), - WEECHAT_NAME, server->nick, server->nick3); + PACKAGE_NAME, server->nick, server->nick3); free (server->nick); server->nick = strdup (server->nick3); } @@ -2438,7 +2441,7 @@ irc_cmd_recv_433 (t_irc_server *server, char *host, char *arguments) gui_printf (server->window, _("%s: all declared nicknames are already in use, " "closing connection with server!\n"), - WEECHAT_NAME); + PACKAGE_NAME); server_disconnect (server); return 0; } diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c index 147cfa19b..4c9c025a0 100644 --- a/src/irc/irc-send.c +++ b/src/irc/irc-send.c @@ -19,11 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-send.c: implementation of IRC commands (client to server), according to RFC 1459,2810,2811,2812 */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <unistd.h> #include <stdio.h> @@ -35,7 +38,7 @@ #include "../common/weechat.h" #include "irc.h" #include "../common/command.h" -#include "../common/config.h" +#include "../common/weeconfig.h" #include "../gui/gui.h" @@ -57,7 +60,7 @@ irc_login (t_irc_server *server) strcpy (hostname, _("unknown")); gui_printf (server->window, _("%s: using local hostname \"%s\"\n"), - WEECHAT_NAME, hostname); + PACKAGE_NAME, hostname); server_sendf (server, "NICK %s\r\n" "USER %s %s %s :%s\r\n", @@ -973,7 +976,7 @@ irc_cmd_send_version (t_irc_server *server, char *arguments) { irc_display_prefix (server->window, PREFIX_INFO); gui_printf (server->window, _("%s, compiled on %s %s\n"), - WEECHAT_NAME_AND_VERSION, + PACKAGE_STRING, __DATE__, __TIME__); server_sendf (server, "VERSION\r\n"); } diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c index ee1ead0e3..e7fe42880 100644 --- a/src/irc/irc-server.c +++ b/src/irc/irc-server.c @@ -19,10 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* irc-server.c: (dis)connection and communication with irc server */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <unistd.h> #include <stdio.h> @@ -480,7 +483,7 @@ server_connect (t_irc_server *server) gui_printf (server->window, _("%s: connecting to %s:%d...\n"), - WEECHAT_NAME, server->address, server->port); + PACKAGE_NAME, server->address, server->port); log_printf (_("connecting to server %s:%d...\n"), server->address, server->port); server->is_connected = 0; @@ -551,7 +554,7 @@ server_connect (t_irc_server *server) /* connection to server */ gui_printf (server->window, - _("%s: server IP is: %s\n"), WEECHAT_NAME, ip_address); + _("%s: server IP is: %s\n"), PACKAGE_NAME, ip_address); error = connect (server->sock4, (struct sockaddr *) &addr, sizeof (addr)); if (error != 0) |