Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Fruffi.Bot
- {
- struct ConfigsServer
- {
- private string __Uri;
- private int __Port;
- private string __Password;
- public string Uri { get { return this.__Uri; } }
- public int Port { get { return this.__Port; } }
- public string Password { get { return this.__Password; } }
- public ConfigsServer(string uri, int port, string password)
- {
- this.__Uri = uri;
- this.__Port = port;
- this.__Password = password;
- }
- }
- struct ConfigsNick
- {
- private string __Name;
- private string __Nick;
- private string __AltNick;
- private string __Ident;
- private string __Vhost;
- private string __Password;
- private bool __IsInvisble;
- private bool __IsAlternate;
- public string Name { get { return this.__Name; } }
- public string Nick { get { return this.__Nick; } }
- public string AltNick { get { return this.__AltNick; } }
- public string Ident { get { return this.__Ident; } }
- public string Vhost { get { return this.__Vhost; } }
- public string Password { get { return this.__Password; } }
- public bool isInvisible { get { return this.__IsInvisble; } set { this.__IsInvisble = value; } }
- public bool isAlternate { get { return this.__IsAlternate; } set { this.__IsAlternate = value; } }
- public ConfigsNick
- (
- string name,
- string nick,
- string altnick,
- string ident,
- string vhost,
- string password,
- bool is_invisble,
- bool is_alternate
- )
- {
- this.__Name = name;
- this.__Nick = nick;
- this.__AltNick = altnick;
- this.__Ident = ident;
- this.__Vhost = vhost;
- this.__Password = password;
- this.__IsInvisble = is_invisble;
- this.__IsAlternate = is_alternate;
- }
- }
- struct ConfigsSocket
- {
- private string __Encoding;
- public string Encoding { get { return this.__Encoding; } }
- public ConfigsSocket(string encoding)
- {
- this.__Encoding = encoding;
- }
- }
- struct ConfigsHome
- {
- private string __Channel;
- private string __Key;
- private string __Password;
- public string Channel { get { return this.__Channel; } }
- public string Key { get { return this.__Key; } }
- public string Password { get { return this.__Password; } }
- public ConfigsHome(string channel, string key, string password)
- {
- this.__Channel = channel;
- this.__Key = key;
- this.__Password = password;
- }
- }
- struct ConfigsAccess
- {
- private string __Password;
- public string Password { get { return this.__Password; } }
- public ConfigsAccess(string password)
- {
- this.__Password = password;
- }
- }
- struct ConfigsOwner
- {
- private string __Nick;
- private string __Ident;
- private string __AltNick;
- private string __AltIdent;
- private string __Vhost;
- public string Nick { get { return this.__Nick; } set { this.__Nick = value; } }
- public string Altnick { get { return this.__AltNick; } set { this.__AltNick = value; } }
- public string Ident { get { return this.__Ident; } }
- public string AltIdent { get { return this.__AltIdent; } }
- public string Vhost { get { return this.__Vhost; } }
- public ConfigsOwner
- (
- string nick,
- string ident,
- string altnick,
- string altident,
- string vhost
- )
- {
- this.__Nick = nick;
- this.__Ident = ident;
- this.__AltNick = altnick;
- this.__AltIdent = altident;
- this.__Vhost = vhost;
- }
- }
- class Configs
- {
- private ConfigsSocket __Socket;
- private ConfigsServer __Server;
- private ConfigsNick __Nick;
- private ConfigsHome __Home;
- private ConfigsAccess __Access;
- private ConfigsOwner __Owner;
- public ConfigsSocket Socket { get { return this.__Socket; } }
- public ConfigsServer Server { get { return this.__Server; } }
- public ConfigsNick Nick { get { return this.__Nick; } }
- public ConfigsHome Home { get { return this.__Home; } }
- public ConfigsAccess Access { get { return this.__Access; } }
- public ConfigsOwner Owner { get { return this.__Owner; } }
- public Configs()
- {
- this.loadManifest();
- }
- private void loadManifest()
- {
- this.__Socket = new ConfigsSocket
- (
- Properties.Settings.Default.__socketEncoding
- );
- this.__Server = new ConfigsServer
- (
- Properties.Settings.Default.__serverUri,
- Properties.Settings.Default.__serverPort,
- Properties.Settings.Default.__serverPassword
- );
- this.__Nick = new ConfigsNick
- (
- Properties.Settings.Default.__nickName,
- Properties.Settings.Default.__nickNick,
- Properties.Settings.Default.__nickAlternate,
- Properties.Settings.Default.__nickIdent,
- Properties.Settings.Default.__nickVhost,
- Properties.Settings.Default.__nickPassword,
- Properties.Settings.Default.__nickIsInvisible,
- Properties.Settings.Default.__nickIsAlternate
- );
- this.__Home = new ConfigsHome
- (
- Properties.Settings.Default.__homeChannel,
- Properties.Settings.Default.__homeKey,
- Properties.Settings.Default.__homePassword
- );
- this.__Access = new ConfigsAccess
- (
- Properties.Settings.Default.__accessPassword
- );
- this.__Owner = new ConfigsOwner
- (
- Properties.Settings.Default.__ownerNick,
- Properties.Settings.Default.__ownerIdent,
- Properties.Settings.Default.__ownerNickAlternate,
- Properties.Settings.Default.__ownerIdentAlternate,
- Properties.Settings.Default.__ownerVhost
- );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement