diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-25 11:30:47 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-25 11:30:47 +0000 |
commit | 76605ad0aed7e53c4a9dab686474235f547a5837 (patch) | |
tree | 078c0ebf5f7099daaa2dcf9ff252f418dedcce34 /src/irc/bot/bot-users.h | |
parent | 487da4174504f797171f12a01636c54272ec6a62 (diff) | |
download | irssi-76605ad0aed7e53c4a9dab686474235f547a5837.zip |
Added bot plugin, it also has almost-functional botnet.
Changed configure.in's functionality so that you could tell what modules you
want to build in main irssi binary and it will create automatically the .c
files that need to call the module_init()/deinit() functions.
Fixed several minor things..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@230 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/bot/bot-users.h')
-rw-r--r-- | src/irc/bot/bot-users.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/irc/bot/bot-users.h b/src/irc/bot/bot-users.h new file mode 100644 index 00000000..c463f09e --- /dev/null +++ b/src/irc/bot/bot-users.h @@ -0,0 +1,47 @@ +#ifndef __BOT_USERS_H +#define __BOT_USERS_H + +#define USER_OP 0x0001 +#define USER_AUTO_OP 0x0002 +#define USER_AUTO_VOICE 0x0004 +#define USER_MASTER 0x0008 + +#define USER_FLAG_COUNT 4 + +/* Channel specific flags */ +typedef struct { + char *channel; + int flags; + NICK_REC *nickrec; /* Nick record in channel, + FIXME: User can be in channel with multiple nicks too! */ +} USER_CHAN_REC; + +typedef struct { + char *mask; + int not_flags; /* do not let this mask use these flags.. */ +} USER_MASK_REC; + +/* User specific flags */ +typedef struct { + char *nick; + int flags; + char *password; + + GSList *masks; + GHashTable *channels; + + int not_flags; /* active not_flags based on current host mask, + botuser_find() updates this */ +} USER_REC; + +int botuser_flags2value(const char *flags); +char *botuser_value2flags(int value); + +USER_REC *botuser_find(const char *nick, const char *host); +USER_REC *botuser_find_rec(CHANNEL_REC *channel, NICK_REC *nick); +USER_MASK_REC *botuser_add_mask(USER_REC *user, const char *mask); + +void botuser_set_password(USER_REC *user, const char *password); +int botuser_verify_password(USER_REC *user, const char *password); + +#endif |