diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-07 21:58:27 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-07 21:58:27 +0000 |
commit | a0925f2d4c866d16f03f9e7e44654bad737b2090 (patch) | |
tree | 15c4efb939a62b0403477554e6acb6b2b6f48349 /src | |
parent | 1e5825ab5719209389732b5b3ce8f0b4d7ab2088 (diff) |
Add the capability to (properly) send login/logout account messages, used for InspIRCd at present, others are possible in the future (ircu etc). NOTE: This currently doesn't trigger on DROP, which is probably a bad thing.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1944 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_identify.c | 1 | ||||
-rw-r--r-- | src/core/ns_logout.c | 2 | ||||
-rw-r--r-- | src/core/ns_register.c | 1 | ||||
-rw-r--r-- | src/protocol/inspircd12.cpp | 11 |
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... */ |