mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
changed /FORMAT default_event -> default_event_server (sorry for breaking
some themes, this is just so much better name for it :) and added a new default_event, which is the format for default numeric events from your current server. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2909 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
6019a5cd15
commit
b532986e5b
@ -808,6 +808,7 @@ static void print_event_received(IRC_SERVER_REC *server, const char *data,
|
||||
const char *nick, int target_param)
|
||||
{
|
||||
char *target, *args, *ptr;
|
||||
int format;
|
||||
|
||||
g_return_if_fail(data != NULL);
|
||||
|
||||
@ -841,14 +842,11 @@ static void print_event_received(IRC_SERVER_REC *server, const char *data,
|
||||
g_memmove(ptr+1, ptr+2, strlen(ptr+1));
|
||||
}
|
||||
|
||||
if (nick == NULL || server->real_address == NULL ||
|
||||
strcmp(nick, server->real_address) == 0)
|
||||
printtext(server, target, MSGLEVEL_CRAP, "%s", args);
|
||||
else {
|
||||
printformat(server, target, MSGLEVEL_CRAP,
|
||||
IRCTXT_DEFAULT_EVENT, nick, args,
|
||||
current_server_event);
|
||||
}
|
||||
format = nick == NULL || server->real_address == NULL ||
|
||||
strcmp(nick, server->real_address) == 0 ?
|
||||
IRCTXT_DEFAULT_EVENT : IRCTXT_DEFAULT_EVENT_SERVER;
|
||||
printformat(server, target, MSGLEVEL_CRAP, format,
|
||||
nick, args, current_server_event);
|
||||
g_free(args);
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,8 @@ FORMAT_REC fecommon_irc_formats[] = {
|
||||
{ "kill_server", "You were {error killed} by {server $0} {reason $1} {comment Path: $2}", 3, { 0, 0, 0 } },
|
||||
{ "error", "{error ERROR} $0", 1, { 0 } },
|
||||
{ "unknown_mode", "Unknown mode character $0", 1, { 0 } },
|
||||
{ "default_event", "[$0] $1", 3, { 0, 0, 0 } },
|
||||
{ "default_event", "$1", 3, { 0, 0, 0 } },
|
||||
{ "default_event_server", "[$0] $1", 3, { 0, 0, 0 } },
|
||||
|
||||
/* ---- */
|
||||
{ NULL, "Misc", 0 },
|
||||
|
@ -125,6 +125,7 @@ enum {
|
||||
IRCTXT_ERROR,
|
||||
IRCTXT_UNKNOWN_MODE,
|
||||
IRCTXT_DEFAULT_EVENT,
|
||||
IRCTXT_DEFAULT_EVENT_SERVER,
|
||||
|
||||
IRCTXT_FILL_11,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user