Previous topic

factory

Next topic

helpers

This Page

groups

class pyogp.lib.base.groups.MockChatInterface(agent, chat_handler)

a super simple chat interface for testing group chat in a console

data_watcher()
get_and_send_input()
start()
class pyogp.lib.base.groups.GroupManager(agent, settings=None)

a storage bin for groups

also, a functional area for group creation operations

initialize the group manager

activate_group(group_id)
set a particular group as active
create_group(AgentID=None, SessionID=None, Name=None, Charter='', ShowInList=True, InsigniaID=00000000-0000-0000-0000-000000000000, MembershipFee=0, OpenEnrollment=False, AllowPublish=False, MaturePublish=False)

sends a message to the agent’s current region requesting to create a group

enables a callback (which should be unsubscribed from once we get a response)

enable_callbacks()
enables the callback handlers for this GroupManager
get_group(GroupID=None)
searches the store and returns group if stored, None otherwise
handle_group_chat(message)
process a ChatterBoxInvitation_Message instance
join_group(group_id)
sends a JoinGroupRequest packet for the specified uuid
onAgentGroupDataUpdate(packet)
deal with the data that comes in over the event queue
onChatterBoxInvitation_Message(message)
handle a group chat message from the event queue
onChatterBoxSessionAgentListUpdates(message)
parse teh response to a request to join a group chat and propagate data out
onChatterBoxSessionEventReply(message)
handle a response from the simulator re: a message we sent to a group chat
onChatterBoxSessionStartReply(message)
onCreateGroupReply(packet)
when we get a CreateGroupReply packet, log Success, and if True, request the group details. remove the callback in any case
onJoinGroupReply(packet)
the simulator tells us if joining a group was a success.
send_ActivateGroup(agent_id, session_id, group_id)
sends an ActivateGroup message to the host simulator
send_JoinGroupRequest(agent_id, session_id, group_id)
sends a JoinGroupRequest message to the hsot simulator
store_group(_group)
append to or replace a group in self.group_store
update_group(group_data)
accepts a dictionary of group data and creates/updates a group
update_group_by_name(group_data, name)
accepts a dictionary of group data and creates/updates a group
update_group_by_session_id(group_data)
accepts a dictionary of group data and creates/updates a group
class pyogp.lib.base.groups.Group(AcceptNotices=None, GroupPowers=None, GroupID=None, GroupName=None, ListInProfile=None, Contribution=None, GroupInsigniaID=None, agent=None)

representation of a group

activate_group()
set this group as active
chat(Message=None)

sends an instant message to another avatar

wraps send_ImprovedInstantMessage with some handy defaults

handle_inbound_chat(message)
parses an incoming chat message from a group
request_join_group_chat()
sends an ImprovedInstantMessage packet with the atributes necessary to join a group chat
send_ActivateGroup(agent_id, session_id, group_id)
send an ActivateGroup message to the host simulator
update_properties(properties)
takes a dictionary of attribute:value and makes it so