*
* This file is part of x3.
*
- * srvx is free software; you can redistribute it and/or modify
+ * x3 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.
};
enum levelOption {
- lvlGiveVoice,
- lvlGiveHalfOps,
- lvlGiveOps,
lvlEnfOps,
lvlEnfHalfOps,
lvlEnfModes,
lvlEnfTopic,
lvlPubCmd,
lvlSetters,
- lvlCTCPUsers,
lvlUserInfo,
lvlInviteMe,
lvlTopicSnarf,
};
enum charOption {
+ chAutomode,
chProtect,
chToys,
chTopicRefresh,
chCTCPReaction,
+ chBanTimeout,
NUM_CHAR_OPTIONS
};
#define CHANNEL_PEON_INVITE 0x00000080 /* (1 << 7) - DEPRECATED */
#define CHANNEL_OFFCHANNEL 0x00000100 /* (1 << 8) */
#define CHANNEL_HOP_ALL 0x00000200 /* (1 << 9) */
-
/* Flags with values over 0x20000000 or (1 << 29) will not work
* because chanData.flags is a 30-bit field.
*/
+/* how many seconds a pending adduser will wait for a user
+ * to get auth or register
+ */
+#define ADDUSER_PENDING_EXPIRE 7200 /* 2 hours */
+
#define IsProtected(x) ((x)->flags & CHANNEL_NODELETE)
#define IsSuspended(x) ((x)->flags & CHANNEL_SUSPENDED)
#define IsOffChannel(x) (((x)->flags & CHANNEL_OFFCHANNEL) && (off_channel > 1))
unsigned int may_opchan : 1;
unsigned int max;
unsigned int last_refresh;
- unsigned short banCount;
+ unsigned short banCount; /* Lamers, really */
unsigned short userCount;
unsigned short lvlOpts[NUM_LEVEL_OPTIONS];
unsigned char chOpts[NUM_CHAR_OPTIONS];
struct userData *users;
- struct banData *bans;
+ struct banData *bans; /* Lamers, really */
struct dict *notes;
struct suspended *suspended;
+ struct giveownership *giveownership;
struct chanData *prev;
struct chanData *next;
};
-#define USER_AUTO_OP 0x00000001
+#define USER_NOAUTO_OP 0x00000001 /* OLD; Not used at all.. */
#define USER_SUSPENDED 0x00000002
#define USER_AUTO_INVITE 0x00000004
-#define USER_FLAGS_SIZE 7
+#define USER_AUTO_OP 0x00000008
+#define USER_FLAGS_SIZE 15
+#define USER_FLAGS_DEFAULT USER_AUTO_OP
-#define IsUserAutoOp(USER) (!((USER)->flags & USER_AUTO_OP))
+#define IsUserAutoOp(USER) ((USER)->flags & USER_AUTO_OP)
#define IsUserSuspended(USER) ((USER)->flags & USER_SUSPENDED)
#define IsUserAutoInvite(USER) ((USER)->flags & USER_AUTO_INVITE)
char *info;
time_t seen;
+ time_t expires;
unsigned short access;
unsigned int present : 1;
unsigned int flags : USER_FLAGS_SIZE;
struct userData *u_next;
};
+struct adduserPending
+{
+ struct chanNode *channel;
+ struct userNode *user;
+ int level;
+ time_t created;
+
+ struct adduserPending *prev;
+ struct adduserPending *next;
+};
+
struct banData
{
char mask[NICKLEN + USERLEN + HOSTLEN + 3];
struct suspended *previous;
};
+struct giveownership
+{
+ char *staff_issuer;
+ char *old_owner;
+ char *target;
+ unsigned short target_access;
+ time_t issued;
+ char *reason;
+ struct giveownership *previous;
+};
+
struct do_not_register
{
char chan_name[CHANNELLEN+1];
void do_math(char *Buffer, char *Math);
char* user_level_name_from_level(int level);
+void process_adduser_pending(struct userNode *user);
+void wipe_adduser_pending(struct chanNode *channel, struct userNode *user);
#endif