Advertisement
Swiftkill

Untitled

May 12th, 2013
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.61 KB | None | 0 0
  1. diff --git a/indra/newview/llfloateravatarinfo.cpp b/indra/newview/llfloateravatarinfo.cpp
  2. index c9e5ba9..aab654d 100644
  3. --- a/indra/newview/llfloateravatarinfo.cpp
  4. +++ b/indra/newview/llfloateravatarinfo.cpp
  5. @@ -60,6 +60,37 @@ const LLRect FAI_RECT(0, 530, 420, 0);
  6.  class LLAgentHandler : public LLCommandHandler
  7.  {
  8.  public:
  9. +   void verbCallback(const std::string& verb, LLUUID agent_id, const LLAvatarName& avatar_name)
  10. +   {
  11. +       if (verb == "im")
  12. +       {
  13. +           gIMMgr->setFloaterOpen(TRUE);
  14. +           gIMMgr->addSession( avatar_name.getCompleteName(), IM_NOTHING_SPECIAL, agent_id);
  15. +           return;
  16. +       }
  17. +
  18. +       if (verb == "requestfriend")
  19. +       {
  20. +           LLPanelFriends::requestFriendshipDialog( agent_id, avatar_name.getCompleteName() );
  21. +           return;
  22. +       }
  23. +
  24. +       if (verb == "mute")
  25. +       {
  26. +           LLFloaterMute::getInstance()->open();
  27. +           LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
  28. +           LLMuteList::getInstance()->add(mute);
  29. +           return;
  30. +       }
  31. +
  32. +       if (verb == "unmute")
  33. +       {
  34. +           LLMute mute(agent_id, avatar_name.getCompleteName(), LLMute::AGENT);
  35. +           LLMuteList::getInstance()->remove(mute);
  36. +           return;
  37. +       }
  38. +   }
  39. +
  40.     // requires trusted browser to trigger
  41.     LLAgentHandler() : LLCommandHandler("agent", true) { }
  42.  
  43. @@ -73,11 +104,44 @@ public:
  44.             return false;
  45.         }
  46.  
  47. -       if (params[1].asString() == "about")
  48.         {
  49.             LLFloaterAvatarInfo::show(agent_id);
  50.             return true;
  51.         }
  52. +
  53. +       if (verb == "pay")
  54. +       {
  55. +           handle_pay_by_id(agent_id);
  56. +           return true;
  57. +       }
  58. +
  59. +       if (verb == "offerteleport")
  60. +       {
  61. +           handle_lure(agent_id);
  62. +           return true;
  63. +       }
  64. +
  65. +       if ((verb == "im") || (verb == "requestfriend") || (verb == "unmute"))
  66. +       {
  67. +           LLAvatarNameCache::get(agent_id,   boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
  68. +           return true;
  69. +       }
  70. +      
  71. +       if (verb == "mute")
  72. +       {
  73. +           if (LLMuteList::getInstance()->isMuted(agent_id))
  74. +           {
  75. +               LLFloaterMute::getInstance()->open();
  76. +               LLFloaterMute::getInstance()->selectMute(agent_id);
  77. +           }
  78. +           else
  79. +           {
  80. +               LLAvatarNameCache::get(agent_id, boost::bind(&LLAgentHandler::verbCallback, this, verb, _1, _2));
  81. +           }
  82. +           return true;
  83. +       }
  84. +
  85. +
  86.         return false;
  87.     }
  88.  };
  89. diff --git a/indra/newview/llfloatergroupinfo.cpp b/indra/newview/llfloatergroupinfo.cpp
  90. index 67e2ebe..1020efc 100644
  91. --- a/indra/newview/llfloatergroupinfo.cpp
  92. +++ b/indra/newview/llfloatergroupinfo.cpp
  93. @@ -97,7 +97,7 @@ public:
  94.             return false;
  95.         }
  96.  
  97. -       if (tokens[1].asString() == "about")
  98. +       if ((tokens[1].asString() == "about") || (tokens[1].asString() == "inspect"))
  99.         {
  100.             LLFloaterGroupInfo::showFromUUID(group_id);
  101.             return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement