]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
m_spanningtree Send, parse and translate IJOINs with membership ids
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index bb0191250e707c620b0833b81a50251114423ffe..57ca18a8fc22e84e9029cf4719684ed9caf414fe 100644 (file)
@@ -110,7 +110,7 @@ class CommandSVSWatch : public Command
 
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
-               if (!ServerInstance->ULine(user->server))
+               if (!user->server->IsULine())
                        return CMD_FAILURE;
 
                User *u = ServerInstance->FindNick(parameters[0]);
@@ -231,7 +231,7 @@ class CommandWatch : public Command
                        }
 
                        User* target = ServerInstance->FindNick(nick);
-                       if (target)
+                       if ((target) && (target->registered == REG_ALL))
                        {
                                (*wl)[nick] = std::string(target->ident).append(" ").append(target->dhost).append(" ").append(ConvToStr(target->age));
                                user->WriteNumeric(604, "%s %s :is online", nick, (*wl)[nick].c_str());
@@ -308,10 +308,10 @@ class CommandWatch : public Command
                                        {
                                                for (watchlist::iterator q = wl->begin(); q != wl->end(); q++)
                                                {
-                                                       if (!q->second.empty())
+                                                       User* targ = ServerInstance->FindNick(q->first.c_str());
+                                                       if (targ && !q->second.empty())
                                                        {
                                                                user->WriteNumeric(604, "%s %s :is online", q->first.c_str(), q->second.c_str());
-                                                               User *targ = ServerInstance->FindNick(q->first.c_str());
                                                                if (targ->IsAway())
                                                                {
                                                                        user->WriteNumeric(609, "%s %s %s %lu :is away", targ->nick.c_str(), targ->ident.c_str(), targ->dhost.c_str(), (unsigned long) targ->awaytime);