diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-06 02:25:20 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-06 02:25:20 +0000 |
commit | a7b0c26a4c56440e4bc5ddc6d3ecfeb36089dbb2 (patch) | |
tree | ba6da52898a7ce1e157bef549647664c5258fe48 /src/modules/m_watch.cpp | |
parent | ec48546cd05136c61f85d669a3dc49a874935a89 (diff) |
Holy christ that was a LOT OF SPACES. TABS, USE THEM, LOVE THEM, APPRECIATE THEM - we now have no stupid spaces. This was mostly a mass find/replace, so some indentation may be stuffed. Minor issue, though.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3838 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_watch.cpp')
-rw-r--r-- | src/modules/m_watch.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index e3a0815a5..1e11dfd51 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -51,17 +51,17 @@ class cmd_watch : public command_t { if (!pcnt) { - for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) - { - if (q->watcher == user) - { + for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) + { + if (q->watcher == user) + { userrec* targ = Srv->FindNick(q->target); if (targ) { WriteServ(user->fd,"604 %s %s %s %s %lu :is online",user->nick,targ->nick,targ->ident,targ->dhost,targ->age); } - } - } + } + } WriteServ(user->fd,"607 %s :End of WATCH list",user->nick); } else if (pcnt > 0) @@ -72,46 +72,46 @@ class cmd_watch : public command_t if (!strcasecmp(nick,"C")) { // watch clear - bool done = false; - while (!done) - { - done = true; - for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) - { - if (q->watcher == user) - { - done = false; - watches.erase(q); - break; - } - } - } + bool done = false; + while (!done) + { + done = true; + for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) + { + if (q->watcher == user) + { + done = false; + watches.erase(q); + break; + } + } + } } else if (!strcasecmp(nick,"L")) { - for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) - { - if (q->watcher == user) - { - userrec* targ = Srv->FindNick(q->target); - if (targ) - { - WriteServ(user->fd,"604 %s %s %s %s %lu :is online",user->nick,targ->nick,targ->ident,targ->dhost,targ->age); - } - } - } - WriteServ(user->fd,"607 %s :End of WATCH list",user->nick); + for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) + { + if (q->watcher == user) + { + userrec* targ = Srv->FindNick(q->target); + if (targ) + { + WriteServ(user->fd,"604 %s %s %s %s %lu :is online",user->nick,targ->nick,targ->ident,targ->dhost,targ->age); + } + } + } + WriteServ(user->fd,"607 %s :End of WATCH list",user->nick); } else if (!strcasecmp(nick,"S")) { std::string list = ""; - for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) - { - if (q->watcher == user) - { + for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) + { + if (q->watcher == user) + { list = list + " " + q->target; - } - } + } + } char* l = (char*)list.c_str(); if (*l == ' ') l++; @@ -123,25 +123,25 @@ class cmd_watch : public command_t // removing an item from the list nick++; irc::string n1 = nick; - for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) - { - if (q->watcher == user) - { + for (watchlist::iterator q = watches.begin(); q != watches.end(); q++) + { + if (q->watcher == user) + { irc::string n2 = q->target.c_str(); userrec* a = Srv->FindNick(q->target); - if (a) - { - WriteServ(user->fd,"602 %s %s %s %s %lu :stopped watching",user->nick,a->nick,a->ident,a->dhost,a->age); - } - else - { - WriteServ(user->fd,"602 %s %s * * 0 :stopped watching",user->nick,q->target.c_str()); - } - if (n1 == n2) - { - watches.erase(q); - break; - } + if (a) + { + WriteServ(user->fd,"602 %s %s %s %s %lu :stopped watching",user->nick,a->nick,a->ident,a->dhost,a->age); + } + else + { + WriteServ(user->fd,"602 %s %s * * 0 :stopped watching",user->nick,q->target.c_str()); + } + if (n1 == n2) + { + watches.erase(q); + break; + } } } } @@ -170,15 +170,15 @@ class cmd_watch : public command_t watches.push_back(w); log(DEBUG,"*** Added %s to watchlist of %s",nick,user->nick); } - userrec* a = Srv->FindNick(nick); - if (a) - { - WriteServ(user->fd,"604 %s %s %s %s %lu :is online",user->nick,a->nick,a->ident,a->dhost,a->age); - } - else - { - WriteServ(user->fd,"605 %s %s * * 0 :is offline",user->nick,nick); - } + userrec* a = Srv->FindNick(nick); + if (a) + { + WriteServ(user->fd,"604 %s %s %s %s %lu :is online",user->nick,a->nick,a->ident,a->dhost,a->age); + } + else + { + WriteServ(user->fd,"605 %s %s * * 0 :is offline",user->nick,nick); + } } } } |