aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_services_account.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-03-21 19:42:08 +0000
committerGravatar brain2008-03-21 19:42:08 +0000
commitdde67b9765bc485d807f181bba108c00f4c44dba (patch)
tree99aa38a52b8fc6c94ad05b2087d34456377d4f5f /src/modules/m_services_account.cpp
parentPatch to change MODULES numerics, so we dont get a collision when using AUTHE... (diff)
downloadinspircd++-dde67b9765bc485d807f181bba108c00f4c44dba.tar.gz
inspircd++-dde67b9765bc485d807f181bba108c00f4c44dba.tar.bz2
inspircd++-dde67b9765bc485d807f181bba108c00f4c44dba.zip
Add capability for m_services_account to broadcast login events, with the user who is logging in and their login name
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9149 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r--src/modules/m_services_account.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index fe7f52f22..4bb6f9268 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -12,6 +12,7 @@
*/
#include "inspircd.h"
+#include "account.h"
/* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
@@ -304,6 +305,15 @@ class ModuleServicesAccount : public Module
// remove any accidental leading/trailing spaces
trim(*text);
dest->Extend("accountname", text);
+
+ if (IS_LOCAL(dest))
+ dest->WriteServ("900 %s %s %s :You are now logged in as %s", dest->nick, dest->GetFullHost(), text->c_str(), text->c_str());
+
+ AccountData ac;
+ ac.user = dest;
+ ac.account = *text;
+ Event n((char*)&ac, this, "account_login");
+ n.Send(ServerInstance);
}
}
}