summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-10 12:23:56 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-10 12:23:56 +0000
commitfc890ebd8230d6248e990d0bf88bec0133f8ab8b (patch)
tree78a254dad01bb4434ae1d1108604749069a9ec0d
parentd1a25e0fc2342718cd03666cc98becd134f4c679 (diff)
downloadirssi-fc890ebd8230d6248e990d0bf88bec0133f8ab8b.zip
Added support for dalnet's whois registered event.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@576 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-common/irc/fe-events-numeric.c13
-rw-r--r--src/fe-common/irc/module-formats.c1
-rw-r--r--src/fe-common/irc/module-formats.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c
index 828374ee..ed634ac5 100644
--- a/src/fe-common/irc/fe-events-numeric.c
+++ b/src/fe-common/irc/fe-events-numeric.c
@@ -434,6 +434,17 @@ static void event_whois_oper(const char *data, IRC_SERVER_REC *server)
g_free(params);
}
+static void event_whois_registered(const char *data, IRC_SERVER_REC *server)
+{
+ char *params, *nick;
+
+ g_return_if_fail(data != NULL);
+
+ params = event_get_params(data, 2, NULL, &nick);
+ printformat(server, nick, MSGLEVEL_CRAP, IRCTXT_WHOIS_REGISTERED, nick);
+ g_free(params);
+}
+
static void event_whowas(const char *data, IRC_SERVER_REC *server)
{
char *params, *nick, *user, *host, *realname;
@@ -668,6 +679,7 @@ void fe_events_numeric_init(void)
signal_add("event 301", (SIGNAL_FUNC) event_whois_away);
signal_add("event 312", (SIGNAL_FUNC) event_whois_server);
signal_add("event 313", (SIGNAL_FUNC) event_whois_oper);
+ signal_add("event 307", (SIGNAL_FUNC) event_whois_registered);
signal_add("event 314", (SIGNAL_FUNC) event_whowas);
signal_add("event 317", (SIGNAL_FUNC) event_whois_idle);
signal_add("event 318", (SIGNAL_FUNC) event_end_of_whois);
@@ -723,6 +735,7 @@ void fe_events_numeric_deinit(void)
signal_remove("event 301", (SIGNAL_FUNC) event_whois_away);
signal_remove("event 312", (SIGNAL_FUNC) event_whois_server);
signal_remove("event 313", (SIGNAL_FUNC) event_whois_oper);
+ signal_remove("event 307", (SIGNAL_FUNC) event_whois_registered);
signal_remove("event 314", (SIGNAL_FUNC) event_whowas);
signal_remove("event 317", (SIGNAL_FUNC) event_whois_idle);
signal_remove("event 318", (SIGNAL_FUNC) event_end_of_whois);
diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c
index 2e0e7ba2..2b30bffe 100644
--- a/src/fe-common/irc/module-formats.c
+++ b/src/fe-common/irc/module-formats.c
@@ -131,6 +131,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "whois_idle_signon", " idle : $1 days $2 hours $3 mins $4 secs %K[%nsignon: $5%K]", 6, { 0, 1, 1, 1, 1, 0 } },
{ "whois_server", " server : $1 %K[%n$2%K]", 3, { 0, 0, 0 } },
{ "whois_oper", " : %_IRC operator%_", 1, { 0 } },
+ { "whois_registered", " : has registered this nick", 1, { 0 } },
{ "whois_channels", " channels : $1", 2, { 0, 0 } },
{ "whois_away", " away : $1", 2, { 0, 0 } },
{ "end_of_whois", "End of WHOIS", 1, { 0 } },
diff --git a/src/fe-common/irc/module-formats.h b/src/fe-common/irc/module-formats.h
index 120d3e74..aa4c87c3 100644
--- a/src/fe-common/irc/module-formats.h
+++ b/src/fe-common/irc/module-formats.h
@@ -106,6 +106,7 @@ enum {
IRCTXT_WHOIS_IDLE_SIGNON,
IRCTXT_WHOIS_SERVER,
IRCTXT_WHOIS_OPER,
+ IRCTXT_WHOIS_REGISTERED,
IRCTXT_WHOIS_CHANNELS,
IRCTXT_WHOIS_AWAY,
IRCTXT_END_OF_WHOIS,