diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-02 08:20:59 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-02 08:20:59 +0000 |
| commit | a819cb0cc0f54a042a088dfba9c1f6b817928641 (patch) | |
| tree | 7931a9d81367c184ca2550a1819ef685e3e0c927 /src/tools/db-convert.h | |
| parent | 3617d7978899f830d952d9bac70ed14bb0cc0fd6 (diff) | |
Rewrote the vhost code, and moved it to be part of nickalias instead of in its own list. This also fixes being able to steal other users vhosts with /hs on
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2724 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/tools/db-convert.h')
| -rw-r--r-- | src/tools/db-convert.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/tools/db-convert.h b/src/tools/db-convert.h index 6ffcdffdb..1ebeec9f4 100644 --- a/src/tools/db-convert.h +++ b/src/tools/db-convert.h @@ -68,6 +68,7 @@ typedef struct nickalias_ NickAlias; typedef struct nickcore_ NickCore; typedef struct chaninfo_ ChannelInfo; typedef struct badword_ BadWord; +typedef struct hostcore_ HostCore; struct memo_ { uint32 number; /* Index number -- not necessarily array position! */ @@ -189,6 +190,14 @@ struct badword_ { uint16 type; }; +struct hostcore_ { + HostCore *next; + char *nick; + char *vIdent; + char *vHost; + char *creator; + int32 time; +}; dbFILE *open_db_write(const char *service, const char *filename, int version); dbFILE *open_db_read(const char *service, const char *filename, int version); @@ -216,6 +225,7 @@ void close_db(dbFILE * f); ChannelInfo *chanlists[256]; NickAlias *nalists[1024]; NickCore *nclists[1024]; +HostCore *head = NULL; int b64_encode(char *src, size_t srclength, char *target, size_t targsize); @@ -774,7 +784,15 @@ void alpha_insert_chan(ChannelInfo * ci) ptr->prev = ci; } - +HostCore *findHostCore(char *nick) +{ + for (HostCore *hc = head; head; head = head->next) + { + if (nick && hc->nick && !mystricmp(hc->nick, nick)) + return hc; + } + return NULL; +} static char *int_to_base64(long); static long base64_to_int(char *); |
