ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/IRC/trout.cpp
(Generate patch)

Comparing FreeBSDAdmin/IRC/trout.cpp (file contents):
Revision 1262 by douglas, 2010-03-20T20:07:58-07:00 vs.
Revision 1295 by douglas, 2010-04-09T05:48:07-07:00

# Line 38 | Line 38 | public:
38  
39                                          VCString nicks;
40  
41 <                                        _foreach (NickMap, nick, GetUser()->FindChan(target)->GetNicks())
41 >                                        _foreach (const NickMap, nick, GetUser()->FindChan(target)->GetNicks())
42                                                  nicks.push_back(nick->first);
43  
44                                          who = nicks[::random() % nicks.size()];
# Line 48 | Line 48 | public:
48  
49                          message = "\001ACTION slaps " + who + " around a bit with a large trout\001";
50  
51 <                        PutUser(":" + GetClient()->GetNickMask() + " PRIVMSG " + target + " :" + message);
51 >                        if (GetUser()->IsChan(target))
52 >                                PutUser(":" + GetClient()->GetNickMask() + " PRIVMSG " + target + " :" + message);
53 >                        else
54 >                                PutUser(":" + target + " NOTICE " + GetClient()->GetNick() + " :\001ACTION \002" + GetClient()->GetNick() + "\017 slaps " + who + " around a bit with a large trout\001");
55                  }
56  
57                  return CONTINUE;
58          }
59   };
60  
61 < MODULEDEFS(Trout, "Trout");
61 > MODULEDEFS(Trout, "Slap people around a bit with a large trout");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines