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


C++ CChan::SetCreationDate方法代码示例

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


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

示例1: ReadLine


//.........这里部分代码省略.........
			case 266:  // global users
				m_pNetwork->UpdateRawBuffer(":" + sServer + " " + sCmd + " ", " " + sRest);
				break;
			case 305:
				m_pNetwork->SetIRCAway(false);
				break;
			case 306:
				m_pNetwork->SetIRCAway(true);
				break;
			case 324: {  // MODE
				sRest.Trim();
				CChan* pChan = m_pNetwork->FindChan(sRest.Token(0));

				if (pChan) {
					pChan->SetModes(sRest.Token(1, true));

					// We don't SetModeKnown(true) here,
					// because a 329 will follow
					if (!pChan->IsModeKnown()) {
						// When we JOIN, we send a MODE
						// request. This makes sure the
						// reply isn't forwarded.
						return;
					}
				}
			}
				break;
			case 329: {
				sRest.Trim();
				CChan* pChan = m_pNetwork->FindChan(sRest.Token(0));

				if (pChan) {
					unsigned long ulDate = sLine.Token(4).ToULong();
					pChan->SetCreationDate(ulDate);

					if (!pChan->IsModeKnown()) {
						pChan->SetModeKnown(true);
						// When we JOIN, we send a MODE
						// request. This makes sure the
						// reply isn't forwarded.
						return;
					}
				}
			}
				break;
			case 331: {
				// :irc.server.com 331 yournick #chan :No topic is set.
				CChan* pChan = m_pNetwork->FindChan(sLine.Token(3));

				if (pChan) {
					pChan->SetTopic("");
				}

				break;
			}
			case 332: {
				// :irc.server.com 332 yournick #chan :This is a topic
				CChan* pChan = m_pNetwork->FindChan(sLine.Token(3));

				if (pChan) {
					CString sTopic = sLine.Token(4, true);
					sTopic.LeftChomp();
					pChan->SetTopic(sTopic);
				}

				break;
开发者ID:jimloco,项目名称:znc,代码行数:67,代码来源:IRCSock.cpp

示例2: ReadLine


//.........这里部分代码省略.........
			case 2:
			case 3:
			case 4:
			case 250:  // highest connection count
			case 251:  // user count
			case 252:  // oper count
			case 254:  // channel count
			case 255:  // client count
			case 265:  // local users
			case 266:  // global users
				m_pUser->UpdateRawBuffer(":" + sServer + " " + sCmd + " ", " " + sRest);
				break;
			case 305:
				m_pUser->SetIRCAway(false);
				break;
			case 306:
				m_pUser->SetIRCAway(true);
				break;
			case 324: {  // MODE
				sRest.Trim();
				CChan* pChan = m_pUser->FindChan(sRest.Token(0));

				if (pChan) {
					pChan->SetModes(sRest.Token(1, true));
				}
			}
				break;
			case 329: {
				sRest.Trim();
				CChan* pChan = m_pUser->FindChan(sRest.Token(0));

				if (pChan) {
					unsigned long ulDate = sLine.Token(4).ToULong();
					pChan->SetCreationDate(ulDate);
				}
			}
				break;
			case 331: {
				// :irc.server.com 331 yournick #chan :No topic is set.
				CChan* pChan = m_pUser->FindChan(sLine.Token(3));

				if (pChan) {
					pChan->SetTopic("");
				}

				break;
			}
			case 332: {
				// :irc.server.com 332 yournick #chan :This is a topic
				CChan* pChan = m_pUser->FindChan(sLine.Token(3));

				if (pChan) {
					CString sTopic = sLine.Token(4, true);
					sTopic.LeftChomp();
					pChan->SetTopic(sTopic);
				}

				break;
			}
			case 333: {
				// :irc.server.com 333 yournick #chan setternick 1112320796
				CChan* pChan = m_pUser->FindChan(sLine.Token(3));

				if (pChan) {
					sNick = sLine.Token(4);
					unsigned long ulDate = sLine.Token(5).ToULong();
开发者ID:stevestreza,项目名称:ZNC-Node,代码行数:67,代码来源:IRCSock.cpp

示例3: OnNumericMessage


//.........这里部分代码省略.........
    case 305:
        m_pNetwork->SetIRCAway(false);
        break;
    case 306:
        m_pNetwork->SetIRCAway(true);
        break;
    case 324: {  // MODE
        // :irc.server.com 324 nick #chan +nstk key
        CChan* pChan = m_pNetwork->FindChan(Message.GetParam(1));

        if (pChan) {
            pChan->SetModes(Message.GetParams(2));

            // We don't SetModeKnown(true) here,
            // because a 329 will follow
            if (!pChan->IsModeKnown()) {
                // When we JOIN, we send a MODE
                // request. This makes sure the
                // reply isn't forwarded.
                return true;
            }
            if (pChan->IsDetached()) {
                return true;
            }
        }
    }
    break;
    case 329: {
        // :irc.server.com 329 nick #chan 1234567890
        CChan* pChan = m_pNetwork->FindChan(Message.GetParam(1));

        if (pChan) {
            unsigned long ulDate = Message.GetParam(2).ToULong();
            pChan->SetCreationDate(ulDate);

            if (!pChan->IsModeKnown()) {
                pChan->SetModeKnown(true);
                // When we JOIN, we send a MODE
                // request. This makes sure the
                // reply isn't forwarded.
                return true;
            }
            if (pChan->IsDetached()) {
                return true;
            }
        }
    }
    break;
    case 331: {
        // :irc.server.com 331 yournick #chan :No topic is set.
        CChan* pChan = m_pNetwork->FindChan(Message.GetParam(1));

        if (pChan) {
            pChan->SetTopic("");
            if (pChan->IsDetached()) {
                return true;
            }
        }

        break;
    }
    case 332: {
        // :irc.server.com 332 yournick #chan :This is a topic
        CChan* pChan = m_pNetwork->FindChan(Message.GetParam(1));

        if (pChan) {
开发者ID:fnordcordia,项目名称:znc,代码行数:67,代码来源:IRCSock.cpp


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