diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 25 | ||||
-rw-r--r-- | src/fe-common/irc/module-formats.c | 1 | ||||
-rw-r--r-- | src/fe-common/irc/module-formats.h | 1 |
3 files changed, 21 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index 17a7f9ae..2592af10 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -336,15 +336,26 @@ static void event_unaway(gchar *data, IRC_SERVER_REC *server) printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_UNAWAY); } -static void event_userhost(gchar *data, IRC_SERVER_REC *server) +static void event_userhost(const char *data, IRC_SERVER_REC *server) { - gchar *params, *hosts; + char *params, *hosts; - g_return_if_fail(data != NULL); + g_return_if_fail(data != NULL); - params = event_get_params(data, 2, NULL, &hosts); - printtext(server, NULL, MSGLEVEL_CRAP, "%s", hosts); - g_free(params); + params = event_get_params(data, 2, NULL, &hosts); + printtext(server, NULL, MSGLEVEL_CRAP, "%s", hosts); + g_free(params); +} + +static void event_sent_invite(const char *data, IRC_SERVER_REC *server) +{ + char *params, *nick, *channel; + + g_return_if_fail(data != NULL); + + params = event_get_params(data, 2, NULL, &nick, &channel); + printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_INVITING, nick, channel); + g_free(params); } static void event_whois(gchar *data, IRC_SERVER_REC *server) @@ -635,6 +646,7 @@ void fe_events_numeric_init(void) signal_add("event 318", (SIGNAL_FUNC) event_end_of_whois); signal_add("event 319", (SIGNAL_FUNC) event_whois_channels); signal_add("event 302", (SIGNAL_FUNC) event_userhost); + signal_add("event 341", (SIGNAL_FUNC) event_sent_invite); signal_add("event 437", (SIGNAL_FUNC) event_target_unavailable); signal_add("event 401", (SIGNAL_FUNC) event_no_such_nick); @@ -685,6 +697,7 @@ void fe_events_numeric_deinit(void) signal_remove("event 318", (SIGNAL_FUNC) event_end_of_whois); signal_remove("event 319", (SIGNAL_FUNC) event_whois_channels); signal_remove("event 302", (SIGNAL_FUNC) event_userhost); + signal_remove("event 341", (SIGNAL_FUNC) event_sent_invite); signal_remove("event 437", (SIGNAL_FUNC) event_target_unavailable); signal_remove("event 401", (SIGNAL_FUNC) event_no_such_nick); diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c index 5097e2aa..3e9583b6 100644 --- a/src/fe-common/irc/module-formats.c +++ b/src/fe-common/irc/module-formats.c @@ -53,6 +53,7 @@ FORMAT_REC fecommon_irc_formats[] = { "quit", N_("%c$0 %K[%n$1%K]%n has quit IRC %K[%n$2%K]"), 3, { 0, 0, 0 } }, { "quit_once", N_("%_$3%_ %c$0 %K[%n$1%K]%n has quit IRC %K[%n$2%K]"), 4, { 0, 0, 0, 0 } }, { "invite", N_("%_$0%_ invites you to %_$1"), 2, { 0, 0 } }, + { "inviting", N_("Inviting $0 to %_$1"), 2, { 0, 0 } }, { "not_invited", N_("You have not been invited to a channel!"), 0 }, { "names", N_("%K[%g%_Users%_%K(%g$0%K)]%n $1"), 2, { 0, 0 } }, { "endofnames", N_("%g%_$0%_%K:%n Total of %_$1%_ nicks %K[%n%_$2%_ ops, %_$3%_ voices, %_$4%_ normal%K]"), 5, { 0, 1, 1, 1, 1 } }, diff --git a/src/fe-common/irc/module-formats.h b/src/fe-common/irc/module-formats.h index 004e6008..325d3f4a 100644 --- a/src/fe-common/irc/module-formats.h +++ b/src/fe-common/irc/module-formats.h @@ -29,6 +29,7 @@ enum { IRCTXT_QUIT, IRCTXT_QUIT_ONCE, IRCTXT_INVITE, + IRCTXT_INVITING, IRCTXT_NOT_INVITED, IRCTXT_NAMES, IRCTXT_ENDOFNAMES, |