/* hash.h - IRC network state database
* Copyright 2000-2004 srvx Development Team
*
- * This program is free software; you can redistribute it and/or modify
+ * This file is part of srvx.
+ *
+ * srvx 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
- * (at your option) any later version. Important limitations are
- * listed in the COPYING file that accompanies this software.
+ * (at your option) 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
* 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, email srvx-maintainers@srvx.net.
+ * along with srvx; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#ifndef HASH_H
#define MODE_BAN 0x0200 /* +b BAN */
#define MODE_LIMIT 0x0400 /* +l LIMIT */
#define MODE_DELAYJOINS 0x0800 /* +D */
-#define MODE_REGONLY 0x1000 /* +r */
+#define MODE_REGONLY 0x1000 /* ircu +r, Bahamut +R */
#define MODE_NOCOLORS 0x2000 /* +c */
#define MODE_NOCTCPS 0x4000 /* +C */
+#define MODE_REGISTERED 0x8000 /* Bahamut +r */
#define MODE_REMOVE 0x80000000
#define FLAGS_OPER 0x0001 /* Operator +O */
#define FLAGS_STAMPED 0x1000 /* for users who have been stamped */
#define FLAGS_HIDDEN_HOST 0x2000 /* user's host is masked by their account */
#define FLAGS_REGNICK 0x4000 /* user owns their current nick */
+#define FLAGS_REGISTERING 0x8000 /* user has issued account register command, is waiting for email cookie */
#define IsOper(x) ((x)->modes & FLAGS_OPER)
#define IsService(x) ((x)->modes & FLAGS_SERVICE)
#define IsStamped(x) ((x)->modes & FLAGS_STAMPED)
#define IsHiddenHost(x) ((x)->modes & FLAGS_HIDDEN_HOST)
#define IsReggedNick(x) ((x)->modes & FLAGS_REGNICK)
+#define IsRegistering(x) ((x)->modes & FLAGS_REGISTERING)
+#define IsFakeHost(x) ((x)->fakehost[0] != '\0')
#define IsLocal(x) ((x)->uplink == self)
#define NICKLEN 30
char ident[USERLEN + 1]; /* Per-host identification for user */
char info[REALLEN + 1]; /* Free form additional client information */
char hostname[HOSTLEN + 1]; /* DNS name or IP address */
+ char fakehost[HOSTLEN + 1]; /* Assigned fake host */
#ifdef WITH_PROTOCOL_P10
char numeric[COMBO_NUMERIC_LEN+1];
unsigned int num_local : 18;
#endif
unsigned int dead : 1; /* Is user waiting to be recycled? */
- struct in_addr ip; /* User's IP address */
+ irc_in_addr_t ip; /* User's IP address */
long modes; /* user flags +isw etc... */
time_t timestamp; /* Time of last nick change */
unsigned int limit, locks;
char key[KEYLEN + 1];
time_t timestamp; /* creation time */
-
+
char topic[TOPICLEN + 1];
char topic_nick[NICKLEN + 1];
time_t topic_time;
void reg_account_func(account_func_t handler);
void call_account_func(struct userNode *user, const char *stamp);
void StampUser(struct userNode *user, const char *stamp);
+void assign_fakehost(struct userNode *user, const char *host, int announce);
typedef void (*new_channel_func_t) (struct chanNode *chan);
void reg_new_channel_func(new_channel_func_t handler);
struct modeNode* AddChannelUser(struct userNode* user, struct chanNode* channel);
-typedef void (*part_func_t) (struct userNode *user, struct chanNode *chan, const char *reason);
+typedef void (*part_func_t) (struct modeNode *mn, const char *reason);
void reg_part_func(part_func_t handler);
void unreg_part_func(part_func_t handler);
void DelChannelUser(struct userNode* user, struct chanNode* channel, const char *reason, int deleting);