X-Git-Url: https://git.hcoop.net/clinton/bobotpp.git/blobdiff_plain/e07b6b46d151a91fc107e632cbfb63e804e58885..0bfd545aaf9523a0823e27c4fbae8edb8796fb91:/source/Bot.H diff --git a/source/Bot.H b/source/Bot.H index a0bbcd0..b57f2a8 100644 --- a/source/Bot.H +++ b/source/Bot.H @@ -1,6 +1,6 @@ // Bot.H -*- C++ -*- // Copyright (c) 1997, 1998 Etienne BERNARD -// Copyright (c) 2002 Clinton Ebadi +// Copyright (c) 2002,2003 Clinton Ebadi // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef BOT_H #define BOT_H @@ -30,33 +30,30 @@ #include #include "String.H" -#include "Person.H" -#include "ServerList.H" -#include "ChannelList.H" -#include "UserList.H" -#include "ShitList.H" -#include "TodoList.H" -#include "Parser.H" -#ifdef USESCRIPTS -#include "BotInterp.H" -#include -// FIXME: remove guile/gh once transition is complete -// This is the last reference to this header! -#include -#endif - -#define VERSION_STRING PACKAGE" version "VERSION" by unknown_lamer@OPN \n1.97 and below by eb@IRCNet " -#define COPYRIGHT_STRING PACKAGE" version "VERSION", Copyright (C) 1997-2000 Etienne BERNARD\nCopyright (C) 2002 Clinton Ebadi" +#define VERSION_STRING PACKAGE " version " VERSION " by unknown_lamer@FreeNode \n1.97 and below by eb@IRCNet " +#define COPYRIGHT_STRING PACKAGE " version " VERSION ", Copyright (C) 1997-2000 Etienne BERNARD\nCopyright (C) 2002,2003,2004,2005,2008,2009,2020 Clinton Ebadi" class Channel; +class ChannelList; +class Commands; class DCCConnection; -class Parser; +class DCCManager; class DCCParser; +class Parser; +class Person; class ServerConnection; -class Commands; +class ServerList; +class ShitList; +class UserList; class UserCommands; -class Utils; + +class userFunction; +class wantedChannel; + +#ifdef USESCRIPTS +class BotInterp; +#endif class Bot { public: @@ -85,11 +82,9 @@ public: UserList * userList; ShitList * shitList; ServerList * serverList; - TodoList * todoList; #ifdef USESCRIPTS BotInterp * botInterp; #endif - // std::list userFunctions; std::map > userFunctions; std::map > wantedChannels; @@ -100,13 +95,14 @@ public: std::time_t startTime, currentTime, lastNickNameChange, lastChannelJoin; ServerConnection * serverConnection; - std::list dccConnections; + DCCManager* dccConnections; std::map > userhostMap; unsigned long sentUserhostID; unsigned long receivedUserhostID; - static const unsigned int MAX_MESSAGES = 2; + static unsigned int MAX_MESSAGES; + static unsigned int MAX_NICKLENGTH; static const std::time_t NICK_CHANGE = 60; static const std::time_t CHANNEL_JOIN = 60; static const std::time_t IGNORE_DELAY = 180; @@ -137,12 +133,14 @@ public: void reconnect(); + // getters and setters + void set_log_dir (String); + void set_log_file (String); friend class Parser; friend class DCCParser; friend class Person; friend class Channel; - friend class Utils; friend class ServerConnection; friend class UserCommands; friend class Commands; @@ -152,7 +150,8 @@ private: void nextServer(); void connect(int); - void addDCC(Person *, unsigned long, int); + enum DCC_TYPE { CHAT }; + void addDCC(Person *, unsigned long, int, int); void rehash(); String getUserhost(String, String);