本文整理汇总了C#中IMessageTransferModule类的典型用法代码示例。如果您正苦于以下问题:C# IMessageTransferModule类的具体用法?C# IMessageTransferModule怎么用?C# IMessageTransferModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IMessageTransferModule类属于命名空间,在下文中一共展示了IMessageTransferModule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialise
public void Initialise(Scene scene, IConfigSource config)
{
if (config.Configs["Messaging"] != null)
{
// Allow disabling this module in config
//
if (config.Configs["Messaging"].GetString(
"InventoryTransferModule", "InventoryTransferModule") !=
"InventoryTransferModule")
return;
}
if (!m_Scenelist.Contains(scene))
{
if (m_Scenelist.Count == 0)
{
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null)
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
}
m_Scenelist.Add(scene);
scene.RegisterModuleInterface<IInventoryTransferModule>(this);
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClientClosed += ClientLoggedOut;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
}
}
示例2: RegionLoaded
public void RegionLoaded(Scene scene)
{
if (!m_Enabled)
return;
if (m_TransferModule == null)
{
m_TransferModule =
scene.RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null)
{
m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
"lures will not work!");
m_Enabled = false;
m_scenes.Clear();
scene.EventManager.OnNewClient -= OnNewClient;
scene.EventManager.OnClosingClient -= OnClosingClient;
scene.EventManager.OnIncomingInstantMessage -=
OnGridInstantMessage;
}
}
}
示例3: PostInitialise
public void PostInitialise()
{
m_TransferModule =
m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null)
m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
"lures will not work!");
}
示例4: PostInitialise
public void PostInitialise()
{
if (m_Scenelist.Count > 0)
{
m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null)
m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
}
}
示例5: RegionLoaded
public void RegionLoaded (IScene scene)
{
if (m_TransferModule == null) {
m_TransferModule = m_Scenelist [0].RequestModuleInterface<IMessageTransferModule> ();
if (m_TransferModule == null) {
MainConsole.Instance.Error (
"[Inventory transfer]: No Message transfer module found, transfers will be local only");
m_Enabled = false;
m_Scenelist.Clear ();
scene.EventManager.OnNewClient -= OnNewClient;
scene.EventManager.OnClosingClient -= OnClosingClient;
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
}
}
}
示例6: RegionLoaded
public void RegionLoaded (IScene scene)
{
if (!m_enabled)
return;
if (m_TransferModule == null) {
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();
if (m_TransferModule == null) {
MainConsole.Instance.Error ("[Instant message]: No message transfer module, IM will not work!");
scene.EventManager.OnNewClient -= EventManager_OnNewClient;
scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
m_Scene = null;
m_enabled = false;
}
}
}
示例7: RegionLoaded
public void RegionLoaded (IScene scene)
{
if (!m_enabled)
return;
if (m_TransferModule == null) {
OfflineMessagesConnector = Framework.Utilities.DataManager.RequestPlugin<IOfflineMessagesConnector> ();
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();
if (m_TransferModule == null || OfflineMessagesConnector == null) {
scene.EventManager.OnNewClient -= OnNewClient;
scene.EventManager.OnClosingClient -= OnClosingClient;
m_enabled = false;
m_Scene = null;
MainConsole.Instance.Error (
"[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Disabling offline messages");
return;
}
m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
}
}
示例8: Initialize
protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp.
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
{
m_ScriptEngine = ScriptEngine;
m_host = host;
m_item = item;
LoadLimits(); // read script limits from config.
m_TransferModule =
m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
AsyncCommands = new AsyncCommandManager(ScriptEngine);
}
示例9: RegionLoaded
public void RegionLoaded(IScene scene)
{
if (!m_groupMessagingEnabled)
return;
m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
m_groupsModule = scene.RequestModuleInterface<IGroupsModule>();
// No groups module, no groups messaging
if (m_groupData == null)
{
MainConsole.Instance.Error(
"[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
Close();
m_groupMessagingEnabled = false;
return;
}
m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
// No message transfer module, no groups messaging
if (m_msgTransferModule == null)
{
MainConsole.Instance.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
Close();
m_groupMessagingEnabled = false;
return;
}
m_sceneList.Add(scene);
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClosingClient += OnClosingClient;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
scene.EventManager.OnClientLogin += OnClientLogin;
scene.EventManager.OnChatSessionRequest += OnChatSessionRequest;
}
示例10: Initialize
public void Initialize(IScriptModulePlugin ScriptEngine, SceneObjectPart host, uint localID, UUID itemID, ScriptProtectionModule module)
{
m_ScriptEngine = ScriptEngine;
m_host = host;
m_localID = localID;
m_itemID = itemID;
ScriptProtection = module;
m_ScriptDelayFactor =
m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
m_ScriptDistanceFactor =
m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
m_MinTimerInterval =
m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
m_automaticLinkPermission =
m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
m_notecardLineReadCharsMax =
m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
if (m_notecardLineReadCharsMax > 65535)
m_notecardLineReadCharsMax = 65535;
m_TransferModule =
World.RequestModuleInterface<IMessageTransferModule>();
m_UrlModule = World.RequestModuleInterface<IUrlModule>();
m_comms = World.RequestModuleInterface<IWorldComm>();
}
示例11: RegionLoaded
public void RegionLoaded(Scene scene)
{
if (!m_groupsEnabled)
return;
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
if (m_groupData == null)
{
m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
// No Groups Service Connector, then nothing works...
if (m_groupData == null)
{
m_groupsEnabled = false;
m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
Close();
return;
}
m_groupsMessagingModule = scene.RequestModuleInterface<IGroupsMessagingModule>();
}
if (m_msgTransferModule == null)
{
m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
// No message transfer module, no notices, group invites, rejects, ejects, etc
if (m_msgTransferModule == null)
{
m_groupsEnabled = false;
m_log.Error("[GROUPS]: Could not get MessageTransferModule");
Close();
return;
}
}
lock (m_sceneList)
{
m_sceneList.Add(scene);
}
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClosingClient += OnClosingClient;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
scene.EventManager.OnRegisterCaps += new EventManager.RegisterCapsEvent(EventManager_OnRegisterCaps);
// The InstantMessageModule itself doesn't do this,
// so lets see if things explode if we don't do it
// scene.EventManager.OnClientClosed += OnClientClosed;
}
示例12: RegionLoaded
public void RegionLoaded (IScene scene)
{
if (!m_Enabled)
return;
m_TransferModule = m_scene.RequestModuleInterface<IMessageTransferModule> ();
if (m_TransferModule == null)
MainConsole.Instance.Error ("[INSTANT MESSAGE]: No message transfer module, lures will not work!");
}
示例13: RegionLoaded
public void RegionLoaded(IScene scene)
{
if (!m_groupsEnabled)
return;
if (m_debugEnabled)
MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);
m_groupData = WhiteCore.Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector>();
// No Groups Service Connector, then nothing works...
if (m_groupData == null)
{
m_groupsEnabled = false;
MainConsole.Instance.Error("[GROUPS]: Could not get IGroupsServicesConnector");
Close();
return;
}
m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
m_imService = scene.RequestModuleInterface<IInstantMessagingService>();
// No message transfer module, no notices, group invites, rejects, ejects, etc
if (m_msgTransferModule == null)
{
m_groupsEnabled = false;
MainConsole.Instance.Error("[GROUPS]: Could not get MessageTransferModule");
Close();
return;
}
m_scene = scene;
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnClosingClient += OnClosingClient;
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
scene.EventManager.OnRegisterCaps += OnRegisterCaps;
scene.EventManager.OnCachedUserInfo += UpdateCachedData;
// The InstantMessageModule itself doesn't do this,
// so lets see if things explode if we don't do it
// scene.EventManager.OnClientClosed += OnClientClosed;
}
示例14: RegionLoaded
public void RegionLoaded(Scene scene)
{
if (!m_groupMessagingEnabled)
return;
if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
// No groups module, no groups messaging
if (m_groupData == null)
{
m_log.Error("[Groups.Messaging]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
RemoveRegion(scene);
return;
}
m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
// No message transfer module, no groups messaging
if (m_msgTransferModule == null)
{
m_log.Error("[Groups.Messaging]: Could not get MessageTransferModule");
RemoveRegion(scene);
return;
}
if (m_presenceService == null)
m_presenceService = scene.PresenceService;
}
示例15: RegionLoaded
public void RegionLoaded(Scene scene)
{
if (!m_Enabled)
return;
m_TransferModule = m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
if (m_TransferModule == null)
m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
"lures will not work!");
}