1 // DCCConnection.C -*- C++ -*-
2 // Copyright (c) 1998 Etienne BERNARD
3 // Copyright (C) 2002 Clinton Ebadi
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include "DCCParser.H"
24 #include "DCCConnection.H"
26 #include "BotInterp.H"
29 DCCConnection::DCCConnection(unsigned long address,
31 : Connection(address, port)
34 DCCConnection::DCCConnection(Bot *b, String n, unsigned long address,
36 : Connection(address, port), bot(b), nuh (n), lastSpoken(time(0)), autoRemove(true)
40 // DCCConnection::connect()
42 // if (!socket.connect())
46 // // run hooks/dcc/chat-begin
47 // DCCPerson *tmp = new DCCPerson (this);
48 // bot->botInterp->RunHooks (Hook::DCC_CHAT_BEGIN,
49 // tmp->getAddress (),
50 // scm_list_n (Utils::
51 // string2SCM (tmp->getAddress ()),
61 // DCCConnection::handleInput()
63 // std::string line = socket.readLine();
65 // lastSpoken = time(0);
67 // if (line.length() == 0)
71 // std::cout << "DCC: <" << line << ">" << std::endl;
73 // DCCParser::parseLine(this, line);
79 // DCCConnection::sendNotice(String message)
81 // socket.write(message, true);