CString& CUser::ExpandString(const CString& sStr, CString& sRet) const {
    CString sTime = CUtils::CTime(time(nullptr), m_sTimezone);

    sRet = sStr;
    sRet.Replace("%altnick%", GetAltNick());
    sRet.Replace("%bindhost%", GetBindHost());
    sRet.Replace("%defnick%", GetNick());
    sRet.Replace("%ident%", GetIdent());
    sRet.Replace("%nick%", GetNick());
    sRet.Replace("%realname%", GetRealName());
    sRet.Replace("%time%", sTime);
    sRet.Replace("%uptime%", CZNC::Get().GetUptime());
    sRet.Replace("%user%", GetUserName());
    sRet.Replace("%version%", CZNC::GetVersion());
    sRet.Replace("%vhost%", GetBindHost());
    sRet.Replace("%znc%", CZNC::GetTag(false));

    // Allows for escaping ExpandString if necessary, or to prevent
    // defaults from kicking in if you don't want them.
    sRet.Replace("%empty%", "");
    // The following lines do not exist. You must be on DrUgS!
    sRet.Replace("%irc%", "All your IRC are belong to ZNC");
    // Chosen by fair zocchihedron dice roll by SilverLeo
    sRet.Replace("%rand%", "42");

    return sRet;
}
CString& CUser::ExpandString(const CString& sStr, CString& sRet) const {
    CString sTime = CUtils::CTime(time(nullptr), m_sTimezone);

    sRet = sStr;
    sRet.Replace("%altnick%", GetAltNick());
    sRet.Replace("%bindhost%", GetBindHost());
    sRet.Replace("%defnick%", GetNick());
    sRet.Replace("%ident%", GetIdent());
    sRet.Replace("%nick%", GetNick());
    sRet.Replace("%realname%", GetRealName());
    sRet.Replace("%time%", sTime);
    sRet.Replace("%uptime%", CZNC::Get().GetUptime());
    sRet.Replace("%user%", GetUserName());
    sRet.Replace("%version%", CZNC::GetVersion());
    sRet.Replace("%vhost%", GetBindHost());
    sRet.Replace("%znc%", CZNC::GetTag(false));

     
     
    sRet.Replace("%empty%", "");
     
    sRet.Replace("%irc%", "All your IRC are belong to ZNC");
     
    sRet.Replace("%rand%", "42");

    return sRet;
}