public bool RecordEvent(UserChatEvent ev) { m_log.DebugFormat( "[EVENT RECORDER]: Notified of avatar {0} {1} chat {2} {3} \"{4}\" from {5} in {6}", ev.UserName, ev.UserId, ev.ChatType, ev.Channel, ev.Text, ev.Origin, ev.RegionName); return(true); }
public bool RecordEvent(UserChatEvent ev) { m_log.DebugFormat( "[EVENT RECORDER]: Notified of avatar {0} {1} chat {2} {3} \"{4}\" from {5} in {6}", ev.UserName, ev.UserId, ev.ChatType, ev.Channel, ev.Text, ev.Origin, ev.RegionName); return true; }
public bool RecordEvent(UserChatEvent ev) { try { using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); using (MySqlCommand cmd = new MySqlCommand( "insert into UserChatEvents (UserId, UserName, OriginX, OriginY, OriginZ, Type, Text, Channel, GridId, RegionName, DateTime) values (?UserId, ?UserName, ?OriginX, ?OriginY, ?OriginZ, ?Type, ?Text, ?Channel, ?GridId, ?RegionName, ?DateTime)", dbcon)) { cmd.Parameters.AddWithValue("?UserId", ev.UserId); cmd.Parameters.AddWithValue("?UserName", ev.UserName); cmd.Parameters.AddWithValue("?OriginX", ev.Origin.X); cmd.Parameters.AddWithValue("?OriginY", ev.Origin.Y); cmd.Parameters.AddWithValue("?OriginZ", ev.Origin.Z); cmd.Parameters.AddWithValue("?Type", ev.ChatType.ToString()); cmd.Parameters.AddWithValue("?Text", ev.Text); cmd.Parameters.AddWithValue("?Channel", ev.Channel); cmd.Parameters.AddWithValue("?GridId", ev.GridId); cmd.Parameters.AddWithValue("?RegionName", ev.RegionName); cmd.Parameters.AddWithValue("?DateTime", ev.DateTime); cmd.ExecuteNonQuery(); } } } catch (Exception e) { m_log.ErrorFormat("[MYSQL EVENT RECORDER]: Could not record {0}, error {1}", ev, e); return(false); } return(true); }
public bool RecordEvent(UserChatEvent ev) { try { using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); using (MySqlCommand cmd = new MySqlCommand( "insert into UserChatEvents (UserId, UserName, OriginX, OriginY, OriginZ, Type, Text, Channel, GridId, RegionName, DateTime) values (?UserId, ?UserName, ?OriginX, ?OriginY, ?OriginZ, ?Type, ?Text, ?Channel, ?GridId, ?RegionName, ?DateTime)", dbcon)) { cmd.Parameters.AddWithValue("?UserId", ev.UserId); cmd.Parameters.AddWithValue("?UserName", ev.UserName); cmd.Parameters.AddWithValue("?OriginX", ev.Origin.X); cmd.Parameters.AddWithValue("?OriginY", ev.Origin.Y); cmd.Parameters.AddWithValue("?OriginZ", ev.Origin.Z); cmd.Parameters.AddWithValue("?Type", ev.ChatType.ToString()); cmd.Parameters.AddWithValue("?Text", ev.Text); cmd.Parameters.AddWithValue("?Channel", ev.Channel); cmd.Parameters.AddWithValue("?GridId", ev.GridId); cmd.Parameters.AddWithValue("?RegionName", ev.RegionName); cmd.Parameters.AddWithValue("?DateTime", ev.DateTime); cmd.ExecuteNonQuery(); } } } catch (Exception e) { m_log.ErrorFormat("[MYSQL EVENT RECORDER]: Could not record {0}, error {1}", ev, e); return false; } return true; }
public bool RecordEvent(UserChatEvent ev) { return(RecordEventInternal(ev)); }