Author: Bleep <tomh@inxpress.net>
[ircu2.10.12-pk.git] / include / whowas.h
index e7def4e3568bf5ab7a8c271eae5d98da48a2dd0c..9084e00d3a6e3b4f5a1e509dc1fa1aa0bfa3c54f 100644 (file)
  * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
  */
+#ifndef INCLUDED_whowas_h
+#define INCLUDED_whowas_h
+#ifndef INCLUDED_sys_types_h
+#include <sys/types.h>        /* size_t */
+#define INCLUDED_sys_types_h
+#endif
 
-#ifndef WHOWAS_H
-#define WHOWAS_H
+struct Client;
 
-/*=============================================================================
+/*
  * General defines
  */
 
-#define BITS_PER_COL           3
-#define BITS_PER_COL_MASK      0x7
-#define WW_MAX_INITIAL         16
+#define BITS_PER_COL            3
+#define BITS_PER_COL_MASK       0x7
+#define WW_MAX_INITIAL          16
 
 #define MAX_SUB (1 << BITS_PER_COL)
 #define WW_MAX_INITIAL_MASK (WW_MAX_INITIAL - 1)
 #define WW_MAX (WW_MAX_INITIAL * MAX_SUB)
 
-/*=============================================================================
+/*
  * Structures
  */
 
@@ -45,22 +52,24 @@ struct Whowas {
   char *realname;
   char *away;
   time_t logoff;
-  struct Client *online;       /* Needed for get_history() (nick chasing) */
-  struct Whowas *hnext;                /* Next entry with the same hash value */
-  struct Whowas **hprevnextp;  /* Pointer to previous next pointer */
-  struct Whowas *cnext;                /* Next entry with the same 'online' pointer */
-  struct Whowas **cprevnextp;  /* Pointer to previous next pointer */
+  struct Client *online;        /* Needed for get_history() (nick chasing) */
+  struct Whowas *hnext;         /* Next entry with the same hash value */
+  struct Whowas **hprevnextp;   /* Pointer to previous next pointer */
+  struct Whowas *cnext;         /* Next entry with the same 'online' pointer */
+  struct Whowas **cprevnextp;   /* Pointer to previous next pointer */
 };
 
-/*=============================================================================
+/*
  * Proto types
  */
+extern struct Whowas* whowashash[];
+
+extern unsigned int hash_whowas_name(const char *name);
 
-extern aClient *get_history(const char *nick, time_t timelimit);
-extern void add_history(aClient *cptr, int still_on);
-extern void off_history(const aClient *cptr);
+extern struct Client *get_history(const char *nick, time_t timelimit);
+extern void add_history(struct Client *cptr, int still_on);
+extern void off_history(const struct Client *cptr);
 extern void initwhowas(void);
-extern int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[]);
 extern void count_whowas_memory(int *wwu, size_t *wwm, int *wwa, size_t *wwam);
 
-#endif /* WHOWAS_H */
+#endif /* INCLUDED_whowas_h */