From 963af328e2d843c5a2c5196f38806f9189915485 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 1 Jan 2007 19:50:20 +0000 Subject: [PATCH] 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 --- src/modules/m_swhois.cpp | 19 +++++++++++++------ 1 file 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 -- 2.39.5