Changeset 291:08cfed5ae472

Show
Ignore:
Timestamp:
07/06/2008 12:05:50 PM (4 years ago)
Author:
Dmitry Nezhevenko <dion@…>
Branch:
default
Message:

Forward all presences with type='error' to bot owner

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/plugins/muc/mucplugin.cpp

    r290 r291  
    188188                        confFull=confFull.section('/',0,0); 
    189189                        join(confFull); 
     190                } 
     191                else 
     192                { 
     193                        gloox::JID ownerJid(DataStorage::instance()->getStdString("access/owner")); 
     194                        gloox::Stanza *outgoing=gloox::Stanza::createMessageStanza(ownerJid, 
     195                                QString("Error presence from \"%1\". Looks like I can't join:\n%2") 
     196                                .arg(QString::fromStdString(s->from().bare())) 
     197                                .arg(QString::fromStdString(s->xml())).toStdString()); 
     198                        bot()->client()->send(outgoing); 
    190199                } 
    191200                return;