mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 17:53:13 +02:00
Changes in IRC plugin to use new API
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SET(LIB_PROTOCOL_IRC_SRC irc.c irc.h irc-channel.c irc-channel.h irc-config.c
|
||||
irc-config.h irc-server.c irc-server.h)
|
||||
SET(LIB_PROTOCOL_IRC_SRC irc.c irc.h irc-channel.c irc-channel.h irc-command.c
|
||||
irc-command.h irc-config.c irc-config.h irc-server.c irc-server.h)
|
||||
|
||||
#SET(LIB_PROTOCOL_IRC_SRC irc.c irc.h irc-buffer.c irc-buffer.h irc-channel.c
|
||||
#irc-channel.h irc-command.c irc-command.h irc-color.c irc-color.h irc-config.c
|
||||
|
||||
@@ -24,27 +24,26 @@ irc_la_SOURCES = irc.c \
|
||||
irc.h \
|
||||
irc-channel.c \
|
||||
irc-channel.h \
|
||||
irc-color.c \
|
||||
irc-color.h \
|
||||
irc-command.c \
|
||||
irc-command.h \
|
||||
irc-config.c \
|
||||
irc-config.h \
|
||||
irc-display.c \
|
||||
irc-display.h \
|
||||
irc-nick.c \
|
||||
irc-nick.h \
|
||||
irc-server.c \
|
||||
irc-server.h
|
||||
|
||||
# irc.c \
|
||||
# irc.h \
|
||||
# irc-buffer.c \
|
||||
# irc-buffer.h \
|
||||
# irc-command.c \
|
||||
# irc-command.h \
|
||||
# irc-color.c \
|
||||
# irc-color.h \
|
||||
# irc-dcc.c \
|
||||
# irc-dcc.h \
|
||||
# irc-display.c \
|
||||
# irc-input.c \
|
||||
# irc-log.c \
|
||||
# irc-mode.c \
|
||||
# irc-nick.c \
|
||||
# irc-nick.h \
|
||||
# irc-protocol.c \
|
||||
# irc-protocol.h
|
||||
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../../core/weechat.h"
|
||||
#include "irc.h"
|
||||
#include "irc-color.h"
|
||||
#include "../../gui/gui.h"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+825
-848
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,18 @@
|
||||
#ifndef __WEECHAT_IRC_COMMAND_H
|
||||
#define __WEECHAT_IRC_COMMAND_H 1
|
||||
|
||||
#define IRC_COMMAND_GET_SERVER(buffer) \
|
||||
struct t_irc_server *ptr_server = irc_server_search ( \
|
||||
weechat_buffer_get (buffer, "category"))
|
||||
|
||||
#define IRC_COMMAND_GET_SERVER_CHANNEL(buffer) \
|
||||
struct t_irc_server *ptr_server = irc_server_search ( \
|
||||
weechat_buffer_get (buffer, "category")); \
|
||||
struct t_irc_channel *ptr_channel = irc_channel_search ( \
|
||||
ptr_server, \
|
||||
weechat_buffer_get (buffer, "name"))
|
||||
|
||||
|
||||
extern void irc_command_init ();
|
||||
|
||||
#endif /* irc-command.h */
|
||||
|
||||
@@ -384,6 +384,19 @@ irc_nick_set_away (struct t_irc_channel *channel, struct t_irc_nick *nick, int i
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_nick_as_prefix: return string with nick to display as prefix on buffer
|
||||
* (string will end by a tab)
|
||||
*/
|
||||
|
||||
char *
|
||||
irc_nick_as_prefix (struct t_irc_nick *nick)
|
||||
{
|
||||
static char result[10] = "";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_nick_print_log: print nick infos in log (usually for crash dump)
|
||||
*/
|
||||
|
||||
@@ -62,6 +62,7 @@ extern void irc_nick_free_all (struct t_irc_channel *);
|
||||
extern struct t_irc_nick *irc_nick_search (struct t_irc_channel *, char *);
|
||||
extern void irc_nick_count (struct t_irc_channel *, int *, int *, int *, int *, int *);
|
||||
extern void irc_nick_set_away (struct t_irc_channel *, struct t_irc_nick *, int);
|
||||
extern char *irc_nick_as_prefix (struct t_irc_nick *);
|
||||
extern void irc_nick_print_log (struct t_irc_nick *);
|
||||
|
||||
#endif /* irc-nick.h */
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
|
||||
#define weechat_plugin weechat_irc_plugin
|
||||
|
||||
#define IRC_COLOR_CHAT weechat_color("color_chat")
|
||||
#define IRC_COLOR_CHAT_CHANNEL weechat_color("color_chat_channel")
|
||||
#define IRC_COLOR_CHAT_DELIMITERS weechat_color("color_chat_delimiters")
|
||||
#define IRC_COLOR_CHAT_NICK weechat_color("color_chat_nick")
|
||||
#define IRC_COLOR_CHAT_SERVER weechat_color("color_chat_server")
|
||||
|
||||
extern struct t_weechat_plugin *weechat_plugin;
|
||||
extern struct t_weechat_plugin *weechat_plugin;
|
||||
extern struct t_hook *irc_timer_check_away;
|
||||
|
||||
Reference in New Issue
Block a user