Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Talk_Report(Character *character, PacketReader &reader)
- {
- if (character->muted_until > time(0)) return;
- std::string message = reader.GetEndString();
- limit_message(message, static_cast<int>(character->world->config["ChatLength"]));
- if (message.empty())
- {
- return;
- }
- if ( (character->SourceAccess() && message[0] == '$' ) || message[0]=='#')
- {
- bool player = ( message[0]=='#' ) ;
- std::string command;
- std::vector<std::string> arguments = util::explode(' ', message);
- command = arguments.front().substr(1);
- arguments.erase(arguments.begin());
- if(!player)
- {
- character->world->Command(command, arguments, character);
- if (character->world->config["LogCommands"])
- {
- Console::Out("%s: %s", character->real_name.c_str(), message.c_str());
- }
- }
- else
- {
- if( command == "compare" )
- {
- character->comp_locker.clear();
- PacketBuilder reply(PACKET_LOCKER, PACKET_OPEN,2);
- reply.AddChar(0);
- reply.AddChar(0);
- character->Send(reply);
- }
- }
- }
- else
- {
- character->map->Msg(character, message, false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement