Permalink
Browse files

autoreply: check if the network is attached instead of the user

This fixes a bug where the autoreply message wasn't being sent if you
were attached to another network

Also allow loading this module as a network module
  • Loading branch information...
1 parent a8cb769 commit 483c8ed0d19f0c3fea148fbd7ca227e4ab787abf @kylef kylef committed Oct 19, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 modules/autoreply.cpp
View
@@ -56,7 +56,7 @@ class CAutoReplyMod : public CModule {
if (m_Messaged.HasItem(sNick))
return;
- if (m_pUser->IsUserAttached())
+ if (m_pNetwork->IsUserAttached())
return;
m_Messaged.AddItem(sNick);
@@ -95,6 +95,7 @@ class CAutoReplyMod : public CModule {
template<> void TModInfo<CAutoReplyMod>(CModInfo& Info) {
Info.SetWikiPage("autoreply");
+ Info.AddType(CModInfo::NetworkModule);
}
MODULEDEFS(CAutoReplyMod, "Reply to queries when you are away")

0 comments on commit 483c8ed

Please sign in to comment.