event.clearTargetNicknameIfUs(plugin.state);
enum us = "kameloso"; enum notUs = "hirrsteff"; IRCPluginState state; state.client.nickname = us; { IRCEvent event; event.type = IRCEvent.Type.MODE; event.target.nickname = us; event.clearTargetNicknameIfUs(state); assert((event.target.nickname == us), event.target.nickname); } { IRCEvent event; event.type = IRCEvent.Type.MODE; event.target.nickname = notUs; event.clearTargetNicknameIfUs(state); assert((event.target.nickname == notUs), event.target.nickname); }
Clears the target nickname if it matches the passed string.