- // Whenever the linking module receives metadata from another server and doesnt know what
- // to do with it (of course, hence the 'meta') it calls this method, and it is up to each
- // module in turn to figure out if this metadata key belongs to them, and what they want
- // to do with it.
- // In our case we're only sending a single string around, so we just construct a std::string.
- // Some modules will probably get much more complex and format more detailed structs and classes
- // in a textual way for sending over the link.
- virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata)
- {
- // check if its our metadata key, and its associated with a user
- if ((target_type == TYPE_USER) && (extname == "swhois"))
- {
- userrec* dest = (userrec*)target;
- // if they dont already have an swhois field, accept the remote server's
- std::string* text;
- if (!dest->GetExt("swhois", text))
- {
- std::string* text = new std::string(extdata);
- dest->Extend("swhois",text);
- }
- }
- }
-
- virtual void OnPostCommand(const std::string &command, const char **params, int pcnt, userrec *user, CmdResult result, const std::string &original_line)
+ void OnPostCommand(const std::string &command, const std::vector<std::string> ¶ms, User *user, CmdResult result, const std::string &original_line)