diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-11 14:36:53 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 21:01:17 -0400 |
commit | e6263dba84b80f03d02c379ace081e602f8ef199 (patch) | |
tree | a6d055b24245e47b1f6c4973c4502937ecabd751 /include | |
parent | 631d11d6a81e8c5f63a19fc279606a61ab1a0563 (diff) |
Allow attaching metadata to nickrequests and storing it in the databases and fixed windows build
Diffstat (limited to 'include')
-rw-r--r-- | include/account.h | 4 | ||||
-rw-r--r-- | include/mail.h | 8 | ||||
-rw-r--r-- | include/modes.h | 4 | ||||
-rw-r--r-- | include/modules.h | 15 | ||||
-rw-r--r-- | include/servers.h | 2 | ||||
-rw-r--r-- | include/services.h | 1 |
6 files changed, 23 insertions, 11 deletions
diff --git a/include/account.h b/include/account.h index 004760699..5449bd93a 100644 --- a/include/account.h +++ b/include/account.h @@ -69,9 +69,7 @@ enum NickCoreFlag NI_END }; -/** XXX: this really needs to die with fire and be merged with metadata into NickCore or something. - */ -class CoreExport NickRequest +class CoreExport NickRequest : public Extensible { public: NickRequest(const std::string &nickname); diff --git a/include/mail.h b/include/mail.h index d64e36f30..5fe25ab08 100644 --- a/include/mail.h +++ b/include/mail.h @@ -7,10 +7,10 @@ extern CoreExport bool MailValidate(const std::string &email); class MailThread : public Thread { private: - const std::string MailTo; - const std::string Addr; - const std::string Subject; - const std::string Message; + std::string MailTo; + std::string Addr; + std::string Subject; + std::string Message; bool Success; public: diff --git a/include/modes.h b/include/modes.h index 622627774..d1b601b31 100644 --- a/include/modes.h +++ b/include/modes.h @@ -80,7 +80,7 @@ class CoreExport Mode /* Class of mode this is */ ModeClass Class; /* The mode name, as a string */ - const std::string NameAsString; + std::string NameAsString; /* Mode char for this */ char ModeChar; /* Type of mode this is */ @@ -119,7 +119,7 @@ class CoreExport UserMode : public Mode virtual ~UserMode(); }; -class UserModeParam : public UserMode +class CoreExport UserModeParam : public UserMode { public: /** Default constructor diff --git a/include/modules.h b/include/modules.h index 174fb6e04..f3bc20bfb 100644 --- a/include/modules.h +++ b/include/modules.h @@ -26,7 +26,6 @@ typedef HMODULE ano_module_t; #define dlopen(file, unused) LoadLibrary(file) - E const char *dlerror(); #define dlsym(file, symbol) (HMODULE)GetProcAddress(file, symbol) #define dlclose(file) FreeLibrary(file) ? 0 : 1 #define ano_modclearerr() SetLastError(0) @@ -633,6 +632,14 @@ class CoreExport Module */ virtual EventReturn OnDatabaseReadMetadata(NickAlias *na, const std::string &key, const std::vector<std::string> ¶ms) { return EVENT_CONTINUE; } + /** Called when nickrequest metadata is read from the database + * @param nr The nickrequest + * @parm key The metadata key + * @param params The params from the database + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to stop processing + */ + virtual EventReturn OnDatabaseReadMetadata(NickRequest *nr, const std::string &key, const std::vector<std::string> ¶ms) { return EVENT_CONTINUE; } + /** Called when botinfo metadata is read from the database * @param bi The botinfo * @param key The metadata key @@ -661,6 +668,12 @@ class CoreExport Module */ virtual void OnDatabaseWriteMetadata(void (*WriteMetadata)(const std::string &, const std::string &), NickAlias *na) { } + /** Called when we are wrting metadata for a nickrequest + * @param WriteMetata A callback function used to insert the metadata + * @param nr The nick request + */ + virtual void OnDatabaseWriteMetadata(void (*WriteMetadata)(const std::string &, const std::string &), NickRequest *nr) { } + /** Called when we are writing metadata for a botinfo * @param WriteMetata A callback function used to insert the metadata * @param bi The botinfo diff --git a/include/servers.h b/include/servers.h index f6a5933ed..3a26e1546 100644 --- a/include/servers.h +++ b/include/servers.h @@ -71,7 +71,7 @@ enum ServerFlag /** Class representing a server */ -class Server : public Flags<ServerFlag> +class CoreExport Server : public Flags<ServerFlag> { private: /* Server name */ diff --git a/include/services.h b/include/services.h index a26802983..4a8eb8d77 100644 --- a/include/services.h +++ b/include/services.h @@ -91,6 +91,7 @@ # define inet_ntop inet_ntop_ # define MARK_DEPRECATED +extern CoreExport const char *dlerror(); extern CoreExport int inet_pton(int af, const char *src, void *dst); extern CoreExport const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif |