Changeset 282:6c209c1707c5

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

Write !muc acmd messages to private for private events

Files:
1 modified

Legend:

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

    r276 r282  
    13201320                action=expandMacro(s,c,n,action,item); 
    13211321                QString from(c->name()+"/"+c->nick()); 
     1322                QString type="groupchat"; 
     1323                if (s) 
     1324                { 
     1325                        QString t1=QString::fromStdString(s->findAttribute("type")); 
     1326                        if (!t1.isEmpty()) 
     1327                                type=t1; 
     1328                        if (type!="groupchat") 
     1329                                from=QString::fromStdString(s->from().full()); 
     1330                } 
    13221331                gloox::Stanza* st=gloox::Stanza::createMessageStanza(from.toStdString(), 
    13231332                                action.toStdString()); 
    13241333                st->addAttribute("from", from.toStdString()); 
    1325                 st->addAttribute("type", "groupchat"); 
     1334                st->addAttribute("type", type.toStdString()); 
    13261335                bot()->client()->handleMessage(st, 0); 
    13271336                delete st;