String with a signed nickname.
IRCServer, with all its settings.
Reference string to write the stripped modesigns to.
The nickname without any prepended prefix signs.
IRCServer server; immutable signed = "@+kameloso"; string signs; immutable nickname = server.stripModeSign(signed, signs); assert((nickname == "kameloso"), nickname); assert((signs == "@+"), signs);
IRCServer server; server.prefixchars = [ '@' : 'o', '+' : 'v', '%' : 'h', ]; { immutable signed = "@kameloso"; string signs; immutable nickname = signed.stripModesign(server, signs); assert((nickname == "kameloso"), nickname); assert((signs == "@"), signs); } { immutable signed = "kameloso"; string signs; immutable nickname = signed.stripModesign(server, signs); assert((nickname == "kameloso"), nickname); assert(!signs.length, signs); } { immutable signed = "@+kameloso"; string signs; immutable nickname = signed.stripModesign(server, signs); assert((nickname == "kameloso"), nickname); assert((signs == "@+"), signs); }
Takes a nickname and strips it of any prepended mode signs, like the @ in @nickname. Saves the stripped signs in the ref string modesigns.