当前位置: 首页>>代码示例>>C++>>正文


C++ WUser::GetNote方法代码示例

本文整理汇总了C++中WUser::GetNote方法的典型用法代码示例。如果您正苦于以下问题:C++ WUser::GetNote方法的具体用法?C++ WUser::GetNote怎么用?C++ WUser::GetNote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WUser的用法示例。


在下文中一共展示了WUser::GetNote方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: valuser

void valuser(int nUserNumber) {
  char s[81], s1[81], s2[81], s3[81], ar1[20], dar1[20];

  WUser user;
  GetApplication()->GetUserManager()->ReadUser(&user, nUserNumber);
  if (!user.IsUserDeleted()) {
    GetSession()->bout.NewLine();
    GetSession()->bout << "|#9Name: |#2" << user.GetUserNameAndNumber(nUserNumber) << wwiv::endl;
    GetSession()->bout << "|#9RN  : |#2" << user.GetRealName() << wwiv::endl;
    GetSession()->bout << "|#9PH  : |#2" << user.GetVoicePhoneNumber() << wwiv::endl;
    GetSession()->bout << "|#9Age : |#2" << user.GetAge() << " " << user.GetGender() << wwiv::endl;
    GetSession()->bout << "|#9Comp: |#2" << ctypes(user.GetComputerType()) << wwiv::endl;
    if (user.GetNote()[0]) {
      GetSession()->bout << "|#9Note: |#2" << user.GetNote() << wwiv::endl;
    }
    GetSession()->bout << "|#9SL  : |#2" << user.GetSl() << wwiv::endl;
    if (user.GetSl() != 255 && user.GetSl() < GetSession()->GetEffectiveSl()) {
      GetSession()->bout << "|#9New : ";
      input(s, 3, true);
      if (s[0]) {
        int nSl = atoi(s);
        if (!GetApplication()->GetWfcStatus() && nSl >= GetSession()->GetEffectiveSl()) {
          nSl = -2;
        }
        if (nSl >= 0 && nSl < 255) {
          user.SetSl(nSl);
        }
        if (nSl == -1) {
          GetSession()->bout.NewLine();
          GetSession()->bout << "|#9Delete? ";
          if (yesno()) {
            deluser(nUserNumber);
            GetSession()->bout.NewLine();
            GetSession()->bout << "|#6Deleted.\r\n\n";
          } else {
            GetSession()->bout.NewLine();
            GetSession()->bout << "|#3NOT deleted.\r\n";
          }
          return;
        }
      }
    }
    GetSession()->bout.NewLine();
    GetSession()->bout << "|#9DSL : |#2" << user.GetDsl() << wwiv::endl;
    if (user.GetDsl() != 255 && user.GetDsl() < GetSession()->GetCurrentUser()->GetDsl()) {
      GetSession()->bout << "|#9New ? ";
      input(s, 3, true);
      if (s[0]) {
        int nDsl = atoi(s);
        if (!GetApplication()->GetWfcStatus() && nDsl >= GetSession()->GetCurrentUser()->GetDsl()) {
          nDsl = -1;
        }
        if (nDsl >= 0 && nDsl < 255) {
          user.SetDsl(nDsl);
        }
      }
    }
    strcpy(s3, restrict_string);
    int ar2     = 1;
    int dar2    = 1;
    ar1[0]      = RETURN;
    dar1[0]     = RETURN;
    for (int i = 0; i <= 15; i++) {
      if (user.HasArFlag(1 << i)) {
        s[i] = static_cast<char>('A' + i);
      } else {
        s[i] = SPACE;
      }
      if (GetSession()->GetCurrentUser()->HasArFlag(1 << i)) {
        ar1[ar2++] = static_cast<char>('A' + i);
      }
      if (user.HasDarFlag(1 << i)) {
        s1[i] = static_cast<char>('A' + i);
      } else {
        s1[i] = SPACE;
      }
      if (GetSession()->GetCurrentUser()->HasDarFlag(1 << i)) {
        dar1[dar2++] = static_cast<char>('A' + i);
      }
      if (user.HasRestrictionFlag(1 << i)) {
        s2[i] = s3[i];
      } else {
        s2[i] = SPACE;
      }
    }
    s[16]       = '\0';
    s1[16]      = '\0';
    s2[16]      = '\0';
    ar1[ar2]    = '\0';
    dar1[dar2]  = '\0';
    GetSession()->bout.NewLine();
    char ch1 = '\0';
    if (ar2 > 1) {
      do {
        GetSession()->bout << "|#9AR  : |#2" << s << wwiv::endl;
        GetSession()->bout << "|#9Togl? ";
        ch1 = onek(ar1);
        if (ch1 != RETURN) {
          ch1 -= 'A';
          if (s[ch1] == SPACE) {
//.........这里部分代码省略.........
开发者ID:bhaggerty,项目名称:wwiv,代码行数:101,代码来源:sysopf.cpp


注:本文中的WUser::GetNote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。