本文整理汇总了C++中CChannel::SetHasNames方法的典型用法代码示例。如果您正苦于以下问题:C++ CChannel::SetHasNames方法的具体用法?C++ CChannel::SetHasNames怎么用?C++ CChannel::SetHasNames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChannel
的用法示例。
在下文中一共展示了CChannel::SetHasNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseLineArgV
//.........这里部分代码省略.........
nickv = ArgToArray(nicks);
if (AllocFailed(nickv)) {
ArgFree(nicks);
return false;
}
int nickc = ArgCount(nicks);
for (int i = 0; i < nickc; i++) {
char *Nick = strdup(nickv[i]);
char *BaseNick = Nick;
if (AllocFailed(Nick)) {
ArgFree(nicks);
return false;
}
StrTrim(Nick, ' ');
while (IsNickPrefix(*Nick)) {
Nick++;
}
char *Modes = NULL;
if (BaseNick != Nick) {
Modes = (char *)malloc(Nick - BaseNick + 1);
if (!AllocFailed(Modes)) {
strmcpy(Modes, BaseNick, Nick - BaseNick + 1);
}
}
Channel->AddUser(Nick, Modes);
free(BaseNick);
free(Modes);
}
ArgFreeArray(nickv);
ArgFree(nicks);
}
} else if (argc > 3 && iRaw == 366) {
Channel = GetChannel(argv[3]);
if (Channel != NULL) {
Channel->SetHasNames();
}
} else if (argc > 9 && iRaw == 352) {
const char *Ident = argv[4];
const char *Host = argv[5];
const char *Server = argv[6];
const char *Nick = argv[7];
const char *Realname = argv[9];
char *Mask;
int rc = asprintf(&Mask, "%s!%[email protected]%s", Nick, Ident, Host);
if (!RcFailed(rc)) {
UpdateHostHelper(Mask);
UpdateWhoHelper(Nick, Realname, Server);
free(Mask);
}
} else if (argc > 6 && iRaw == 367) {
Channel = GetChannel(argv[3]);
if (Channel != NULL) {
Channel->GetBanlist()->SetBan(argv[4], argv[5], atoi(argv[6]));
}
} else if (argc > 3 && iRaw == 368) {
Channel = GetChannel(argv[3]);
if (Channel != NULL) {
Channel->SetHasBans();
}
} else if (argc > 3 && iRaw == 396) {
free(m_Site);
m_Site = strdup(argv[3]);
if (AllocFailed(m_Site)) {}
} else if (argc > 3 && hashRaw == hashPong && m_Server != NULL && strcasecmp(argv[2], m_Server) == 0 && m_EatPong) {
m_EatPong = false;
return false;
} else if (argc > 3 && iRaw == 421) {
m_FloodControl->Unplug();
return false;
}
if (GetOwner() != NULL) {
return ModuleEvent(argc, argv);
} else {
return true;
}
}