Exemple #1
0
 protected static void HandleIncomingMessage(JabberGateway gateway, string endpointName, JabberID from, string body)
 {
     try {
         var si = Program.GetScriptInstance <Common>("Common.Script.dll");
         if (si != null)
         {
             var mdata = new ShootBlues.Script.Common.MessageData(
                 null, new Dictionary <string, object> {
                 { "__name__", "JabberMessage" },
                 { "endpoint", endpointName },
                 { "from", from.FullJabberID },
                 { "text", body }
             }
                 );
             si.OnNewMessage(gateway, mdata);
         }
     } catch (Exception ex) {
         Program.Scheduler.OnTaskError(ex);
     }
 }
 protected static void HandleIncomingMessage(JabberGateway gateway, string endpointName, JabberID from, string body)
 {
     try {
         var si = Program.GetScriptInstance<Common>("Common.Script.dll");
         if (si != null) {
             var mdata = new ShootBlues.Script.Common.MessageData(
                 null, new Dictionary<string, object> {
                     {"__name__", "JabberMessage"},
                     {"endpoint", endpointName},
                     {"from", from.FullJabberID},
                     {"text", body}
                 }
             );
             si.OnNewMessage(gateway, mdata);
         }
     } catch (Exception ex) {
         Program.Scheduler.OnTaskError(ex);
     }
 }