[project @ 2002-07-07 02:33:51 by unknown_lamer]
[clinton/bobotpp.git] / source / User.H
diff --git a/source/User.H b/source/User.H
new file mode 100644 (file)
index 0000000..1499ce9
--- /dev/null
@@ -0,0 +1,78 @@
+// User.H  -*- C++ -*-
+// Copyright (c) 1997, 1998 Etienne BERNARD
+
+// 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
+// the Free Software Foundation; either version 2 of the License, or
+// any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// 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.
+
+#ifndef USER_H
+#define USER_H
+
+#include "UserList.H"
+#include "UserListItem.H"
+
+class Bot;
+class Utils;
+class Parser;
+class Channel;
+class Commands;
+class UserCommands;
+
+class User {
+
+  int mode;
+  int floodNum;
+  UserListItem * userListItem;
+  String nick;
+  String userhost;
+  String userkey;
+
+public:
+  enum {
+    OP_MODE = 1,
+    VOICE_MODE = 2,
+    AWAY_MODE = 4,
+    IRCOP_MODE = 8
+  };
+
+  enum {
+    NONE = 0,
+    USER = 1,
+    TRUSTED_USER = 2,
+    FRIEND = 3,
+    MASTER = 4
+  };
+
+  enum {
+    NO_PROT = 0,
+    NO_BAN = 1,
+    NO_KICK = 2,
+    NO_DEOP = 3
+  };
+
+  User(String, String, String, int, UserList *);
+  User(String, int);
+  
+  int getLevel();
+  int getProt();
+  bool getAop();
+
+  friend class Bot;
+  friend class Utils;
+  friend class Parser;
+  friend class Channel;
+  friend class Commands;
+  friend class UserCommands;
+};
+
+#endif