Ejemplo n.º 1
0
 public void OnUserJoin(UserJoinEventArgs e)
 {
     lock (lockobj)
     {
         if (dtUser.Select(string.Format("SessionId='{0}'", e.User.SessionId)).Length <= 0)
         {
             DataRow dr = dtUser.NewRow();
             dr["SessionId"] = e.User.SessionId;
             dr["UserId"]    = e.User.UserId;
             dr["UserName"]  = e.User.UserName;
             dtUser.Rows.Add(dr);
             dr.AcceptChanges();
         }
     }
 }
Ejemplo n.º 2
0
        void UserDB_UserJoined(object sender, UserJoinEventArgs e)
        {
            User user = userdb.GetUserByName(e.User.Nick);

            if (user == null)
            {
                return;
            }
            user.Online = true;

            UserMessage[] messages = userdb.GetMessagesSinceTime(user, DateTime.Now);
            if (messages.Length > 0)
            {
                foreach (UserMessage m in messages)
                {
                    this.SendMessage(e.User.Nick, m.Message);
                }
                SaveDB();
            }
        }
Ejemplo n.º 3
0
 void JeBotMain_UserJoinedChannel(object sender, UserJoinEventArgs e)
 {
     if (ChangingHostNotify != null)
     {
         // Notify the user if they need to reconfigure their client for changing hosts
         if (e.User.Nick == ChangingHostNotify.Nick)
         {
             this.SendNotice(e.User.Nick, "Please reconfigure your client to use your NickServ password as your server password to avoid spamming when you join. See http://freenode.net/faq.shtml#nocloakonjoin");
             ChangingHostNotify = null;
         }
     }
     // Identify this user if they are included in the manager list
     if (Managers.Contains(e.User.Nick))
         this.SendMessage("NickServ", "ACC " + e.User.Nick);
 }
Ejemplo n.º 4
0
 public void OnUserJoin(UserJoinEventArgs e)
 {
 }
Ejemplo n.º 5
0
        void UserDB_UserJoined(object sender, UserJoinEventArgs e)
        {
            User user = userdb.GetUserByName(e.User.Nick);
            if (user == null) return;
            user.Online = true;

            UserMessage[] messages = userdb.GetMessagesSinceTime(user, DateTime.Now);
            if (messages.Length > 0)
            {
                foreach(UserMessage m in messages)
                {
                    this.SendMessage(e.User.Nick, m.Message);
                }
                SaveDB();
            }
        }