]>
jfr.im git - irc/evilnet/mod.chanfix.git/blob - SAYCommand.cc
4 * 08/16/2006 - Jimmy Lipham <music0m@alltel.net>
7 * Displays <text> in <#channel>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
29 #include "gnuworld_config.h"
30 #include "StringTokenizer.h"
33 #include "responses.h"
42 void SAYCommand::Exec(iClient
* theClient
, sqlcfUser
* theUser
, const std::string
& Message
)
44 StringTokenizer
st(Message
);
46 std::string option
= st
[1];
47 std::string value
= st
.assemble(2);
49 bot
->logAdminMessage("%s (%s) SAY %s %s",
50 theUser
->getUserName().c_str(),
51 theClient
->getRealNickUserHost().c_str(),
52 option
.c_str(), value
.c_str());
54 bot
->logLastComMessage(theClient
, Message
);
56 Channel
* thisChan
= Network
->findChannel(option
);
59 bot
->SendTo(theClient
,
60 "The channel %s does not exist on the network.",
63 bot
->Message(thisChan
,value
);
69 } // namespace gnuworld