summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-01 19:50:20 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-01 19:50:20 +0000
commit963af328e2d843c5a2c5196f38806f9189915485 (patch)
tree86e613610308d4091b11884b15ffa154ea903af1 /src
parent4679e462a7bdf4327041587205e52c54893ad2b9 (diff)
This should fix it on two fronts: missing Implements() value, and OnWhois doesnt work for remote, so instead we hook OnWhoisLine
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6205 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_swhois.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 937bd79ce..f1a089dd0 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -97,18 +97,25 @@ class ModuleSWhois : public Module
void Implements(char* List)
{
- List[I_OnDecodeMetaData] = List[I_OnWhois] = List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnRehash] = List[I_OnPostCommand] = 1;
+ List[I_OnDecodeMetaData] = List[I_OnWhoisLine] = List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnRehash] = List[I_OnPostCommand] = 1;
}
// :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games.
- virtual void OnWhois(userrec* source, userrec* dest)
+ int OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text)
{
- std::string* swhois;
- dest->GetExt("swhois", swhois);
- if (swhois)
+ /* We use this and not OnWhois because this triggers for remote, too */
+ if (numeric == 312)
{
- ServerInstance->SendWhoisLine(source, dest, 320, "%s %s :%s",source->nick,dest->nick,swhois->c_str());
+ /* Insert our numeric before 312 */
+ std::string* swhois;
+ dest->GetExt("swhois", swhois);
+ if (swhois)
+ {
+ ServerInstance->SendWhoisLine(user, dest, 320, "%s %s :%s",user->nick,dest->nick,swhois->c_str());
+ }
}
+ /* Dont block anything */
+ return 0;
}
// Whenever the linking module wants to send out data, but doesnt know what the data