The current IRCPlugin, whatever it is.
The name of a user to look up.
final class MyPlugin : IRCPlugin { mixin IRCPluginImpl; } IRCPluginState state; IRCPlugin plugin = new MyPlugin(state); IRCUser newUser; newUser.nickname = "nickname"; newUser.displayName = "NickName"; plugin.state.users["nickname"] = newUser; immutable sameUser = getUser(plugin, "nickname"); assert(newUser == sameUser); version(TwitchSupport) { plugin.state.server.daemon = IRCServer.Daemon.twitch; immutable sameAgain = getUser(plugin, "NickName"); assert(newUser == sameAgain); }
Retrieves an IRCUser from the passed plugin's users associative array. If none exists, returns a minimally viable IRCUser with the passed nickname as its only value.
On Twitch, if no user was found, it additionally tries to look up the passed nickname as if it was a display name.