这篇教程C++ IsPerson函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中IsPerson函数的典型用法代码示例。如果您正苦于以下问题:C++ IsPerson函数的具体用法?C++ IsPerson怎么用?C++ IsPerson使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了IsPerson函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: m_quit/* * m_quit * parv[0] = sender prefix * parv[1] = comment */int m_quit(struct Client *cptr, struct Client *sptr, int parc, char *parv[])#ifdef TIDY_QUIT{ buf[0] = '/0'; if ((parc > 1) && parv[1]) { if (strlen(parv[1]) > (MAX_QUIT_LENGTH - 2)) parv[1][MAX_QUIT_LENGTH - 2] = '/0'; /* Don't add quotes to a null message */ if (MyConnect(sptr) && *parv[1]) { strncpy_irc(buf, "/"", 2); strncat(buf, strip_colour(parv[1]), MAX_QUIT_LENGTH - 2); strncat(buf, "/"", 1); } else strncpy_irc(buf, parv[1], BUFSIZE); } sptr->flags |= FLAGS_NORMALEX;#ifdef ANTI_SPAM_EXIT_MESSAGE /* Your quit message is suppressed if: * * You haven't been connected to the server for long enough */ if( !IsServer(sptr) && MyConnect(sptr) && (sptr->firsttime + ANTI_SPAM_EXIT_MESSAGE_TIME) > CurrentTime) strcpy(buf, "Client Quit"); else if (MyConnect(sptr) && IsPerson(sptr)) { /* Or you are in a channel to which you cannot send */ struct SLink *chptr; for (chptr = sptr->user->channel; chptr; chptr = chptr->next) { if (can_send(sptr, chptr->value.chptr) != 0) { strcpy(buf, "Client Quit"); break; } } }#endif if (IsPerson(sptr)) { sendto_local_ops_flag(UMODE_CCONN, "Client exiting: %s (%[email C++ IsPet函数代码示例 C++ IsPendingKill函数代码示例
|