示例#1
0
void PlayersWindow::ban()
{
    SecurityManager::ban(currentName());
    /* Otherwise we may have time from a temp ban before */
    mytable->item(mytable->currentRow(), 2)->setText("Banned");
    emit banned(currentName());
}
示例#2
0
char *OpenDDLParser::parseName( char *in, char *end, Name **name ) {
    *name = ddl_nullptr;
    if( ddl_nullptr == in || in == end ) {
        return in;
    }

    // ignore blanks
    in = lookForNextToken( in, end );
    if( *in != '$' && *in != '%' ) {
        return in;
    }

    NameType ntype( GlobalName );
    if( *in == '%' ) {
        ntype = LocalName;
    }
    in++;
    Name *currentName( ddl_nullptr );
    Text *id( ddl_nullptr );
    in = parseIdentifier( in, end, &id );
    if( id ) {
        currentName = new Name( ntype, id );
        if( currentName ) {
            *name = currentName;
        }
    }

    return in;
}
示例#3
0
void CJobRunner::contineuToNext(bool cont)
{
    itsActionLabel->startAnimation();
    if(cont)
    {
        if(CMD_INSTALL==itsCmd && Item::TYPE1_FONT==(*itsIt).type) // Did we error on a pfa/pfb? if so, exclude the afm/pfm...
        {
            QString currentName((*itsIt).fileName);

            ++itsIt;

            // Skip afm/pfm
            if(itsIt!=itsEnd && (*itsIt).fileName==currentName && (Item::TYPE1_AFM==(*itsIt).type || Item::TYPE1_PFM==(*itsIt).type))
                ++itsIt;
            // Skip pfm/afm
            if(itsIt!=itsEnd && (*itsIt).fileName==currentName && (Item::TYPE1_AFM==(*itsIt).type || Item::TYPE1_PFM==(*itsIt).type))
                ++itsIt;
        }
        else
            ++itsIt;
    }
    else
    {
        itsUrls.empty();
        itsIt=itsEnd=itsUrls.constEnd();
    }
    doNext();
}
示例#4
0
void PlayersWindow::owner()
{
    QString name = currentName();
    if(!name.isNull()) {
        SecurityManager::setAuth(name, 3);
        mytable->item(mytable->currentRow(), 1)->setText("Owner");
        emit authChanged(name,3);
    }
}
DynamicVariableListNestedList::const_iterator & DynamicVariableListNestedList::const_iterator::operator++()
{
	// Advance until the name changes or we leave the nested list
	std::string currentName(getName());
	for (++m_current; (m_context.isInList(m_current)) && (getName() == currentName); ++m_current)
		;

	if (!m_context.isInList(m_current))
		m_atEnd = true;

	return *this;
}
示例#6
0
void PlayersWindow::clpass()
{
    SecurityManager::clearPass(currentName());
    mytable->item(mytable->currentRow(), 3)->setText("No");
}
示例#7
0
void PlayersWindow::unban()
{
    SecurityManager::unban(currentName());
    mytable->item(mytable->currentRow(), 2)->setText("Fine");
}
示例#8
0
void CJobRunner::dbusStatus(int pid, int status)
{
    if(pid!=getpid())
        return;

    if(CMD_UPDATE==itsCmd)
    {
        setPage(PAGE_COMPLETE);
        return;
    }

    itsLastDBusStatus=status;

    if(itsCancelClicked)
    {
        itsActionLabel->stopAnimation();
        setPage(PAGE_CANCEL);
        return;
        /*
        if(RESP_CANCEL==itsResponse)
            itsIt=itsEnd;
        itsCancelClicked=false;
        setPage(PAGE_PROGRESS);
        itsActionLabel->startAnimation();
        */
    }

    // itsIt will equal itsEnd if user decided to cancel the current op
    if(itsIt==itsEnd)
    {
        doNext();
    }
    else if (0==status)
    {
        itsModified=true;
        ++itsIt;
        doNext();
    }
    else
    {
        bool    cont(itsAutoSkip && itsUrls.count()>1);
        QString currentName((*itsIt).fileName);

        if(!cont)
        {
            itsActionLabel->stopAnimation();

            if(FontInst::STATUS_SERVICE_DIED==status)
            {
                setPage(PAGE_ERROR, errorString(status));
                itsIt=itsEnd;
            }
            else
            {
                ItemList::ConstIterator lastPartOfCurrent(itsIt),
                                        next(itsIt==itsEnd ? itsEnd : itsIt+1);

                // If we're installing a Type1 font, and its already installed - then we need to skip past AFM/PFM
                if(next!=itsEnd && Item::TYPE1_FONT==(*itsIt).type &&
                   (*next).fileName==currentName && (Item::TYPE1_AFM==(*next).type || Item::TYPE1_PFM==(*next).type))
                {
                    next++;
                    if(next!=itsEnd && (*next).fileName==currentName && (Item::TYPE1_AFM==(*next).type || Item::TYPE1_PFM==(*next).type))
                        next++;
                }
                if(1==itsUrls.count() || next==itsEnd)
                    setPage(PAGE_ERROR, errorString(status));
                else
                {
                    setPage(PAGE_SKIP, errorString(status));
                    return;
                }
            }
        }

        contineuToNext(cont);
    }
}