1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Expose functions for testing

This commit is contained in:
Will Storey 2018-08-11 10:49:26 -07:00
parent 2d6033542e
commit 2ccb312b8b
3 changed files with 17 additions and 3 deletions

View File

@ -40,6 +40,7 @@ pkginc_irc_coredir=$(pkgincludedir)/src/irc/core
pkginc_irc_core_HEADERS = \
bans.h \
ctcp.h \
channel-events.h \
channel-rejoin.h \
irc.h \
irc-channels.h \

View File

@ -21,6 +21,7 @@
#include "module.h"
#include "signals.h"
#include "misc.h"
#include "channel-events.h"
#include "channels-setup.h"
#include "settings.h"
#include "recode.h"
@ -176,7 +177,7 @@ static void set_topic_info(CHANNEL_REC *const chanrec, char const *const setby,
}
}
static void event_topic_get(IRC_SERVER_REC *server, const char *data)
void event_topic_get(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel, *topic;
@ -187,7 +188,7 @@ static void event_topic_get(IRC_SERVER_REC *server, const char *data)
g_free(params);
}
static void event_topic(IRC_SERVER_REC *server, const char *data,
void event_topic(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr)
{
char *params, *channel, *topic, *mask;
@ -202,7 +203,7 @@ static void event_topic(IRC_SERVER_REC *server, const char *data,
g_free(params);
}
static void event_topic_info(IRC_SERVER_REC *server, const char *data)
void event_topic_info(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel, *topicby, *topictime;
time_t t;

View File

@ -0,0 +1,12 @@
#ifndef __CHANNEL_EVENTS_H
#define __CHANNEL_EVENTS_H
#include "irc.h"
/* Not private for tests. */
void event_topic_get(IRC_SERVER_REC *, const char *);
void event_topic(IRC_SERVER_REC *, const char *,
const char *, const char *);
void event_topic_info(IRC_SERVER_REC *, const char *);
#endif