Changeset 411:64529b902312
- Timestamp:
- 05/17/2010 05:19:25 PM (21 months ago)
- Author:
- Sidgyck <sidgyck@…>
- Branch:
- default
- Message:
-
[NEW]: !muc topic <subject>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r410
|
r411
|
|
| 42 | 42 | commands << "REPORT" << "MISSING" << "STAT"; |
| 43 | 43 | |
| 44 | | commands << "POKE" << "REALJID" << "INVITE" << "CLEAN"; |
| | 44 | commands << "POKE" << "REALJID" << "INVITE" << "CLEAN" << "TOPIC"; |
| 45 | 45 | pluginId=1; |
| 46 | 46 | |
| … |
… |
|
| 631 | 631 | myShouldIgnoreError=1; |
| 632 | 632 | return false; |
| | 633 | } |
| | 634 | |
| | 635 | if (cmd=="TOPIC") |
| | 636 | { |
| | 637 | Conference* conf = getConf(s); |
| | 638 | if (!conf) { |
| | 639 | reply(s, "You are not in conference!"); |
| | 640 | return true; |
| | 641 | } |
| | 642 | if (arg.isEmpty()) { |
| | 643 | reply(s, "!muc topic <subject>"); |
| | 644 | return true; |
| | 645 | } |
| | 646 | parser.back(1); |
| | 647 | arg = parser.joinBody(); |
| | 648 | gloox::Stanza *m = new gloox::Stanza( "message" ); |
| | 649 | m->addAttribute( "to", conf->name().toStdString() ); |
| | 650 | m->addAttribute( "type", "groupchat" ); |
| | 651 | m->addChild(new gloox::Tag("subject", arg.toStdString())); |
| | 652 | bot()->client()->send(m); |
| | 653 | return true; |
| 633 | 654 | } |
| 634 | 655 | |