コード例 #1
0
        protected virtual void LoggedIn()
        {
            GHub.Settings.ACCOUNTS.account acc = GHub.Settings.ACCOUNTS.usersAccounts.GetAccount(this.nick);
            if (acc == null)
            {
                this.SendMessage("<GHub> " + GHub.Settings.ACCOUNTS.profiles.DefaultProfile.OnJoinMessage + "|");
            }
            else
            {
                this.SendMessage("<GHub> " + GHub.Settings.ACCOUNTS.usersAccounts.GetAccount(this.nick).Profile.OnJoinMessage + "|");
            }

            string newUser = "******" + this.isOP.ToString() + " " + this.rawUserInfo + "|";

            // we can't use the normle serach to send this message because the user is not fully
            // logged in yet. therefor we have to send it the old way

            GHub.client.server.Server client;
            for (int i = 0; i < this.ServerList.Size(); i++)
            {
                client = (GHub.client.server.Server)ServerList.Get(i);
                if (client.isLoggedIn)
                {
                    client.SendMessage(newUser);
                }
            }
        }
コード例 #2
0
        protected virtual void MyPass(Message msg)
        {
            // $MyPass pass|
            string pass = msg.stringFormat.Substring(8, msg.stringFormat.Length - 9);

            GHub.Settings.ACCOUNTS.account acc = GHub.Settings.ACCOUNTS.usersAccounts.GetAccount(this.nick);

            // if it was an incorect pass
            if (acc.pass != pass)
            {
                this.closeAndRemoveUser("<GHub> Incorrect password|$BadPass|");
                return;
            }

            this.loggedInCorrectly = true;
            this.SendMessage("$LogedIn " + this.nick + "|");
            this.SendMessage("$HubName " + GHub.Settings.Hub.hubSettings.HubName + "|<GHub> GHub Version:" + GHub.Settings.Hub.hubSettings.VersionNo + ".|");
            this.SendMessage("$Hello " + this.nick + "|");

            if ((this.isOP = acc.Profile.isOP))
            {
                this.send.SendMessageToAll(GetOPlist());
            }

            AlmostLoggedIn(msg);
        }