summaryrefslogtreecommitdiff
path: root/src/modules/m_cap.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-08 23:29:21 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-08 23:29:21 +0000
commit7e843c22e16c81054bad18073d24fe1a07026431 (patch)
tree44ca0213c7d7a80270b993fec1fbed275ec56424 /src/modules/m_cap.cpp
parentc440038736f749a56dbac1badee5b2f099286117 (diff)
Update Event and Request APIs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cap.cpp')
-rw-r--r--src/modules/m_cap.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index dbd81ed53..3373f7c3f 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -48,7 +48,7 @@ class CommandCAP : public Command
if (subcommand == "REQ")
{
- CapData Data;
+ CapEvent Data(creator, "cap_req");
Data.type = subcommand;
Data.user = user;
@@ -68,8 +68,7 @@ class CommandCAP : public Command
}
reghold.set(user, 1);
- Event event((char*) &Data, this->creator, "cap_req");
- event.Send();
+ Data.Send();
if (Data.ack.size() > 0)
{
@@ -89,15 +88,14 @@ class CommandCAP : public Command
}
else if ((subcommand == "LS") || (subcommand == "LIST"))
{
- CapData Data;
+ CapEvent Data(creator, subcommand == "LS" ? "cap_ls" : "cap_list");
Data.type = subcommand;
Data.user = user;
Data.creator = this->creator;
reghold.set(user, 1);
- Event event((char*) &Data, this->creator, subcommand == "LS" ? "cap_ls" : "cap_list");
- event.Send();
+ Data.Send();
std::string Result;
if (Data.wanted.size() > 0)
@@ -109,15 +107,14 @@ class CommandCAP : public Command
}
else if (subcommand == "CLEAR")
{
- CapData Data;
+ CapEvent Data(creator, "cap_clear");
Data.type = subcommand;
Data.user = user;
Data.creator = this->creator;
reghold.set(user, 1);
- Event event((char*) &Data, this->creator, "cap_clear");
- event.Send();
+ Data.Send();
std::string Result = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined();
user->WriteServ("CAP * ACK :%s", Result.c_str());