summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_identify.c1
-rw-r--r--src/core/ns_logout.c2
-rw-r--r--src/core/ns_register.c1
-rw-r--r--src/protocol/inspircd12.cpp11
4 files changed, 15 insertions, 0 deletions
diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c
index 0050da28c..df2bece6e 100644
--- a/src/core/ns_identify.c
+++ b/src/core/ns_identify.c
@@ -123,6 +123,7 @@ int do_identify(User * u)
common_svsmode(u, modes, "");
}
}
+ ircdproto->SendAccountLogin(u, na->nc);
send_event(EVENT_NICK_IDENTIFY, 1, u->nick);
alog("%s: %s!%s@%s identified for nick %s", s_NickServ, u->nick,
u->username, u->host, u->nick);
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index 1ef9b41a3..c277cb1c3 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -107,6 +107,8 @@ int do_logout(User * u)
del_ns_timeout(u->na, TO_COLLIDE);
}
+ ircdproto->SendAccountLogout(u2, u2->na->nc);
+
/* Send out an event */
send_event(EVENT_NICK_LOGOUT, 1, u2->nick);
}
diff --git a/src/core/ns_register.c b/src/core/ns_register.c
index 8d3559b9c..188c4b626 100644
--- a/src/core/ns_register.c
+++ b/src/core/ns_register.c
@@ -346,6 +346,7 @@ int do_confirm(User * u)
else
notice_lang(s_NickServ, u, NICK_REGISTERED_NO_MASK,
u->nick);
+ ircdproto->SendAccountLogin(u, na->nc);
send_event(EVENT_NICK_REGISTERED, 1, u->nick);
if(enc_decrypt(na->nc->pass, tmp_pass, PASSMAX - 1)==1)
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index e6edc9587..4a65bcebb 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -702,6 +702,17 @@ class InspIRCdProto : public IRCDProto
}
}
+ void SendAccountLogin(User *u, NickCore *account)
+ {
+ send_cmd(TS6SID, "METADATA %s accountname :%s", u->uid, account->display);
+
+ }
+
+ void SendAccountLogout(User *u, NickCore *account)
+ {
+ send_cmd(TS6SID, "METADATA %s accountname :", u->uid);
+ }
+
int IsNickValid(const char *nick)
{
/* InspIRCd, like TS6, uses UIDs on collision, so... */