mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
In core/module-formats.h: IRCTXT_ -> TXT_
Added "message irc ctcp" signal to print CTCPs git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1094 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e46e2b5e09
commit
1de2aade40
@ -101,7 +101,7 @@ static void signal_window_item_changed(WINDOW_REC *window, WI_ITEM_REC *item)
|
||||
|
||||
if (g_slist_length(window->items) > 1 && IS_CHANNEL(item)) {
|
||||
printformat(item->server, item->name, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_TALKING_IN, item->name);
|
||||
TXT_TALKING_IN, item->name);
|
||||
signal_stop();
|
||||
}
|
||||
}
|
||||
@ -161,17 +161,17 @@ static void cmd_channel_list_joined(void)
|
||||
GSList *nicklist, *tmp, *ntmp;
|
||||
|
||||
if (channels == NULL) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_NOT_IN_CHANNELS);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_NOT_IN_CHANNELS);
|
||||
return;
|
||||
}
|
||||
|
||||
/* print active channel */
|
||||
channel = CHANNEL(active_win->active);
|
||||
if (channel != NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CURRENT_CHANNEL, channel->name);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CURRENT_CHANNEL, channel->name);
|
||||
|
||||
/* print list of all channels, their modes, server tags and nicks */
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANLIST_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_CHANLIST_HEADER);
|
||||
for (tmp = channels; tmp != NULL; tmp = tmp->next) {
|
||||
channel = tmp->data;
|
||||
|
||||
@ -184,7 +184,7 @@ static void cmd_channel_list_joined(void)
|
||||
}
|
||||
|
||||
if (nicks->len > 1) g_string_truncate(nicks, nicks->len-1);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANLIST_LINE,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_CHANLIST_LINE,
|
||||
channel->name, channel->mode, channel->server->tag, nicks->str);
|
||||
|
||||
g_slist_free(nicklist);
|
||||
@ -199,7 +199,7 @@ static void cmd_channel_list(void)
|
||||
GSList *tmp;
|
||||
|
||||
str = g_string_new(NULL);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANSETUP_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_CHANSETUP_HEADER);
|
||||
for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) {
|
||||
CHANNEL_SETUP_REC *rec = tmp->data;
|
||||
|
||||
@ -212,12 +212,12 @@ static void cmd_channel_list(void)
|
||||
g_string_sprintfa(str, "botcmd: %s, ", rec->autosendcmd);
|
||||
|
||||
if (str->len > 2) g_string_truncate(str, str->len-2);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANSETUP_LINE,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_CHANSETUP_LINE,
|
||||
rec->name, rec->chatnet == NULL ? "" : rec->chatnet,
|
||||
rec->password == NULL ? "" : rec->password, str->str);
|
||||
}
|
||||
g_string_free(str, TRUE);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANSETUP_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_CHANSETUP_FOOTER);
|
||||
}
|
||||
|
||||
static void cmd_channel(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||
@ -262,7 +262,7 @@ static void cmd_channel_add(const char *data)
|
||||
if (botcmdarg != NULL && *botcmdarg != '\0') rec->autosendcmd = g_strdup(botcmdarg);
|
||||
if (*password != '\0' && strcmp(password, "-") != 0) rec->password = g_strdup(password);
|
||||
channels_setup_create(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CHANSETUP_ADDED, channel, chatnet);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CHANSETUP_ADDED, channel, chatnet);
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
}
|
||||
@ -281,9 +281,9 @@ static void cmd_channel_remove(const char *data)
|
||||
|
||||
rec = channels_setup_find(channel, chatnet);
|
||||
if (rec == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CHANSETUP_NOT_FOUND, channel, chatnet);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CHANSETUP_NOT_FOUND, channel, chatnet);
|
||||
else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CHANSETUP_REMOVED, channel, chatnet);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CHANSETUP_REMOVED, channel, chatnet);
|
||||
channels_setup_destroy(rec);
|
||||
}
|
||||
cmd_params_free(free_arg);
|
||||
|
@ -34,18 +34,18 @@
|
||||
#define PASTE_CHECK_SPEED 200 /* 0.2 sec */
|
||||
|
||||
static int ret_texts[] = {
|
||||
IRCTXT_OPTION_UNKNOWN,
|
||||
IRCTXT_OPTION_AMBIGUOUS,
|
||||
IRCTXT_OPTION_MISSING_ARG,
|
||||
IRCTXT_COMMAND_UNKNOWN,
|
||||
IRCTXT_COMMAND_AMBIGUOUS,
|
||||
TXT_OPTION_UNKNOWN,
|
||||
TXT_OPTION_AMBIGUOUS,
|
||||
TXT_OPTION_MISSING_ARG,
|
||||
TXT_COMMAND_UNKNOWN,
|
||||
TXT_COMMAND_AMBIGUOUS,
|
||||
-1,
|
||||
IRCTXT_NOT_ENOUGH_PARAMS,
|
||||
IRCTXT_NOT_CONNECTED,
|
||||
IRCTXT_NOT_JOINED,
|
||||
IRCTXT_CHAN_NOT_FOUND,
|
||||
IRCTXT_CHAN_NOT_SYNCED,
|
||||
IRCTXT_NOT_GOOD_IDEA
|
||||
TXT_NOT_ENOUGH_PARAMS,
|
||||
TXT_NOT_CONNECTED,
|
||||
TXT_NOT_JOINED,
|
||||
TXT_CHAN_NOT_FOUND,
|
||||
TXT_CHAN_NOT_SYNCED,
|
||||
TXT_NOT_GOOD_IDEA
|
||||
};
|
||||
|
||||
/* keep the whole command line here temporarily. we need it in
|
||||
|
@ -119,7 +119,7 @@ static void ignore_print(int index, IGNORE_REC *rec)
|
||||
if (options->len > 1) g_string_truncate(options, options->len-1);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
|
||||
IRCTXT_IGNORE_LINE, index,
|
||||
TXT_IGNORE_LINE, index,
|
||||
key != NULL ? key : "",
|
||||
levels != NULL ? levels : "", options->str);
|
||||
g_string_free(options, TRUE);
|
||||
@ -138,14 +138,14 @@ static void cmd_ignore_show(void)
|
||||
GSList *tmp;
|
||||
int index;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_IGNORE_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_IGNORE_HEADER);
|
||||
index = 1;
|
||||
for (tmp = ignores; tmp != NULL; tmp = tmp->next, index++) {
|
||||
IGNORE_REC *rec = tmp->data;
|
||||
|
||||
ignore_print(index, rec);
|
||||
}
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_IGNORE_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_IGNORE_FOOTER);
|
||||
}
|
||||
|
||||
/* SYNTAX: IGNORE [-regexp | -word] [-pattern <pattern>] [-except] [-replies]
|
||||
@ -212,12 +212,12 @@ static void cmd_ignore(const char *data)
|
||||
rec->time = timestr == NULL ? 0 : atoi(timestr);
|
||||
|
||||
if (rec->level == 0 && rec->except_level == 0) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_UNIGNORED,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNIGNORED,
|
||||
rec->mask == NULL ? "" : rec->mask);
|
||||
} else {
|
||||
key = ignore_get_key(rec);
|
||||
levels = ignore_get_levels(rec->level, rec->except_level);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_IGNORED, key, levels);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_IGNORED, key, levels);
|
||||
g_free(key);
|
||||
g_free(levels);
|
||||
}
|
||||
@ -238,7 +238,7 @@ static void fe_unignore(IGNORE_REC *rec)
|
||||
char *key;
|
||||
|
||||
key = ignore_get_key(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_UNIGNORED, key);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNIGNORED, key);
|
||||
g_free(key);
|
||||
|
||||
rec->level = 0;
|
||||
@ -272,7 +272,7 @@ static void cmd_unignore(const char *data)
|
||||
}
|
||||
|
||||
if (rec == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_IGNORE_NOT_FOUND, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_IGNORE_NOT_FOUND, data);
|
||||
else
|
||||
fe_unignore(rec);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ static void cmd_log_open(const char *data)
|
||||
/* start logging */
|
||||
if (log_start_logging(log)) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_LOG_OPENED, fname);
|
||||
TXT_LOG_OPENED, fname);
|
||||
} else {
|
||||
log_close(log);
|
||||
}
|
||||
@ -129,10 +129,10 @@ static void cmd_log_close(const char *data)
|
||||
|
||||
log = log_find_from_data(data);
|
||||
if (log == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_LOG_NOT_OPEN, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_LOG_NOT_OPEN, data);
|
||||
else {
|
||||
log_close(log);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_CLOSED, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_CLOSED, data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ static void cmd_log_start(const char *data)
|
||||
log = log_find_from_data(data);
|
||||
if (log != NULL) {
|
||||
log_start_logging(log);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_OPENED, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_OPENED, data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,10 +155,10 @@ static void cmd_log_stop(const char *data)
|
||||
|
||||
log = log_find_from_data(data);
|
||||
if (log == NULL || log->handle == -1)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_LOG_NOT_OPEN, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_LOG_NOT_OPEN, data);
|
||||
else {
|
||||
log_stop_logging(log);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_CLOSED, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_CLOSED, data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ static void cmd_log_list(void)
|
||||
char *levelstr, *items;
|
||||
int index;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_LOG_LIST_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_LOG_LIST_HEADER);
|
||||
for (tmp = logs, index = 1; tmp != NULL; tmp = tmp->next, index++) {
|
||||
LOG_REC *rec = tmp->data;
|
||||
|
||||
@ -199,14 +199,14 @@ static void cmd_log_list(void)
|
||||
items = rec->items == NULL ? NULL :
|
||||
log_items_get_list(rec);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_LOG_LIST,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_LOG_LIST,
|
||||
index, rec->fname, items != NULL ? items : "",
|
||||
levelstr, rec->autoopen ? " -autoopen" : "");
|
||||
|
||||
g_free_not_null(items);
|
||||
g_free(levelstr);
|
||||
}
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_LOG_LIST_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_LOG_LIST_FOOTER);
|
||||
}
|
||||
|
||||
static void cmd_log(const char *data, SERVER_REC *server, void *item)
|
||||
@ -259,7 +259,7 @@ static void cmd_window_log(const char *data)
|
||||
open_log = log == NULL;
|
||||
close_log = log != NULL;
|
||||
} else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_NOT_TOGGLE);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_NOT_TOGGLE);
|
||||
cmd_params_free(free_arg);
|
||||
return;
|
||||
}
|
||||
@ -278,10 +278,10 @@ static void cmd_window_log(const char *data)
|
||||
|
||||
if (open_log && log != NULL) {
|
||||
log_start_logging(log);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_OPENED, log->fname);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_OPENED, log->fname);
|
||||
} else if (close_log && log != NULL && log->handle != -1) {
|
||||
log_stop_logging(log);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_CLOSED, log->fname);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_CLOSED, log->fname);
|
||||
}
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
@ -298,7 +298,7 @@ static void cmd_window_logfile(const char *data)
|
||||
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM, window, NULL, NULL);
|
||||
|
||||
if (log != NULL) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_WINDOWLOG_FILE_LOGGING);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOWLOG_FILE_LOGGING);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ static void cmd_window_logfile(const char *data)
|
||||
log_item_add(log, LOG_ITEM_WINDOW_REFNUM, window, NULL);
|
||||
log_update(log);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_WINDOWLOG_FILE, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOWLOG_FILE, data);
|
||||
}
|
||||
|
||||
/* window's refnum changed - update the logs to log the new window refnum */
|
||||
@ -522,13 +522,13 @@ static void sig_window_item_destroy(WINDOW_REC *window, WI_ITEM_REC *item)
|
||||
static void sig_log_locked(LOG_REC *log)
|
||||
{
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_LOG_LOCKED, log->fname);
|
||||
TXT_LOG_LOCKED, log->fname);
|
||||
}
|
||||
|
||||
static void sig_log_create_failed(LOG_REC *log)
|
||||
{
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_LOG_CREATE_FAILED, log->fname, g_strerror(errno));
|
||||
TXT_LOG_CREATE_FAILED, log->fname, g_strerror(errno));
|
||||
}
|
||||
|
||||
static void sig_awaylog_show(LOG_REC *log, gpointer pmsgs, gpointer pfilepos)
|
||||
@ -540,9 +540,9 @@ static void sig_awaylog_show(LOG_REC *log, gpointer pmsgs, gpointer pfilepos)
|
||||
filepos = GPOINTER_TO_INT(pfilepos);
|
||||
|
||||
if (msgs == 0)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_NO_AWAY_MSGS, log->fname);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_NO_AWAY_MSGS, log->fname);
|
||||
else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOG_AWAY_MSGS, log->fname, msgs);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_AWAY_MSGS, log->fname, msgs);
|
||||
|
||||
str = g_strdup_printf("\"%s\" %d", log->fname, filepos);
|
||||
signal_emit("command cat", 1, str);
|
||||
|
@ -164,11 +164,11 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
||||
if (color != NULL) {
|
||||
/* highlighted nick */
|
||||
printformat(server, target, level,
|
||||
IRCTXT_PUBMSG_HILIGHT,
|
||||
TXT_PUBMSG_HILIGHT,
|
||||
color, nick, msg, nickmode);
|
||||
} else {
|
||||
printformat(server, target, level,
|
||||
for_me ? IRCTXT_PUBMSG_ME : IRCTXT_PUBMSG,
|
||||
for_me ? TXT_PUBMSG_ME : TXT_PUBMSG,
|
||||
nick, msg, nickmode);
|
||||
}
|
||||
} else {
|
||||
@ -176,12 +176,12 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
||||
if (color != NULL) {
|
||||
/* highlighted nick */
|
||||
printformat(server, target, level,
|
||||
IRCTXT_PUBMSG_HILIGHT_CHANNEL,
|
||||
TXT_PUBMSG_HILIGHT_CHANNEL,
|
||||
color, nick, target, msg, nickmode);
|
||||
} else {
|
||||
printformat(server, target, level,
|
||||
for_me ? IRCTXT_PUBMSG_ME_CHANNEL :
|
||||
IRCTXT_PUBMSG_CHANNEL,
|
||||
for_me ? TXT_PUBMSG_ME_CHANNEL :
|
||||
TXT_PUBMSG_CHANNEL,
|
||||
nick, target, msg, nickmode);
|
||||
}
|
||||
}
|
||||
@ -204,8 +204,8 @@ static void sig_message_private(SERVER_REC *server, const char *msg,
|
||||
freemsg = NULL;
|
||||
|
||||
printformat(server, nick, MSGLEVEL_MSGS,
|
||||
query == NULL ? IRCTXT_MSG_PRIVATE :
|
||||
IRCTXT_MSG_PRIVATE_QUERY, nick, address, msg);
|
||||
query == NULL ? TXT_MSG_PRIVATE :
|
||||
TXT_MSG_PRIVATE_QUERY, nick, address, msg);
|
||||
|
||||
g_free_not_null(freemsg);
|
||||
}
|
||||
@ -231,10 +231,10 @@ static void print_own_channel_message(SERVER_REC *server, CHANNEL_REC *channel,
|
||||
|
||||
if (!print_channel) {
|
||||
printformat(server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT,
|
||||
IRCTXT_OWN_MSG, server->nick, msg, nickmode);
|
||||
TXT_OWN_MSG, server->nick, msg, nickmode);
|
||||
} else {
|
||||
printformat(server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT,
|
||||
IRCTXT_OWN_MSG_CHANNEL, server->nick, target, msg, nickmode);
|
||||
TXT_OWN_MSG_CHANNEL, server->nick, target, msg, nickmode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,8 +266,8 @@ static void sig_message_own_private(SERVER_REC *server, const char *msg,
|
||||
strcmp(origtarget, ".") == 0);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
*origtarget == ',' ? IRCTXT_NO_MSGS_GOT :
|
||||
IRCTXT_NO_MSGS_SENT);
|
||||
*origtarget == ',' ? TXT_NO_MSGS_GOT :
|
||||
TXT_NO_MSGS_SENT);
|
||||
signal_stop();
|
||||
return;
|
||||
}
|
||||
@ -275,15 +275,15 @@ static void sig_message_own_private(SERVER_REC *server, const char *msg,
|
||||
query = privmsg_get_query(server, target, TRUE, MSGLEVEL_MSGS);
|
||||
printformat(server, target,
|
||||
MSGLEVEL_MSGS | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT,
|
||||
query == NULL ? IRCTXT_OWN_MSG_PRIVATE :
|
||||
IRCTXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick);
|
||||
query == NULL ? TXT_OWN_MSG_PRIVATE :
|
||||
TXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick);
|
||||
}
|
||||
|
||||
static void sig_message_join(SERVER_REC *server, const char *channel,
|
||||
const char *nick, const char *address)
|
||||
{
|
||||
printformat(server, channel, MSGLEVEL_JOINS,
|
||||
IRCTXT_JOIN, nick, address, channel);
|
||||
TXT_JOIN, nick, address, channel);
|
||||
}
|
||||
|
||||
static void sig_message_part(SERVER_REC *server, const char *channel,
|
||||
@ -291,7 +291,7 @@ static void sig_message_part(SERVER_REC *server, const char *channel,
|
||||
const char *reason)
|
||||
{
|
||||
printformat(server, channel, MSGLEVEL_PARTS,
|
||||
IRCTXT_PART, nick, address, channel, reason);
|
||||
TXT_PART, nick, address, channel, reason);
|
||||
}
|
||||
|
||||
static void sig_message_quit(SERVER_REC *server, const char *nick,
|
||||
@ -334,7 +334,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
||||
if (g_slist_find(windows, window) == NULL) {
|
||||
windows = g_slist_append(windows, window);
|
||||
printformat(server, rec->name, MSGLEVEL_QUITS,
|
||||
IRCTXT_QUIT, nick, address, reason);
|
||||
TXT_QUIT, nick, address, reason);
|
||||
}
|
||||
}
|
||||
count++;
|
||||
@ -347,7 +347,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
||||
QUERY_REC *query = query_find(server, nick);
|
||||
if (query != NULL) {
|
||||
printformat(server, nick, MSGLEVEL_QUITS,
|
||||
IRCTXT_QUIT, nick, address, reason);
|
||||
TXT_QUIT, nick, address, reason);
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
|
||||
if (chans->len > 0)
|
||||
g_string_truncate(chans, chans->len-1);
|
||||
printformat(server, print_channel, MSGLEVEL_QUITS,
|
||||
count <= 1 ? IRCTXT_QUIT : IRCTXT_QUIT_ONCE,
|
||||
count <= 1 ? TXT_QUIT : TXT_QUIT_ONCE,
|
||||
nick, address, reason, chans->str);
|
||||
}
|
||||
g_string_free(chans, TRUE);
|
||||
@ -366,7 +366,7 @@ static void sig_message_kick(SERVER_REC *server, const char *channel,
|
||||
const char *address, const char *reason)
|
||||
{
|
||||
printformat(server, channel, MSGLEVEL_KICKS,
|
||||
IRCTXT_KICK, nick, channel, kicker, reason);
|
||||
TXT_KICK, nick, channel, kicker, reason);
|
||||
}
|
||||
|
||||
static void print_nick_change_channel(SERVER_REC *server, const char *channel,
|
||||
@ -379,7 +379,7 @@ static void print_nick_change_channel(SERVER_REC *server, const char *channel,
|
||||
return;
|
||||
|
||||
printformat(server, channel, MSGLEVEL_NICKS,
|
||||
ownnick ? IRCTXT_YOUR_NICK_CHANGED : IRCTXT_NICK_CHANGED,
|
||||
ownnick ? TXT_YOUR_NICK_CHANGED : TXT_NICK_CHANGED,
|
||||
oldnick, newnick);
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ static void print_nick_change(SERVER_REC *server, const char *newnick,
|
||||
|
||||
if (!msgprint && ownnick) {
|
||||
printformat(server, NULL, MSGLEVEL_NICKS,
|
||||
IRCTXT_YOUR_NICK_CHANGED, oldnick, newnick);
|
||||
TXT_YOUR_NICK_CHANGED, oldnick, newnick);
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ static void sig_message_invite(SERVER_REC *server, const char *channel,
|
||||
|
||||
str = show_lowascii(channel);
|
||||
printformat(server, NULL, MSGLEVEL_INVITES,
|
||||
IRCTXT_INVITE, nick, str);
|
||||
TXT_INVITE, nick, str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ static void sig_message_topic(SERVER_REC *server, const char *channel,
|
||||
const char *nick, const char *address)
|
||||
{
|
||||
printformat(server, channel, MSGLEVEL_TOPICS,
|
||||
*topic != '\0' ? IRCTXT_NEW_TOPIC : IRCTXT_TOPIC_UNSET,
|
||||
*topic != '\0' ? TXT_NEW_TOPIC : TXT_TOPIC_UNSET,
|
||||
nick, channel, topic);
|
||||
}
|
||||
|
||||
|
@ -31,25 +31,25 @@ static void sig_module_error(void *number, const char *module, const char *data)
|
||||
{
|
||||
switch (GPOINTER_TO_INT(number)) {
|
||||
case MODULE_ERROR_ALREADY_LOADED:
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_MODULE_ALREADY_LOADED, module);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_MODULE_ALREADY_LOADED, module);
|
||||
break;
|
||||
case MODULE_ERROR_LOAD:
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_MODULE_LOAD_ERROR, module, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_MODULE_LOAD_ERROR, module, data);
|
||||
break;
|
||||
case MODULE_ERROR_INVALID:
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_MODULE_INVALID, module);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_MODULE_INVALID, module);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sig_module_loaded(MODULE_REC *rec)
|
||||
{
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_MODULE_LOADED, rec->name);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_MODULE_LOADED, rec->name);
|
||||
}
|
||||
|
||||
static void sig_module_unloaded(MODULE_REC *rec)
|
||||
{
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_MODULE_UNLOADED, rec->name);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_MODULE_UNLOADED, rec->name);
|
||||
}
|
||||
|
||||
/* SYNTAX: LOAD <module> */
|
||||
|
@ -62,7 +62,7 @@ static void signal_query_created(QUERY_REC *query, gpointer automatic)
|
||||
|
||||
window_item_create((WI_ITEM_REC *) query, GPOINTER_TO_INT(automatic));
|
||||
printformat(query->server, query->name, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_QUERY_STARTED, query->name);
|
||||
TXT_QUERY_STARTED, query->name);
|
||||
}
|
||||
|
||||
static void signal_query_created_curwin(QUERY_REC *query)
|
||||
@ -162,7 +162,7 @@ static void cmd_window_server(const char *data)
|
||||
/* /WINDOW SERVER used in a query window */
|
||||
query_change_server(query, server);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_QUERY_SERVER_CHANGED,
|
||||
TXT_QUERY_SERVER_CHANGED,
|
||||
query->name, server->tag);
|
||||
signal_stop();
|
||||
}
|
||||
@ -182,7 +182,7 @@ static void cmd_unquery(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||
query = query_find(server, data);
|
||||
if (query == NULL) {
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTERROR,
|
||||
IRCTXT_NO_QUERY, data);
|
||||
TXT_NO_QUERY, data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ static void print_servers(void)
|
||||
for (tmp = servers; tmp != NULL; tmp = tmp->next) {
|
||||
SERVER_REC *rec = tmp->data;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, IRCTXT_SERVER_LIST,
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, TXT_SERVER_LIST,
|
||||
rec->tag, rec->connrec->address, rec->connrec->port,
|
||||
rec->connrec->chatnet == NULL ? "" : rec->connrec->chatnet, rec->connrec->nick);
|
||||
}
|
||||
@ -52,7 +52,7 @@ static void print_lookup_servers(void)
|
||||
for (tmp = lookup_servers; tmp != NULL; tmp = tmp->next) {
|
||||
SERVER_REC *rec = tmp->data;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, IRCTXT_SERVER_LOOKUP_LIST,
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, TXT_SERVER_LOOKUP_LIST,
|
||||
rec->tag, rec->connrec->address, rec->connrec->port,
|
||||
rec->connrec->chatnet == NULL ? "" : rec->connrec->chatnet, rec->connrec->nick);
|
||||
}
|
||||
@ -71,7 +71,7 @@ static void print_reconnects(void)
|
||||
tag = g_strdup_printf("RECON-%d", rec->tag);
|
||||
left = rec->next_connect-time(NULL);
|
||||
next_connect = g_strdup_printf("%02d:%02d", left/60, left%60);
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, IRCTXT_SERVER_RECONNECT_LIST,
|
||||
printformat(NULL, NULL, MSGLEVEL_CRAP, TXT_SERVER_RECONNECT_LIST,
|
||||
tag, conn->address, conn->port,
|
||||
conn->chatnet == NULL ? "" : conn->chatnet,
|
||||
conn->nick, next_connect);
|
||||
@ -137,7 +137,7 @@ static void cmd_server_add(const char *data)
|
||||
signal_emit("server add fill", 2, rec, optlist);
|
||||
|
||||
server_setup_add(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_SETUPSERVER_ADDED, addr, port);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SETUPSERVER_ADDED, addr, port);
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
}
|
||||
@ -159,10 +159,10 @@ static void cmd_server_remove(const char *data)
|
||||
rec = server_setup_find_port(addr, atoi(port));
|
||||
|
||||
if (rec == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_SETUPSERVER_NOT_FOUND, addr, port);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SETUPSERVER_NOT_FOUND, addr, port);
|
||||
else {
|
||||
server_setup_remove(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_SETUPSERVER_REMOVED, addr, port);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SETUPSERVER_REMOVED, addr, port);
|
||||
}
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
@ -207,7 +207,7 @@ static void sig_server_looking(SERVER_REC *server)
|
||||
{
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_LOOKING_UP, server->connrec->address);
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOOKING_UP, server->connrec->address);
|
||||
}
|
||||
|
||||
static void sig_server_connecting(SERVER_REC *server, IPADDR *ip)
|
||||
@ -218,7 +218,7 @@ static void sig_server_connecting(SERVER_REC *server, IPADDR *ip)
|
||||
g_return_if_fail(ip != NULL);
|
||||
|
||||
net_ip2host(ip, ipaddr);
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CONNECTING,
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CONNECTING,
|
||||
server->connrec->address, ipaddr, server->connrec->port);
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ static void sig_server_connected(SERVER_REC *server)
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONNECTION_ESTABLISHED, server->connrec->address);
|
||||
TXT_CONNECTION_ESTABLISHED, server->connrec->address);
|
||||
}
|
||||
|
||||
static void sig_connect_failed(SERVER_REC *server, gchar *msg)
|
||||
@ -238,10 +238,10 @@ static void sig_connect_failed(SERVER_REC *server, gchar *msg)
|
||||
/* no message so this wasn't unexpected fail - send
|
||||
connection_lost message instead */
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONNECTION_LOST, server->connrec->address);
|
||||
TXT_CONNECTION_LOST, server->connrec->address);
|
||||
} else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||
IRCTXT_CANT_CONNECT, server->connrec->address, server->connrec->port, msg);
|
||||
TXT_CANT_CONNECT, server->connrec->address, server->connrec->port, msg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ static void sig_server_disconnected(SERVER_REC *server)
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONNECTION_LOST, server->connrec->address);
|
||||
TXT_CONNECTION_LOST, server->connrec->address);
|
||||
}
|
||||
|
||||
static void sig_server_quit(SERVER_REC *server, const char *msg)
|
||||
@ -258,7 +258,7 @@ static void sig_server_quit(SERVER_REC *server, const char *msg)
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_SERVER_QUIT, server->connrec->address, msg);
|
||||
TXT_SERVER_QUIT, server->connrec->address, msg);
|
||||
}
|
||||
|
||||
static void sig_server_lag_disconnected(SERVER_REC *server)
|
||||
@ -266,7 +266,7 @@ static void sig_server_lag_disconnected(SERVER_REC *server)
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_LAG_DISCONNECTED, server->connrec->address, time(NULL)-server->lag_sent);
|
||||
TXT_LAG_DISCONNECTED, server->connrec->address, time(NULL)-server->lag_sent);
|
||||
}
|
||||
|
||||
static void sig_server_reconnect_removed(RECONNECT_REC *reconnect)
|
||||
@ -274,7 +274,7 @@ static void sig_server_reconnect_removed(RECONNECT_REC *reconnect)
|
||||
g_return_if_fail(reconnect != NULL);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_RECONNECT_REMOVED, reconnect->conn->address, reconnect->conn->port,
|
||||
TXT_RECONNECT_REMOVED, reconnect->conn->address, reconnect->conn->port,
|
||||
reconnect->conn->chatnet == NULL ? "" : reconnect->conn->chatnet);
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ static void sig_server_reconnect_not_found(const char *tag)
|
||||
g_return_if_fail(tag != NULL);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_RECONNECT_NOT_FOUND, tag);
|
||||
TXT_RECONNECT_NOT_FOUND, tag);
|
||||
}
|
||||
|
||||
void fe_server_init(void)
|
||||
|
@ -62,7 +62,7 @@ static void set_boolean(const char *key, const char *value)
|
||||
else if (g_strcasecmp(value, "TOGGLE") == 0)
|
||||
settings_set_bool(key, !settings_get_bool(key));
|
||||
else
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_NOT_TOGGLE);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_NOT_TOGGLE);
|
||||
}
|
||||
|
||||
/* SYNTAX: SET [-clear] [<key> [<value>] */
|
||||
@ -160,7 +160,7 @@ static void show_aliases(const char *alias)
|
||||
GSList *tmp, *list;
|
||||
int aliaslen;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_ALIASLIST_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_ALIASLIST_HEADER);
|
||||
|
||||
node = iconfig_node_traverse("aliases", FALSE);
|
||||
tmp = node == NULL ? NULL : node->value;
|
||||
@ -184,20 +184,20 @@ static void show_aliases(const char *alias)
|
||||
for (tmp = list; tmp != NULL; tmp = tmp->next) {
|
||||
CONFIG_NODE *node = tmp->data;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_ALIASLIST_LINE,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_ALIASLIST_LINE,
|
||||
node->key, node->value);
|
||||
}
|
||||
g_slist_free(list);
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_ALIASLIST_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_ALIASLIST_FOOTER);
|
||||
}
|
||||
|
||||
static void alias_remove(const char *alias)
|
||||
{
|
||||
if (iconfig_get_str("aliases", alias, NULL) == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_ALIAS_NOT_FOUND, alias);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_ALIAS_NOT_FOUND, alias);
|
||||
else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_ALIAS_REMOVED, alias);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_ALIAS_REMOVED, alias);
|
||||
iconfig_set_str("aliases", alias, NULL);
|
||||
}
|
||||
}
|
||||
@ -218,7 +218,7 @@ static void cmd_alias(const char *data)
|
||||
} else if (*alias == '\0' || *value == '\0')
|
||||
show_aliases(alias);
|
||||
else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_ALIAS_ADDED, alias);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_ALIAS_ADDED, alias);
|
||||
iconfig_set_str("aliases", alias, value);
|
||||
}
|
||||
cmd_params_free(free_arg);
|
||||
@ -242,7 +242,7 @@ static void cmd_reload(const char *data)
|
||||
g_strdup_printf("%s/.irssi/config", g_get_home_dir());
|
||||
if (settings_reread(fname)) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONFIG_RELOADED, fname);
|
||||
TXT_CONFIG_RELOADED, fname);
|
||||
}
|
||||
g_free(fname);
|
||||
}
|
||||
@ -251,7 +251,7 @@ static void settings_save_fe(const char *fname)
|
||||
{
|
||||
if (settings_save(fname)) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONFIG_SAVED, fname);
|
||||
TXT_CONFIG_SAVED, fname);
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ static void cmd_save(const char *data)
|
||||
}
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_CONFIG_MODIFIED, data);
|
||||
TXT_CONFIG_MODIFIED, data);
|
||||
keyboard_entry_redirect((SIGNAL_FUNC) settings_save_confirm,
|
||||
_("Overwrite config (y/N)?"),
|
||||
0, g_strdup(data));
|
||||
|
@ -437,7 +437,7 @@ static void sig_print_text(void)
|
||||
|
||||
/* day changed, print notice about it to every window */
|
||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||
printformat_window(tmp->data, MSGLEVEL_NEVER, IRCTXT_DAYCHANGE,
|
||||
printformat_window(tmp->data, MSGLEVEL_NEVER, TXT_DAYCHANGE,
|
||||
tm->tm_mday, tm->tm_mon+1,
|
||||
1900+tm->tm_year, month);
|
||||
}
|
||||
|
@ -381,9 +381,9 @@ char *format_get_level_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
|
||||
int format;
|
||||
|
||||
if (dest->level & LINE_START_IRSSI_LEVEL)
|
||||
format = IRCTXT_LINE_START_IRSSI;
|
||||
format = TXT_LINE_START_IRSSI;
|
||||
else if ((dest->level & NOT_LINE_START_LEVEL) == 0)
|
||||
format = IRCTXT_LINE_START;
|
||||
format = TXT_LINE_START;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
@ -410,7 +410,7 @@ static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
|
||||
}
|
||||
|
||||
tm = localtime(&t);
|
||||
return format_get_text_theme(theme, MODULE_NAME, dest, IRCTXT_TIMESTAMP,
|
||||
return format_get_text_theme(theme, MODULE_NAME, dest, TXT_TIMESTAMP,
|
||||
tm->tm_year+1900,
|
||||
tm->tm_mon+1, tm->tm_mday,
|
||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
@ -440,7 +440,7 @@ static char *get_server_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
|
||||
|
||||
return count < 2 ? NULL :
|
||||
format_get_text_theme(theme, MODULE_NAME, dest,
|
||||
IRCTXT_SERVERTAG, server->tag);
|
||||
TXT_SERVERTAG, server->tag);
|
||||
}
|
||||
|
||||
char *format_get_line_start(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
|
||||
|
@ -357,7 +357,7 @@ static void hilight_print(int index, HILIGHT_REC *rec)
|
||||
levelstr = rec->level == 0 ? NULL :
|
||||
bits2level(rec->level);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP,
|
||||
IRCTXT_HILIGHT_LINE, index, rec->text,
|
||||
TXT_HILIGHT_LINE, index, rec->text,
|
||||
chans != NULL ? chans : "",
|
||||
levelstr != NULL ? levelstr : "",
|
||||
rec->nickmask ? " -nick" : "",
|
||||
@ -372,14 +372,14 @@ static void cmd_hilight_show(void)
|
||||
GSList *tmp;
|
||||
int index;
|
||||
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_HILIGHT_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_HILIGHT_HEADER);
|
||||
index = 1;
|
||||
for (tmp = hilights; tmp != NULL; tmp = tmp->next, index++) {
|
||||
HILIGHT_REC *rec = tmp->data;
|
||||
|
||||
hilight_print(index, rec);
|
||||
}
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_HILIGHT_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_HILIGHT_FOOTER);
|
||||
}
|
||||
|
||||
/* SYNTAX: HILIGHT [-nick | -nonick] [-mask | -regexp | -word]
|
||||
@ -464,9 +464,9 @@ static void cmd_dehilight(const char *data)
|
||||
}
|
||||
|
||||
if (rec == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_HILIGHT_NOT_FOUND, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_HILIGHT_NOT_FOUND, data);
|
||||
else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_HILIGHT_REMOVED, rec->text);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_HILIGHT_REMOVED, rec->text);
|
||||
hilight_remove(rec);
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ static void cmd_show_keys(const char *searchkey, int full)
|
||||
|
||||
if ((len == 0 || g_strncasecmp(rec->key, searchkey, len) == 0) &&
|
||||
(!full || rec->key[len] == '\0')) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_BIND_KEY,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_KEY,
|
||||
rec->key, rec->info->id, rec->data == NULL ? "" : rec->data);
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ static void cmd_bind(const char *data)
|
||||
}
|
||||
|
||||
if (key_info_find(id) == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, IRCTXT_BIND_UNKNOWN_ID, id);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_BIND_UNKNOWN_ID, id);
|
||||
else {
|
||||
key_configure_add(id, key, keydata);
|
||||
cmd_show_keys(key, TRUE);
|
||||
|
@ -1,174 +1,174 @@
|
||||
#include "formats.h"
|
||||
|
||||
enum {
|
||||
IRCTXT_MODULE_NAME,
|
||||
TXT_MODULE_NAME,
|
||||
|
||||
IRCTXT_FILL_1,
|
||||
TXT_FILL_1,
|
||||
|
||||
IRCTXT_LINE_START,
|
||||
IRCTXT_LINE_START_IRSSI,
|
||||
IRCTXT_TIMESTAMP,
|
||||
IRCTXT_SERVERTAG,
|
||||
IRCTXT_DAYCHANGE,
|
||||
IRCTXT_TALKING_WITH,
|
||||
IRCTXT_REFNUM_TOO_LOW,
|
||||
IRCTXT_WINDOWLIST_HEADER,
|
||||
IRCTXT_WINDOWLIST_LINE,
|
||||
IRCTXT_WINDOWLIST_FOOTER,
|
||||
TXT_LINE_START,
|
||||
TXT_LINE_START_IRSSI,
|
||||
TXT_TIMESTAMP,
|
||||
TXT_SERVERTAG,
|
||||
TXT_DAYCHANGE,
|
||||
TXT_TALKING_WITH,
|
||||
TXT_REFNUM_TOO_LOW,
|
||||
TXT_WINDOWLIST_HEADER,
|
||||
TXT_WINDOWLIST_LINE,
|
||||
TXT_WINDOWLIST_FOOTER,
|
||||
|
||||
IRCTXT_FILL_2,
|
||||
TXT_FILL_2,
|
||||
|
||||
IRCTXT_LOOKING_UP,
|
||||
IRCTXT_CONNECTING,
|
||||
IRCTXT_CONNECTION_ESTABLISHED,
|
||||
IRCTXT_CANT_CONNECT,
|
||||
IRCTXT_CONNECTION_LOST,
|
||||
IRCTXT_LAG_DISCONNECTED,
|
||||
IRCTXT_DISCONNECTED,
|
||||
IRCTXT_SERVER_QUIT,
|
||||
IRCTXT_SERVER_CHANGED,
|
||||
IRCTXT_UNKNOWN_SERVER_TAG,
|
||||
IRCTXT_SERVER_LIST,
|
||||
IRCTXT_SERVER_LOOKUP_LIST,
|
||||
IRCTXT_SERVER_RECONNECT_LIST,
|
||||
IRCTXT_RECONNECT_REMOVED,
|
||||
IRCTXT_RECONNECT_NOT_FOUND,
|
||||
IRCTXT_SETUPSERVER_ADDED,
|
||||
IRCTXT_SETUPSERVER_REMOVED,
|
||||
IRCTXT_SETUPSERVER_NOT_FOUND,
|
||||
TXT_LOOKING_UP,
|
||||
TXT_CONNECTING,
|
||||
TXT_CONNECTION_ESTABLISHED,
|
||||
TXT_CANT_CONNECT,
|
||||
TXT_CONNECTION_LOST,
|
||||
TXT_LAG_DISCONNECTED,
|
||||
TXT_DISCONNECTED,
|
||||
TXT_SERVER_QUIT,
|
||||
TXT_SERVER_CHANGED,
|
||||
TXT_UNKNOWN_SERVER_TAG,
|
||||
TXT_SERVER_LIST,
|
||||
TXT_SERVER_LOOKUP_LIST,
|
||||
TXT_SERVER_RECONNECT_LIST,
|
||||
TXT_RECONNECT_REMOVED,
|
||||
TXT_RECONNECT_NOT_FOUND,
|
||||
TXT_SETUPSERVER_ADDED,
|
||||
TXT_SETUPSERVER_REMOVED,
|
||||
TXT_SETUPSERVER_NOT_FOUND,
|
||||
|
||||
IRCTXT_FILL_3,
|
||||
TXT_FILL_3,
|
||||
|
||||
IRCTXT_JOIN,
|
||||
IRCTXT_PART,
|
||||
IRCTXT_KICK,
|
||||
IRCTXT_QUIT,
|
||||
IRCTXT_QUIT_ONCE,
|
||||
IRCTXT_INVITE,
|
||||
IRCTXT_NEW_TOPIC,
|
||||
IRCTXT_TOPIC_UNSET,
|
||||
IRCTXT_YOUR_NICK_CHANGED,
|
||||
IRCTXT_NICK_CHANGED,
|
||||
IRCTXT_TALKING_IN,
|
||||
IRCTXT_NOT_IN_CHANNELS,
|
||||
IRCTXT_CURRENT_CHANNEL,
|
||||
IRCTXT_CHANLIST_HEADER,
|
||||
IRCTXT_CHANLIST_LINE,
|
||||
IRCTXT_CHANSETUP_NOT_FOUND,
|
||||
IRCTXT_CHANSETUP_ADDED,
|
||||
IRCTXT_CHANSETUP_REMOVED,
|
||||
IRCTXT_CHANSETUP_HEADER,
|
||||
IRCTXT_CHANSETUP_LINE,
|
||||
IRCTXT_CHANSETUP_FOOTER,
|
||||
TXT_JOIN,
|
||||
TXT_PART,
|
||||
TXT_KICK,
|
||||
TXT_QUIT,
|
||||
TXT_QUIT_ONCE,
|
||||
TXT_INVITE,
|
||||
TXT_NEW_TOPIC,
|
||||
TXT_TOPIC_UNSET,
|
||||
TXT_YOUR_NICK_CHANGED,
|
||||
TXT_NICK_CHANGED,
|
||||
TXT_TALKING_IN,
|
||||
TXT_NOT_IN_CHANNELS,
|
||||
TXT_CURRENT_CHANNEL,
|
||||
TXT_CHANLIST_HEADER,
|
||||
TXT_CHANLIST_LINE,
|
||||
TXT_CHANSETUP_NOT_FOUND,
|
||||
TXT_CHANSETUP_ADDED,
|
||||
TXT_CHANSETUP_REMOVED,
|
||||
TXT_CHANSETUP_HEADER,
|
||||
TXT_CHANSETUP_LINE,
|
||||
TXT_CHANSETUP_FOOTER,
|
||||
|
||||
IRCTXT_FILL_4,
|
||||
TXT_FILL_4,
|
||||
|
||||
IRCTXT_OWN_MSG,
|
||||
IRCTXT_OWN_MSG_CHANNEL,
|
||||
IRCTXT_OWN_MSG_PRIVATE,
|
||||
IRCTXT_OWN_MSG_PRIVATE_QUERY,
|
||||
IRCTXT_PUBMSG_ME,
|
||||
IRCTXT_PUBMSG_ME_CHANNEL,
|
||||
IRCTXT_PUBMSG_HILIGHT,
|
||||
IRCTXT_PUBMSG_HILIGHT_CHANNEL,
|
||||
IRCTXT_PUBMSG,
|
||||
IRCTXT_PUBMSG_CHANNEL,
|
||||
IRCTXT_MSG_PRIVATE,
|
||||
IRCTXT_MSG_PRIVATE_QUERY,
|
||||
IRCTXT_NO_MSGS_GOT,
|
||||
IRCTXT_NO_MSGS_SENT,
|
||||
TXT_OWN_MSG,
|
||||
TXT_OWN_MSG_CHANNEL,
|
||||
TXT_OWN_MSG_PRIVATE,
|
||||
TXT_OWN_MSG_PRIVATE_QUERY,
|
||||
TXT_PUBMSG_ME,
|
||||
TXT_PUBMSG_ME_CHANNEL,
|
||||
TXT_PUBMSG_HILIGHT,
|
||||
TXT_PUBMSG_HILIGHT_CHANNEL,
|
||||
TXT_PUBMSG,
|
||||
TXT_PUBMSG_CHANNEL,
|
||||
TXT_MSG_PRIVATE,
|
||||
TXT_MSG_PRIVATE_QUERY,
|
||||
TXT_NO_MSGS_GOT,
|
||||
TXT_NO_MSGS_SENT,
|
||||
|
||||
IRCTXT_FILL_5,
|
||||
TXT_FILL_5,
|
||||
|
||||
IRCTXT_QUERY_STARTED,
|
||||
IRCTXT_NO_QUERY,
|
||||
IRCTXT_QUERY_SERVER_CHANGED,
|
||||
TXT_QUERY_STARTED,
|
||||
TXT_NO_QUERY,
|
||||
TXT_QUERY_SERVER_CHANGED,
|
||||
|
||||
IRCTXT_FILL_6,
|
||||
TXT_FILL_6,
|
||||
|
||||
IRCTXT_HILIGHT_HEADER,
|
||||
IRCTXT_HILIGHT_LINE,
|
||||
IRCTXT_HILIGHT_FOOTER,
|
||||
IRCTXT_HILIGHT_NOT_FOUND,
|
||||
IRCTXT_HILIGHT_REMOVED,
|
||||
TXT_HILIGHT_HEADER,
|
||||
TXT_HILIGHT_LINE,
|
||||
TXT_HILIGHT_FOOTER,
|
||||
TXT_HILIGHT_NOT_FOUND,
|
||||
TXT_HILIGHT_REMOVED,
|
||||
|
||||
IRCTXT_FILL_7,
|
||||
TXT_FILL_7,
|
||||
|
||||
IRCTXT_ALIAS_ADDED,
|
||||
IRCTXT_ALIAS_REMOVED,
|
||||
IRCTXT_ALIAS_NOT_FOUND,
|
||||
IRCTXT_ALIASLIST_HEADER,
|
||||
IRCTXT_ALIASLIST_LINE,
|
||||
IRCTXT_ALIASLIST_FOOTER,
|
||||
TXT_ALIAS_ADDED,
|
||||
TXT_ALIAS_REMOVED,
|
||||
TXT_ALIAS_NOT_FOUND,
|
||||
TXT_ALIASLIST_HEADER,
|
||||
TXT_ALIASLIST_LINE,
|
||||
TXT_ALIASLIST_FOOTER,
|
||||
|
||||
IRCTXT_FILL_8,
|
||||
TXT_FILL_8,
|
||||
|
||||
IRCTXT_LOG_OPENED,
|
||||
IRCTXT_LOG_CLOSED,
|
||||
IRCTXT_LOG_CREATE_FAILED,
|
||||
IRCTXT_LOG_LOCKED,
|
||||
IRCTXT_LOG_NOT_OPEN,
|
||||
IRCTXT_LOG_STARTED,
|
||||
IRCTXT_LOG_STOPPED,
|
||||
IRCTXT_LOG_LIST_HEADER,
|
||||
IRCTXT_LOG_LIST,
|
||||
IRCTXT_LOG_LIST_FOOTER,
|
||||
IRCTXT_WINDOWLOG_FILE,
|
||||
IRCTXT_WINDOWLOG_FILE_LOGGING,
|
||||
IRCTXT_LOG_NO_AWAY_MSGS,
|
||||
IRCTXT_LOG_AWAY_MSGS,
|
||||
TXT_LOG_OPENED,
|
||||
TXT_LOG_CLOSED,
|
||||
TXT_LOG_CREATE_FAILED,
|
||||
TXT_LOG_LOCKED,
|
||||
TXT_LOG_NOT_OPEN,
|
||||
TXT_LOG_STARTED,
|
||||
TXT_LOG_STOPPED,
|
||||
TXT_LOG_LIST_HEADER,
|
||||
TXT_LOG_LIST,
|
||||
TXT_LOG_LIST_FOOTER,
|
||||
TXT_WINDOWLOG_FILE,
|
||||
TXT_WINDOWLOG_FILE_LOGGING,
|
||||
TXT_LOG_NO_AWAY_MSGS,
|
||||
TXT_LOG_AWAY_MSGS,
|
||||
|
||||
IRCTXT_FILL_9,
|
||||
TXT_FILL_9,
|
||||
|
||||
IRCTXT_MODULE_ALREADY_LOADED,
|
||||
IRCTXT_MODULE_LOAD_ERROR,
|
||||
IRCTXT_MODULE_INVALID,
|
||||
IRCTXT_MODULE_LOADED,
|
||||
IRCTXT_MODULE_UNLOADED,
|
||||
TXT_MODULE_ALREADY_LOADED,
|
||||
TXT_MODULE_LOAD_ERROR,
|
||||
TXT_MODULE_INVALID,
|
||||
TXT_MODULE_LOADED,
|
||||
TXT_MODULE_UNLOADED,
|
||||
|
||||
IRCTXT_FILL_10,
|
||||
TXT_FILL_10,
|
||||
|
||||
IRCTXT_COMMAND_UNKNOWN,
|
||||
IRCTXT_COMMAND_AMBIGUOUS,
|
||||
IRCTXT_OPTION_UNKNOWN,
|
||||
IRCTXT_OPTION_AMBIGUOUS,
|
||||
IRCTXT_OPTION_MISSING_ARG,
|
||||
IRCTXT_NOT_ENOUGH_PARAMS,
|
||||
IRCTXT_NOT_CONNECTED,
|
||||
IRCTXT_NOT_JOINED,
|
||||
IRCTXT_CHAN_NOT_FOUND,
|
||||
IRCTXT_CHAN_NOT_SYNCED,
|
||||
IRCTXT_NOT_GOOD_IDEA,
|
||||
TXT_COMMAND_UNKNOWN,
|
||||
TXT_COMMAND_AMBIGUOUS,
|
||||
TXT_OPTION_UNKNOWN,
|
||||
TXT_OPTION_AMBIGUOUS,
|
||||
TXT_OPTION_MISSING_ARG,
|
||||
TXT_NOT_ENOUGH_PARAMS,
|
||||
TXT_NOT_CONNECTED,
|
||||
TXT_NOT_JOINED,
|
||||
TXT_CHAN_NOT_FOUND,
|
||||
TXT_CHAN_NOT_SYNCED,
|
||||
TXT_NOT_GOOD_IDEA,
|
||||
|
||||
IRCTXT_FILL_11,
|
||||
TXT_FILL_11,
|
||||
|
||||
IRCTXT_THEME_SAVED,
|
||||
IRCTXT_THEME_SAVE_FAILED,
|
||||
IRCTXT_THEME_NOT_FOUND,
|
||||
IRCTXT_WINDOW_THEME_CHANGED,
|
||||
IRCTXT_FORMAT_TITLE,
|
||||
IRCTXT_FORMAT_SUBTITLE,
|
||||
IRCTXT_FORMAT_ITEM,
|
||||
TXT_THEME_SAVED,
|
||||
TXT_THEME_SAVE_FAILED,
|
||||
TXT_THEME_NOT_FOUND,
|
||||
TXT_WINDOW_THEME_CHANGED,
|
||||
TXT_FORMAT_TITLE,
|
||||
TXT_FORMAT_SUBTITLE,
|
||||
TXT_FORMAT_ITEM,
|
||||
|
||||
IRCTXT_FILL_12,
|
||||
TXT_FILL_12,
|
||||
|
||||
IRCTXT_IGNORED,
|
||||
IRCTXT_UNIGNORED,
|
||||
IRCTXT_IGNORE_NOT_FOUND,
|
||||
IRCTXT_IGNORE_NO_IGNORES,
|
||||
IRCTXT_IGNORE_HEADER,
|
||||
IRCTXT_IGNORE_LINE,
|
||||
IRCTXT_IGNORE_FOOTER,
|
||||
TXT_IGNORED,
|
||||
TXT_UNIGNORED,
|
||||
TXT_IGNORE_NOT_FOUND,
|
||||
TXT_IGNORE_NO_IGNORES,
|
||||
TXT_IGNORE_HEADER,
|
||||
TXT_IGNORE_LINE,
|
||||
TXT_IGNORE_FOOTER,
|
||||
|
||||
IRCTXT_FILL_13,
|
||||
TXT_FILL_13,
|
||||
|
||||
IRCTXT_NOT_TOGGLE,
|
||||
IRCTXT_PERL_ERROR,
|
||||
IRCTXT_BIND_KEY,
|
||||
IRCTXT_BIND_UNKNOWN_ID,
|
||||
IRCTXT_CONFIG_SAVED,
|
||||
IRCTXT_CONFIG_RELOADED,
|
||||
IRCTXT_CONFIG_MODIFIED
|
||||
TXT_NOT_TOGGLE,
|
||||
TXT_PERL_ERROR,
|
||||
TXT_BIND_KEY,
|
||||
TXT_BIND_UNKNOWN_ID,
|
||||
TXT_CONFIG_SAVED,
|
||||
TXT_CONFIG_RELOADED,
|
||||
TXT_CONFIG_MODIFIED
|
||||
};
|
||||
|
||||
extern FORMAT_REC fecommon_core_formats[];
|
||||
|
@ -771,11 +771,11 @@ static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value
|
||||
else if ((value != NULL && key != NULL && g_strcasecmp(formats[n].tag, key) == 0) ||
|
||||
(value == NULL && (key == NULL || stristr(formats[n].tag, key) != NULL))) {
|
||||
if (first) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_FORMAT_TITLE, rec->short_name, formats[0].def);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_TITLE, rec->short_name, formats[0].def);
|
||||
first = FALSE;
|
||||
}
|
||||
if (last_title != NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_FORMAT_SUBTITLE, last_title);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_SUBTITLE, last_title);
|
||||
if (reset || value != NULL) {
|
||||
theme = theme_module_create(current_theme, rec->name);
|
||||
g_free_not_null(theme->formats[n]);
|
||||
@ -785,7 +785,7 @@ static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value
|
||||
theme->formats[n] = reset ? NULL : g_strdup(value);
|
||||
theme->expanded_formats[n] = theme_format_expand(current_theme, text);
|
||||
}
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_FORMAT_ITEM, formats[n].tag, text);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_ITEM, formats[n].tag, text);
|
||||
last_title = NULL;
|
||||
}
|
||||
}
|
||||
@ -908,7 +908,7 @@ static void theme_save(THEME_REC *theme)
|
||||
ok = FALSE;
|
||||
}
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
ok ? IRCTXT_THEME_SAVED : IRCTXT_THEME_SAVE_FAILED,
|
||||
ok ? TXT_THEME_SAVED : TXT_THEME_SAVE_FAILED,
|
||||
path, config_last_error(config));
|
||||
g_free(path);
|
||||
config_close(config);
|
||||
|
@ -187,10 +187,10 @@ static void cmd_window_server(const char *data)
|
||||
|
||||
server = server_find_tag(data);
|
||||
if (server == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_UNKNOWN_SERVER_TAG, data);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_UNKNOWN_SERVER_TAG, data);
|
||||
else if (active_win->active == NULL) {
|
||||
window_change_server(active_win, server);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_SERVER_CHANGED, server->tag, server->connrec->address,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_SERVER_CHANGED, server->tag, server->connrec->address,
|
||||
server->connrec->chatnet == NULL ? "" : server->connrec->chatnet);
|
||||
}
|
||||
}
|
||||
@ -258,7 +258,7 @@ static void cmd_window_number(const char *data)
|
||||
num = atoi(refnum);
|
||||
if (num < 1) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_REFNUM_TOO_LOW);
|
||||
TXT_REFNUM_TOO_LOW);
|
||||
} else {
|
||||
window_set_refnum(active_win, num);
|
||||
active_win->sticky_refnum =
|
||||
@ -376,12 +376,12 @@ static void cmd_window_list(void)
|
||||
char *levelstr;
|
||||
|
||||
sorted = windows_get_sorted();
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_WINDOWLIST_HEADER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_HEADER);
|
||||
for (tmp = sorted; tmp != NULL; tmp = tmp->next) {
|
||||
WINDOW_REC *rec = tmp->data;
|
||||
|
||||
levelstr = bits2level(rec->level);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_WINDOWLIST_LINE,
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_LINE,
|
||||
rec->refnum, rec->name == NULL ? "" : rec->name,
|
||||
rec->active == NULL ? "" : rec->active->name,
|
||||
rec->active_server == NULL ? "" : ((SERVER_REC *) rec->active_server)->tag,
|
||||
@ -389,7 +389,7 @@ static void cmd_window_list(void)
|
||||
g_free(levelstr);
|
||||
}
|
||||
g_slist_free(sorted);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_WINDOWLIST_FOOTER);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_FOOTER);
|
||||
}
|
||||
|
||||
/* SYNTAX: WINDOW THEME <name> */
|
||||
@ -401,10 +401,10 @@ static void cmd_window_theme(const char *data)
|
||||
active_win->theme = theme_load(data);
|
||||
if (active_win->theme != NULL) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_WINDOW_THEME_CHANGED, data);
|
||||
TXT_WINDOW_THEME_CHANGED, data);
|
||||
} else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_THEME_NOT_FOUND, data);
|
||||
TXT_THEME_NOT_FOUND, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ static void signal_window_item_changed(WINDOW_REC *window, WI_ITEM_REC *item)
|
||||
/* default to printing "talking with ...",
|
||||
you can override it it you wish */
|
||||
printformat(item->server, item->name, MSGLEVEL_CLIENTNOTICE,
|
||||
IRCTXT_TALKING_WITH, item->name);
|
||||
TXT_TALKING_WITH, item->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,38 +34,44 @@
|
||||
#include "window-items.h"
|
||||
#include "printtext.h"
|
||||
|
||||
static void ctcp_print(const char *pre, const char *data,
|
||||
IRC_SERVER_REC *server, const char *nick,
|
||||
const char *addr, const char *target)
|
||||
static void ctcp_print(IRC_SERVER_REC *server,
|
||||
const char *prefix, const char *data,
|
||||
const char *nick, const char *addr, const char *target)
|
||||
{
|
||||
char *str;
|
||||
|
||||
g_return_if_fail(data != NULL);
|
||||
|
||||
str = g_strconcat(pre, " ", data, NULL);
|
||||
printformat(server, ischannel(*target) ? target : nick, MSGLEVEL_CTCPS,
|
||||
IRCTXT_CTCP_REQUESTED, nick, addr, str, target);
|
||||
str = *data == '\0' ? g_strdup(prefix) :
|
||||
g_strconcat(prefix, " ", data, NULL);
|
||||
signal_emit("message irc ctcp", 5, server, str, nick, addr, target);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
static void ctcp_default_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target)
|
||||
static void ctcp_default_msg(IRC_SERVER_REC *server, const char *data,
|
||||
const char *nick, const char *addr,
|
||||
const char *target)
|
||||
{
|
||||
ctcp_print("unknown CTCP", data, server, nick, addr, target);
|
||||
ctcp_print(server, "unknown CTCP", data, nick, addr, target);
|
||||
}
|
||||
|
||||
static void ctcp_ping_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target)
|
||||
static void ctcp_ping_msg(IRC_SERVER_REC *server, const char *data,
|
||||
const char *nick, const char *addr,
|
||||
const char *target)
|
||||
{
|
||||
ctcp_print("CTCP PING", data, server, nick, addr, target);
|
||||
ctcp_print(server, "CTCP PING", data, nick, addr, target);
|
||||
}
|
||||
|
||||
static void ctcp_version_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target)
|
||||
static void ctcp_version_msg(IRC_SERVER_REC *server, const char *data,
|
||||
const char *nick, const char *addr,
|
||||
const char *target)
|
||||
{
|
||||
ctcp_print("CTCP VERSION", data, server, nick, addr, target);
|
||||
ctcp_print(server, "CTCP VERSION", data, nick, addr, target);
|
||||
}
|
||||
|
||||
static void ctcp_time_msg(IRC_SERVER_REC *server, const char *data, const char *nick, const char *addr, const char *target)
|
||||
static void ctcp_time_msg(IRC_SERVER_REC *server, const char *data,
|
||||
const char *nick, const char *addr,
|
||||
const char *target)
|
||||
{
|
||||
ctcp_print("CTCP TIME", data, server, nick, addr, target);
|
||||
ctcp_print(server, "CTCP TIME", data, nick, addr, target);
|
||||
}
|
||||
|
||||
static void ctcp_default_reply(IRC_SERVER_REC *server, const char *data,
|
||||
@ -87,7 +93,8 @@ static void ctcp_default_reply(IRC_SERVER_REC *server, const char *data,
|
||||
}
|
||||
|
||||
printformat(server, ischannel(*target) ? target : nick, MSGLEVEL_CTCPS,
|
||||
ischannel(*target) ? IRCTXT_CTCP_REPLY_CHANNEL : IRCTXT_CTCP_REPLY, ctcp, nick, ctcpdata, target);
|
||||
ischannel(*target) ? IRCTXT_CTCP_REPLY_CHANNEL :
|
||||
IRCTXT_CTCP_REPLY, ctcp, nick, ctcpdata, target);
|
||||
g_free(ctcp);
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,8 @@
|
||||
|
||||
#include "irc.h"
|
||||
|
||||
/* FIXME: hmm. there's should be some better way to use other module's
|
||||
formats than this since now we can't use this module's formats.. */
|
||||
#include "../core/module-formats.h"
|
||||
#include "module-formats.h"
|
||||
#include "printtext.h"
|
||||
#include "fe-messages.h"
|
||||
|
||||
@ -45,7 +44,7 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg,
|
||||
printformat_module("fe-common/core", server, target+1,
|
||||
MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT |
|
||||
MSGLEVEL_NO_ACT,
|
||||
IRCTXT_OWN_MSG_CHANNEL,
|
||||
TXT_OWN_MSG_CHANNEL,
|
||||
server->nick, target, msg, nickmode);
|
||||
signal_stop();
|
||||
}
|
||||
@ -63,19 +62,29 @@ static void sig_message_irc_op_public(SERVER_REC *server, const char *msg,
|
||||
optarget = g_strconcat("@", target, NULL);
|
||||
printformat_module("fe-common/core", server, target,
|
||||
MSGLEVEL_PUBLIC | MSGLEVEL_HILIGHT,
|
||||
IRCTXT_PUBMSG_ME_CHANNEL,
|
||||
TXT_PUBMSG_ME_CHANNEL,
|
||||
nick, optarget, msg, nickmode);
|
||||
g_free(optarget);
|
||||
}
|
||||
|
||||
static void sig_message_irc_ctcp(IRC_SERVER_REC *server, const char *msg,
|
||||
const char *nick, const char *addr,
|
||||
const char *target)
|
||||
{
|
||||
printformat(server, ischannel(*target) ? target : nick, MSGLEVEL_CTCPS,
|
||||
IRCTXT_CTCP_REQUESTED, nick, addr, msg, target);
|
||||
}
|
||||
|
||||
void fe_irc_messages_init(void)
|
||||
{
|
||||
signal_add("message own_public", (SIGNAL_FUNC) sig_message_own_public);
|
||||
signal_add("message irc op_public", (SIGNAL_FUNC) sig_message_irc_op_public);
|
||||
signal_add("message irc ctcp", (SIGNAL_FUNC) sig_message_irc_ctcp);
|
||||
}
|
||||
|
||||
void fe_irc_messages_deinit(void)
|
||||
{
|
||||
signal_remove("message own_public", (SIGNAL_FUNC) sig_message_own_public);
|
||||
signal_remove("message irc op_public", (SIGNAL_FUNC) sig_message_irc_op_public);
|
||||
signal_remove("message irc ctcp", (SIGNAL_FUNC) sig_message_irc_ctcp);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ static void cmd_lastlog(const char *data)
|
||||
}
|
||||
|
||||
if ((flags & LASTLOG_FLAG_NOHEADERS) == 0)
|
||||
printformat(NULL, NULL, MSGLEVEL_LASTLOG, IRCTXT_LASTLOG_START);
|
||||
printformat(NULL, NULL, MSGLEVEL_LASTLOG, TXT_LASTLOG_START);
|
||||
|
||||
if (flags & LASTLOG_FLAG_NEW_LAST)
|
||||
startline = WINDOW_GUI(active_win)->lastlog_last_check;
|
||||
@ -238,7 +238,7 @@ static void cmd_lastlog(const char *data)
|
||||
}
|
||||
|
||||
if ((flags & LASTLOG_FLAG_NOHEADERS) == 0)
|
||||
printformat(NULL, NULL, MSGLEVEL_LASTLOG, IRCTXT_LASTLOG_END);
|
||||
printformat(NULL, NULL, MSGLEVEL_LASTLOG, TXT_LASTLOG_END);
|
||||
|
||||
WINDOW_GUI(active_win)->lastlog_last_check =
|
||||
g_list_last(WINDOW_GUI(active_win)->bottom_startline);
|
||||
|
@ -478,7 +478,7 @@ static void cmd_window_grow(const char *data)
|
||||
window->first_line -= count;
|
||||
shrink_win->last_line -= count;
|
||||
} else {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_WINDOW_TOO_SMALL);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOW_TOO_SMALL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -496,7 +496,7 @@ static void cmd_window_shrink(const char *data)
|
||||
|
||||
window = WINDOW_GUI(active_win)->parent;
|
||||
if (window->lines-count < WINDOW_MIN_SIZE) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_WINDOW_TOO_SMALL);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOW_TOO_SMALL);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -579,7 +579,7 @@ static void cmd_window_hide(const char *data)
|
||||
WINDOW_REC *window;
|
||||
|
||||
if (mainwindows->next == NULL) {
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CANT_HIDE_LAST);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CANT_HIDE_LAST);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "formats.h"
|
||||
|
||||
enum {
|
||||
IRCTXT_MODULE_NAME,
|
||||
TXT_MODULE_NAME,
|
||||
|
||||
IRCTXT_LASTLOG_START,
|
||||
IRCTXT_LASTLOG_END,
|
||||
TXT_LASTLOG_START,
|
||||
TXT_LASTLOG_END,
|
||||
|
||||
IRCTXT_WINDOW_TOO_SMALL,
|
||||
IRCTXT_CANT_HIDE_LAST
|
||||
TXT_WINDOW_TOO_SMALL,
|
||||
TXT_CANT_HIDE_LAST
|
||||
};
|
||||
|
||||
extern FORMAT_REC gui_text_formats[];
|
||||
|
Loading…
Reference in New Issue
Block a user