// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#include <ctime>
+#include <string>
#include "Socket.H"
#include "DCCParser.H"
#include "DCCConnection.H"
+#include "Person.H"
+#include "BotInterp.H"
+#include "Utils.H"
DCCConnection::DCCConnection(Bot *b, String n, unsigned long address,
int port)
{
if (!socket.connect())
return false;
+
+#ifdef USESCRIPTS
+ // run hooks/dcc/chat-begin
+ DCCPerson *tmp = new DCCPerson (this);
+ bot->botInterp->RunHooks (Hook::DCC_CHAT_BEGIN,
+ tmp->getAddress (),
+ scm_list_n (Utils::
+ string2SCM (tmp->getAddress ()),
+ SCM_UNDEFINED));
+ delete tmp;
+#endif
+
+
return true;
}
bool
DCCConnection::handleInput()
{
- String line = socket.readLine();
+ std::string line = socket.readLine();
lastSpoken = time(0);