diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 13:14:23 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-25 13:14:23 +0000 |
commit | adf20f648638da7ceece0268e1684b16fe4277b8 (patch) | |
tree | f11a40ec574a2e92a77016102dddcad950d53344 /src | |
parent | ffc039651676e0f679726b15fac4bf133e7e5bc2 (diff) |
Use TargetTypeFlags instead of int in a few places.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10711 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 4 | ||||
-rw-r--r-- | src/modules/m_taxonomy.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 6d04a8b17..4eca9492e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -170,12 +170,12 @@ void Module::OnPostLocalTopicChange(User*, Channel*, const std::string&) { } void Module::OnGetServerDescription(const std::string&, std::string&) { } void Module::OnSyncUser(User*, Module*, void*) { } void Module::OnSyncChannel(Channel*, Module*, void*) { } -void Module::ProtoSendMode(void*, int, void*, const std::string&) { } +void Module::ProtoSendMode(void*, TargetTypeFlags, void*, const std::string&) { } void Module::OnSyncChannelMetaData(Channel*, Module*, void*, const std::string&, bool) { } void Module::OnSyncUserMetaData(User*, Module*, void*, const std::string&, bool) { } void Module::OnSyncOtherMetaData(Module*, void*, bool) { } void Module::OnDecodeMetaData(int, void*, const std::string&, const std::string&) { } -void Module::ProtoSendMetaData(void*, int, void*, const std::string&, const std::string&) { } +void Module::ProtoSendMetaData(void*, TargetTypeFlags, void*, const std::string&, const std::string&) { } void Module::OnWallops(User*, const std::string&) { } void Module::OnChangeHost(User*, const std::string&) { } void Module::OnChangeName(User*, const std::string&) { } diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index e714c9c13..42547fbdc 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -847,7 +847,7 @@ int ModuleSpanningTree::OnSetAway(User* user, const std::string &awaymsg) return 0; } -void ModuleSpanningTree::ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline) +void ModuleSpanningTree::ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::string &modeline) { TreeSocket* s = (TreeSocket*)opaque; std::string output_text; @@ -861,7 +861,7 @@ void ModuleSpanningTree::ProtoSendMode(void* opaque, int target_type, void* targ User* u = (User*)target; s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" FMODE "+u->uuid+" "+ConvToStr(u->age)+" "+output_text); } - else + else if (target_type == TYPE_CHANNEL) { Channel* c = (Channel*)target; s->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" FMODE "+c->name+" "+ConvToStr(c->age)+" "+output_text); @@ -869,7 +869,7 @@ void ModuleSpanningTree::ProtoSendMode(void* opaque, int target_type, void* targ } } -void ModuleSpanningTree::ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata) +void ModuleSpanningTree::ProtoSendMetaData(void* opaque, TargetTypeFlags target_type, void* target, const std::string &extname, const std::string &extdata) { TreeSocket* s = (TreeSocket*)opaque; if (target) diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 363dfdef2..16b2c7574 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -177,8 +177,8 @@ class ModuleSpanningTree : public Module virtual void OnMode(User* user, void* dest, int target_type, const std::string &text); virtual int OnStats(char statschar, User* user, string_list &results); virtual int OnSetAway(User* user, const std::string &awaymsg); - virtual void ProtoSendMode(void* opaque, int target_type, void* target, const std::string &modeline); - virtual void ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata); + virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::string &modeline); + virtual void ProtoSendMetaData(void* opaque, TargetTypeFlags target_type, void* target, const std::string &extname, const std::string &extdata); virtual void OnEvent(Event* event); virtual ~ModuleSpanningTree(); virtual Version GetVersion(); diff --git a/src/modules/m_taxonomy.cpp b/src/modules/m_taxonomy.cpp index e9df6221d..fc7b0bf11 100644 --- a/src/modules/m_taxonomy.cpp +++ b/src/modules/m_taxonomy.cpp @@ -69,7 +69,7 @@ class ModuleTaxonomy : public Module } - void ProtoSendMetaData(void* opaque, int target_type, void* target, const std::string &extname, const std::string &extdata) + void ProtoSendMetaData(void* opaque, TargetTypeFlags target_type, void* target, const std::string &extname, const std::string &extdata) { if (target_type == TYPE_USER) { |