summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-11 02:55:44 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-11 02:55:44 +0000
commit639a462ea42ee360c9aeeb96bd82ed90e978f204 (patch)
tree50413f9a9aa40ceed26c6db582e2de270c6a2bf8 /src/modules
parentcff411663de995e81e317632943b7e9d46958fcf (diff)
Fixed the order of signon/signoff messages in m_watch (bug #410)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8023 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_watch.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 12dda102b..caad37049 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -416,33 +416,33 @@ class Modulewatch : public Module
virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
{
- watchentries::iterator new_online = whos_watching_me->find(user->nick);
watchentries::iterator new_offline = whos_watching_me->find(assign(oldnick));
+ watchentries::iterator new_online = whos_watching_me->find(user->nick);
- if (new_online != whos_watching_me->end())
+ if (new_offline != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = new_online->second.begin(); n != new_online->second.end(); n++)
+ for (std::deque<userrec*>::iterator n = new_offline->second.begin(); n != new_offline->second.end(); n++)
{
watchlist* wl;
if ((*n)->GetExt("watchlist", wl))
{
- (*wl)[user->nick] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
if (!user->Visibility || user->Visibility->VisibleTo(user))
- (*n)->WriteServ("600 %s %s %s :arrived online", (*n)->nick, user->nick, (*wl)[user->nick].c_str());
+ (*n)->WriteServ("601 %s %s %s %s %lu :went offline", (*n)->nick, oldnick.c_str(), user->ident, user->dhost, user->age);
+ (*wl)[oldnick.c_str()] = "";
}
}
}
- if (new_offline != whos_watching_me->end())
+ if (new_online != whos_watching_me->end())
{
- for (std::deque<userrec*>::iterator n = new_offline->second.begin(); n != new_offline->second.end(); n++)
+ for (std::deque<userrec*>::iterator n = new_online->second.begin(); n != new_online->second.end(); n++)
{
watchlist* wl;
if ((*n)->GetExt("watchlist", wl))
{
+ (*wl)[user->nick] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
if (!user->Visibility || user->Visibility->VisibleTo(user))
- (*n)->WriteServ("601 %s %s %s %s %lu :went offline", (*n)->nick, oldnick.c_str(), user->ident, user->dhost, user->age);
- (*wl)[oldnick.c_str()] = "";
+ (*n)->WriteServ("600 %s %s %s :arrived online", (*n)->nick, user->nick, (*wl)[user->nick].c_str());
}
}
}