diff options
Diffstat (limited to 'src/connectionhandler.cpp')
-rw-r--r-- | src/connectionhandler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/connectionhandler.cpp b/src/connectionhandler.cpp index 2583e3fc..9a58b882 100644 --- a/src/connectionhandler.cpp +++ b/src/connectionhandler.cpp @@ -247,3 +247,15 @@ void ConnectionHandler::registerHandler( { handlers[msgId] = handler; } + +void ConnectionHandler::sendTo(tmwserv::Being *being, MessageOut &msg) +{ + for (NetComputers::iterator i = clients.begin(); + i != clients.end(); + i++) { + if ((*i)->getCharacter() == being) { + (*i)->send(msg.getPacket()); + break; + } + } +} |